.logout-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    background: none;
    border: none;
    color: #b42318;
    padding: 4px;
    border-radius: 8px;
    transition: color .2s, background .2s;
    cursor: pointer;
    height: 36px;
    width: 36px;
}

.logout-icon-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

.logout-icon-btn:hover,
.logout-icon-btn:focus {
    color: #fff;
    background: #b42318;
}

.logout-icon-btn:active {
    background: #991b1b;
}

.profile-logout-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    background: none;
    border: none;
    margin-top: 10px;
    padding: 6px 0 0 0;
    cursor: pointer;
    color: #b42318;
    transition: color .2s, background .2s;
    border-top: 1px solid #f1f3f5;
}

.profile-logout-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

.profile-logout-btn:hover,
.profile-logout-btn:focus {
    color: #fff;
    background: #b42318;
    border-radius: 8px;
}

.profile-logout-btn:active {
    background: #991b1b;
}

/* === USER PROFILE DROPDOWN === */
.user-profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    outline: none;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: 18px;
    background: #f8fafc;
    transition: background .2s;
}

.user-profile-summary:focus,
.user-profile-dropdown:focus .user-profile-summary {
    background: #f4c40022;
    outline: 2px solid #f4c400;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f4c400;
    color: #1f2937;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(244, 196, 0, 0.08);
    text-transform: uppercase;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.user-fullname {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.1;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    margin-top: 2px;
    background: #f8fafc;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.user-profile-caret {
    font-size: 13px;
    margin-left: 4px;
    color: #6b7280;
    transition: transform .2s;
}

.user-profile-dropdown[aria-expanded="true"] .user-profile-caret {
    transform: rotate(180deg);
}

.user-profile-card {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 270px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31, 41, 55, 0.13), 0 1.5px 6px rgba(244, 196, 0, 0.09);
    padding: 18px 20px 12px 20px;
    z-index: 1001;
    font-size: 15px;
    color: #1f2937;
    animation: fadeIn .18s;
}

.user-profile-card.open {
    display: block;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
    font-size: 14px;
}

.profile-label {
    color: #6b7280;
    font-weight: 500;
    min-width: 90px;
}

.profile-value {
    color: #1f2937;
    font-weight: 600;
    text-align: right;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    border-top: 1px solid #f1f3f5;
    padding-top: 10px;
}

.profile-action {
    font-size: 14px;
    color: #2e67b1;
    text-decoration: underline;
    cursor: pointer;
    transition: color .2s;
}

.profile-action.logout {
    color: #b42318;
    font-weight: 600;
}

.profile-action:hover {
    color: #f4c400;
}

@media (max-width: 767px) {
    .user-profile-card {
        right: auto;
        left: 0;
        min-width: 220px;
        padding: 14px 8px 8px 12px;
        font-size: 14px;
    }

    .user-profile-summary {
        padding: 4px 6px 4px 4px;
    }

    .user-fullname {
        max-width: 70px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === NEW LOGIN2 PAGE (IDRAS-STYLE) === */
.login2-root {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    background: #F8F9FA;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.login2-left {
    flex: 1 1 0;
    background: #F8F9FA;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 56px 48px 56px 64px;
    position: relative;
    min-width: 320px;
    max-width: 520px;
    box-sizing: border-box;
    overflow: hidden;
}

.login2-branding {
    z-index: 2;
    position: relative;
}

.login2-logo {
    width: 90px;
    height: auto;
    margin-bottom: 32px;
    margin-left: 0;
}

.login2-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1F2937;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.login2-subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    font-weight: 400;
    margin-bottom: 0;
    max-width: 340px;
}

.login2-watermark {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

.login2-watermark svg {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-width: 320px;
    min-height: 320px;
}

.login2-right {
    flex: 1 1 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 56px 64px 56px 48px;
    min-width: 340px;
    box-sizing: border-box;
    position: relative;
}

.login2-lang {
    position: absolute;
    top: 32px;
    right: 64px;
    z-index: 2;
}

.login2-lang-select {
    padding: 7px 18px 7px 10px;
    border-radius: 8px;
    border: 1.5px solid #E5E7EB;
    background: #F8F9FA;
    color: #1F2937;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: border-color .2s;
}

.login2-lang-select:focus {
    border-color: #F4C400;
    box-shadow: 0 0 0 3px rgba(244, 196, 0, 0.13);
}

.login2-formwrap {
    width: 100%;
    max-width: 370px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(31, 41, 55, 0.07), 0 1.5px 6px rgba(244, 196, 0, 0.07);
    padding: 40px 32px 32px 32px;
    margin-top: 32px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login2-form-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
    text-align: left;
}

.login2-form-helper {
    font-size: 1rem;
    color: #6B7280;
    margin-bottom: 22px;
    text-align: left;
}

.login2-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login2-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.login2-field label {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 2px;
}

.login2-field input {
    border-radius: 10px;
    border: 1.5px solid #E5E7EB;
    background: #F8F9FA;
    padding: 13px 15px;
    font-size: 15px;
    color: #1F2937;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.login2-field input:focus {
    border-color: #F4C400;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(244, 196, 0, 0.13);
}

.login2-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.login2-remember-row {
    margin-top: -8px;
    margin-bottom: 10px;
}

.login2-remember {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #374151;
    gap: 7px;
    font-weight: 500;
}

.login2-remember input[type="checkbox"] {
    accent-color: #F4C400;
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 1.5px solid #E5E7EB;
    margin-right: 5px;
}

.login2-link {
    font-size: 14px;
    color: #6B7280;
    text-decoration: underline;
    transition: color .2s;
}

.login2-link:hover {
    color: #F4C400;
}

.login2-btn {
    width: 100%;
    padding: 15px 0;
    background: #111111;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 8px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(31, 41, 55, 0.09);
    transition: background .2s, box-shadow .2s, transform .1s;
    outline: none;
}

.login2-btn:hover,
.login2-btn:focus {
    background: #F4C400;
    color: #1F2937;
    box-shadow: 0 6px 24px rgba(244, 196, 0, 0.13);
    transform: translateY(-1px);
}

/* Responsive for login2 */
@media (max-width: 1023px) {
    .login2-root {
        flex-direction: column;
    }

    .login2-left,
    .login2-right {
        min-width: 0;
        max-width: none;
        width: 100%;
        padding: 40px 18px 32px 18px;
    }

    .login2-lang {
        right: 24px;
        top: 18px;
    }
}

@media (max-width: 639px) {
    .login2-formwrap {
        padding: 24px 8px 18px 8px;
        margin-top: 18px;
        margin-bottom: 18px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(31, 41, 55, 0.08);
    }

    .login2-title {
        font-size: 1.3rem;
    }

    .login2-logo {
        width: 60px;
        margin-bottom: 18px;
    }

    .login2-watermark svg {
        min-width: 180px;
        min-height: 180px;
    }
}

@media (max-width: 479px) {
    .login2-form-title {
        font-size: 1.1rem;
    }

    .login2-form-helper {
        font-size: 0.95rem;
    }

    .login2-formwrap {
        padding: 12px 2px 10px 2px;
        border-radius: 8px;
    }

    .login2-left,
    .login2-right {
        padding: 18px 4px 12px 4px;
    }

    .login2-lang {
        right: 8px;
        top: 8px;
    }
}

/* === BASE RESET & TYPOGRAPHY === */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%
}

body {
    margin: 0;
    font-family: Segoe UI, Arial, sans-serif;
    background: #f4f7fb;
    color: #1d2939;
    line-height: 1.5;
    overflow-x: hidden
}

a {
    text-decoration: none;
    color: #0a58ca
}

img {
    max-width: 100%;
    height: auto
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit
}

/* === TOP HEADER BAR === */
.top-header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    transition: left .3s ease
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px
}

.header-brand {
    font-size: 15px;
    font-weight: 600;
    color: #374151
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151
}

.user-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap
}

.role-super-admin {
    background: #fef3c7;
    color: #92400e
}

.role-administrator {
    background: #dbeafe;
    color: #1e40af
}

.role-standard-user {
    background: #e0e7ff;
    color: #3730a3
}

.role-admin {
    background: #dbeafe;
    color: #1e40af
}

.role-user {
    background: #f3f4f6;
    color: #374151
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all .2s;
    cursor: pointer;
    flex-shrink: 0
}

.logout-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca
}

.logout-btn svg {
    width: 18px;
    height: 18px
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    color: #374151;
    transition: all .2s;
    flex-shrink: 0
}

.mobile-menu-toggle:hover {
    background: #eef4ff;
    border-color: #2e67b1;
    color: #2e67b1
}

.mobile-menu-toggle svg {
    width: 22px;
    height: 22px
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: #fff;
    color: #1d2939;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, .03);
    transition: transform .3s ease, width .3s ease;
    z-index: 101;
    -webkit-overflow-scrolling: touch
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 100;
    opacity: 0;
    transition: opacity .3s ease
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border-bottom: 1px solid rgba(212, 160, 23, .25);
    position: relative
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    background: #f8fafc;
    padding: 4px;
    border: 1px solid #eef2f6;
    transition: width .3s, height .3s
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    transition: opacity .2s, width .2s
}

.brand-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a3a5c;
    line-height: 1.2;
    white-space: nowrap
}

.brand-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap
}

.sidebar-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all .2s
}

.sidebar-toggle:hover {
    background: #f1f5f9;
    color: #1a3a5c;
    border-color: #cbd5e1
}

.sidebar-toggle svg {
    transition: transform .3s
}

.sidebar-close {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all .2s;
    font-size: 20px;
    line-height: 1
}

.sidebar-close:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca
}

.sidebar nav {
    padding: 12px 0
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .2s;
    white-space: nowrap;
    overflow: hidden;
    min-height: 44px
}

.sidebar nav a:hover {
    background: #fefcf3;
    color: #1a3a5c;
    border-left-color: rgba(212, 160, 23, .6)
}

.sidebar nav a.active {
    background: #fef08a;
    color: #1a3a5c;
    border-left-color: #eab308;
    font-weight: 600
}

.sidebar nav a.active:hover {
    background: #fde047;
    color: #1a3a5c
}

.sidebar nav a.active .nav-icon {
    opacity: 1
}

.nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0
}

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity .2s, width .2s
}

.nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 160, 23, .3), transparent);
    margin: 12px 20px;
    transition: margin .3s
}

/* === SIDEBAR COLLAPSED STATE === */
.sidebar.collapsed {
    width: 70px
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden
}

.sidebar.collapsed .sidebar-logo {
    width: 40px;
    height: 40px
}

.sidebar.collapsed .sidebar-brand {
    padding: 12px 15px;
    justify-content: center
}

.sidebar.collapsed .sidebar-toggle {
    position: static;
    transform: none;
    margin-left: auto
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg)
}

.sidebar.collapsed nav a {
    padding: 12px 0;
    justify-content: center
}

.sidebar.collapsed nav a .nav-label {
    opacity: 0;
    width: 0;
    position: absolute
}

.sidebar.collapsed nav a .nav-icon {
    width: auto;
    font-size: 20px
}

.sidebar.collapsed .nav-divider {
    margin: 12px 10px
}

/* === HEADER & CONTENT ADJUST FOR COLLAPSED SIDEBAR === */
.top-header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    transition: left .3s ease
}

.top-header.sidebar-collapsed {
    left: 70px
}

.content {
    margin-left: 260px;
    margin-top: 56px;
    padding: 24px;
    transition: margin-left .3s ease;
    min-height: calc(100vh - 56px)
}

.content.sidebar-collapsed {
    margin-left: 70px
}

.content.no-sidebar {
    margin-left: 0;
    margin-top: 0;
    max-width: 500px;
    margin: 40px auto
}

/* === CARDS & CONTAINERS === */
.card {
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    overflow: hidden
}

/* === LOGIN PAGE === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    padding: 20px
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .12), 0 2px 10px rgba(0, 0, 0, .08);
    padding: 40px 36px;
    text-align: center
}

.login-logo {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center
}

.login-logo .logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto
}

.login-logo .logo-icon svg {
    width: 100%;
    height: 100%
}

.login-logo-img {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto
}

.login-header {
    margin-bottom: 32px
}

.login-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #1d2939;
    letter-spacing: 0.5px
}

.login-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 400
}

.login-form {
    margin-bottom: 24px
}

.form-field {
    margin-bottom: 20px;
    text-align: left
}

.form-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    transition: color .2s
}

.form-field .field-icon {
    font-size: 16px;
    transition: transform .2s, color .2s
}

.form-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #d0d7e2;
    border-radius: 10px;
    font-size: 15px;
    color: #1d2939;
    background: #f8fafc;
    transition: all .25s ease
}

.form-field input::placeholder {
    color: #94a3b8
}

.form-field input:hover {
    border-color: #1a3a5c;
    background: #fff
}

.form-field input:focus {
    outline: none;
    border-color: #1a3a5c;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 58, 92, .12), 0 0 12px rgba(212, 160, 23, .15)
}

.form-field:hover label {
    color: #1a3a5c
}

.form-field:hover .field-icon {
    color: #d4a017
}

.form-field:focus-within label {
    color: #1a3a5c
}

.form-field:focus-within .field-icon {
    color: #d4a017;
    transform: scale(1.1)
}

.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .25s ease;
    box-shadow: 0 4px 12px rgba(26, 58, 92, .3)
}

.login-btn:hover {
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 160, 23, .4)
}

.login-btn:focus {
    outline: none;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    box-shadow: 0 0 0 4px rgba(212, 160, 23, .3), 0 6px 20px rgba(212, 160, 23, .4)
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 58, 92, .3)
}

.login-btn svg {
    transition: transform .2s ease
}

.login-btn:hover svg {
    transform: translateX(3px)
}

.login-footer {
    padding-top: 20px;
    border-top: 1px solid #e2e8f0
}

.login-footer p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6
}

.login-footer .copyright {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px
}

/* Login Page Flash Messages */
.login-page .flash {
    max-width: 420px;
    margin: 0 auto 20px;
    text-align: left
}

@media (max-width:480px) {
    .login-container {
        padding: 32px 24px;
        margin: 10px;
        border-radius: 12px
    }

    .login-title {
        font-size: 22px
    }

    .login-logo .logo-icon {
        width: 64px;
        height: 64px
    }

    .login-logo-img {
        max-width: 160px;
        max-height: 80px
    }

    .form-field input {
        padding: 12px 14px;
        font-size: 14px
    }

    .login-btn {
        padding: 12px 20px;
        font-size: 15px
    }
}

/* === KPI GRID === */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0
}

.kpi {
    background: #fff;
    border: 1px solid #d0d7e2;
    border-left: 4px solid #2e67b1;
    padding: 12px;
    border-radius: 8px
}

.kpi span {
    display: block;
    color: #667085;
    font-size: 13px
}

.kpi strong {
    font-size: 1.4rem;
    word-break: break-word
}

/* === FILTERS & FORMS === */
.filters {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 16px
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px
}

.form-grid.single {
    grid-template-columns: 1fr
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 14px
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    min-height: 44px
}

.form-grid textarea {
    min-height: 80px;
    resize: vertical
}

/* === BUTTONS === */
.btn {
    padding: 10px 16px;
    border: 1px solid #2e67b1;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    white-space: nowrap
}

.btn:hover {
    background: #eef4ff
}

.btn.primary {
    background: #2e67b1;
    color: #fff
}

.btn.primary:hover {
    background: #1d4e89
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px
}

.inline {
    display: inline
}

.inline button {
    border: none;
    background: #fff;
    color: #b42318;
    cursor: pointer
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 36px
}

.btn-danger {
    border-color: #b42318;
    color: #b42318
}

.btn-danger:hover {
    background: #fee4e2
}

/* === TABLES === */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #e4e7ec
}

.table-responsive table {
    margin-bottom: 0;
    border: none
}

.table-responsive table th:first-child,
.table-responsive table td:first-child {
    border-left: none
}

.table-responsive table th:last-child,
.table-responsive table td:last-child {
    border-right: none
}

.table-responsive table tr:last-child td {
    border-bottom: none
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px
}

th,
td {
    border: 1px solid #e4e7ec;
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
    vertical-align: middle
}

th {
    background: #eef4ff;
    font-weight: 600;
    white-space: nowrap
}

td {
    background: #fff
}

tr:hover td {
    background: #f8fafc
}

/* === FLASH MESSAGES === */
.flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px
}

.flash.success {
    background: #e8f7ed;
    color: #166534;
    border: 1px solid #bbf7d0
}

.flash.danger {
    background: #fee4e2;
    color: #991b1b;
    border: 1px solid #fecaca
}

.flash.warning {
    background: #fff4db;
    color: #92400e;
    border: 1px solid #fde68a
}

.flash.info {
    background: #eaf2ff;
    color: #1e40af;
    border: 1px solid #bfdbfe
}

/* === GRID LAYOUTS === */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px
}

.muted {
    color: #94a3b8
}

.login-card {
    max-width: 480px;
    margin: auto
}

@media print {

    .sidebar,
    .filters,
    .btn,
    .header-row a,
    .top-header {
        display: none !important
    }

    .content {
        margin: 0;
        margin-left: 0;
        margin-top: 0
    }

    .print-area {
        border: none
    }
}

/* ===========================================================================
   RESPONSIVE BREAKPOINTS
   - xs: 0-479px (small phones)
   - sm: 480-639px (phones)
   - md: 640-767px (large phones/small tablets)
   - lg: 768-1023px (tablets/iPads)
   - xl: 1024-1279px (laptops/small desktops)
   - xxl: 1280px+ (desktops/large screens)
   =========================================================================== */

/* === LARGE TABLETS & SMALL LAPTOPS (768px - 1023px) === */
@media (max-width:1023px) {

    /* Sidebar becomes a drawer on tablets */
    .sidebar {
        transform: translateX(-100%);
        width: 280px
    }

    .sidebar.mobile-open {
        transform: translateX(0)
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1
    }

    .sidebar-toggle {
        display: none
    }

    .sidebar-close {
        display: flex
    }

    /* Header adjustments */
    .top-header {
        left: 0 !important;
        padding: 0 16px
    }

    .top-header.sidebar-collapsed {
        left: 0 !important
    }

    .mobile-menu-toggle {
        display: flex
    }

    /* Content area */
    .content {
        margin-left: 0 !important;
        margin-top: 56px;
        padding: 20px
    }

    .content.sidebar-collapsed {
        margin-left: 0 !important
    }

    /* Form adjustments */
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))
    }

    /* Grid adjustments */
    .grid-2 {
        grid-template-columns: 1fr 1fr
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr
    }
}

/* === TABLETS & iPads (640px - 767px) === */
@media (max-width:767px) {

    /* Header */
    .header-brand {
        font-size: 13px;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .header-right {
        gap: 12px
    }

    .user-name {
        display: none
    }

    .logout-btn {
        width: 36px;
        height: 36px
    }

    /* Content padding */
    .content {
        padding: 16px
    }

    /* Grids collapse */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr
    }

    /* KPI grid */
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 10px
    }

    .kpi {
        padding: 10px
    }

    .kpi strong {
        font-size: 1.2rem
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr
    }

    /* Report actions wrap */
    .report-actions {
        gap: 6px
    }

    .report-actions .btn {
        flex: 1 1 calc(33.33% - 6px);
        min-width: 100px;
        padding: 8px 10px;
        font-size: 13px
    }
}

/* === LARGE PHONES (480px - 639px) === */
@media (max-width:639px) {

    /* Header more compact */
    .top-header {
        height: 52px;
        padding: 0 12px
    }

    .header-brand {
        display: none
    }

    .mobile-menu-toggle {
        width: 36px;
        height: 36px
    }

    .user-profile {
        gap: 6px
    }

    .user-role {
        padding: 3px 8px;
        font-size: 10px
    }

    /* Content */
    .content {
        margin-top: 52px;
        padding: 12px
    }

    /* Cards */
    .card {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 6px
    }

    /* KPI */
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .kpi {
        padding: 10px;
        border-radius: 6px
    }

    .kpi span {
        font-size: 12px
    }

    .kpi strong {
        font-size: 1.1rem
    }

    /* Tables - ensure horizontal scroll */
    table {
        min-width: 500px;
        font-size: 13px
    }

    th,
    td {
        padding: 8px 10px
    }

    /* Buttons stack on small screens */
    .report-actions {
        flex-direction: column
    }

    .report-actions .btn {
        width: 100%;
        justify-content: center
    }

    /* Header row */
    .header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px
    }

    .header-row .btn {
        width: 100%;
        justify-content: center
    }

    /* Page titles */
    h1 {
        font-size: 1.4rem;
        margin-bottom: 12px
    }

    h2 {
        font-size: 1.2rem
    }

    /* Sidebar wider on phones for better touch */
    .sidebar {
        width: 85vw;
        max-width: 300px
    }

    .sidebar nav a {
        padding: 14px 20px;
        font-size: 15px
    }
}

/* === SMALL PHONES (up to 479px) === */
@media (max-width:479px) {

    /* Even more compact header */
    .top-header {
        height: 48px;
        padding: 0 10px
    }

    .mobile-menu-toggle {
        width: 34px;
        height: 34px
    }

    .logout-btn {
        width: 34px;
        height: 34px
    }

    .user-role {
        padding: 2px 6px;
        font-size: 9px;
        letter-spacing: 0
    }

    /* Content */
    .content {
        margin-top: 48px;
        padding: 10px
    }

    /* Single column KPIs */
    .kpi-grid {
        grid-template-columns: 1fr
    }

    /* Cards */
    .card {
        padding: 10px
    }

    /* Forms */
    .form-grid input,
    .form-grid select,
    .form-grid textarea {
        padding: 10px;
        font-size: 16px
    }

    /* 16px prevents iOS zoom */
    .form-grid label {
        font-size: 13px
    }

    /* Tables */
    table {
        min-width: 400px;
        font-size: 12px
    }

    th,
    td {
        padding: 6px 8px
    }

    /* Sidebar full screen on very small phones */
    .sidebar {
        width: 100vw;
        max-width: none
    }

    /* Flash messages */
    .flash {
        padding: 10px 12px;
        font-size: 13px
    }

    /* Page titles */
    h1 {
        font-size: 1.25rem
    }
}

/* === LARGE DESKTOPS & WIDE SCREENS (1280px+) === */
@media (min-width:1280px) {
    .content {
        padding: 28px 32px
    }

    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))
    }

    .form-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr)
    }
}

/* === EXTRA LARGE SCREENS (1600px+) === */
@media (min-width:1600px) {
    .content {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        padding-left: calc(260px + 40px)
    }

    .content.sidebar-collapsed {
        padding-left: calc(70px + 40px)
    }

    .kpi-grid {
        grid-template-columns: repeat(5, 1fr)
    }

    .form-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

/* === REPORT STYLES === */
.report-container {
    max-width: 1100px;
    width: 100%
}

.report-header-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px
}

.report-header-cell {
    background: #FFD700;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    padding: 8px;
    border: 1px solid #000
}

.report-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px
}

.report-table th,
.report-table td {
    border: 1px solid #000;
    padding: 6px;
    font-size: 13px
}

.report-table th {
    background: #BDD7EE;
    text-align: center
}

.report-table td.num {
    text-align: center
}

.report-table td.kpa {
    font-weight: bold;
    vertical-align: top
}

.col-sn {
    width: 4%
}

.col-kpa {
    width: 22%
}

.col-kpi {
    width: 32%
}

.col-num {
    width: 8%
}

.col-cum {
    width: 12%
}

.col-rem {
    width: 22%
}

.report-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px
}

@media print {

    .report-actions,
    .sidebar,
    .filters,
    .btn,
    .header-row a {
        display: none !important
    }

    .content {
        margin: 0
    }

    .report-container {
        max-width: 100%
    }
}

/* === ACCORDION / COLLAPSIBLE === */
.accordion {
    margin-top: 12px;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    overflow: hidden
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    background: #eef4ff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1d2939;
    transition: background .2s
}

.accordion-header:hover {
    background: #dce8fa
}

.accordion-header.active {
    background: #d0dff5
}

.accordion-chevron {
    font-size: 16px;
    transition: transform .25s ease
}

.accordion-header.active .accordion-chevron {
    transform: rotate(90deg)
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease
}

.accordion-body.open {
    overflow: auto
}

.accordion-body table {
    border-top: none;
    margin: 0
}

.accordion-body table th:first-child,
.accordion-body table td:first-child {
    border-left: none
}

.accordion-body table th:last-child,
.accordion-body table td:last-child {
    border-right: none
}

.accordion-body table tr:last-child td {
    border-bottom: none
}

.accordion-body .muted {
    padding: 12px 14px
}

/* === KPA DASHBOARD CARDS === */
.kpa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin: 20px 0
}

.kpa-card {
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
    transition: box-shadow .2s, transform .2s
}

.kpa-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    transform: translateY(-2px)
}

.kpa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #2e67b1 0%, #1d4e89 100%);
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: background .2s;
    min-height: 60px
}

.kpa-header:hover {
    background: linear-gradient(135deg, #3672bc 0%, #255a99 100%)
}

.kpa-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0
}

.kpa-icon {
    font-size: 18px;
    flex-shrink: 0
}

.kpa-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word
}

.kpa-totals {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0
}

.kpa-total-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px
}

.kpa-total-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: .85;
    letter-spacing: .5px
}

.kpa-total-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2
}

.kpa-total-value.cumulative {
    color: #ffd700
}

.kpa-chevron {
    font-size: 12px;
    margin-left: 8px;
    transition: transform .3s ease;
    opacity: .8;
    flex-shrink: 0
}

.kpa-card.expanded .kpa-chevron {
    transform: rotate(90deg)
}

.kpa-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease-out;
    background: #f8fafc
}

.kpa-card.expanded .kpa-body {
    max-height: 600px;
    overflow: auto;
    -webkit-overflow-scrolling: touch
}

.kpa-indicators-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 500px
}

.kpa-indicators-table th {
    background: #eef4ff;
    color: #1d2939;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #d0d7e2;
    white-space: nowrap
}

.kpa-indicators-table th.num {
    text-align: center;
    width: 60px
}

.kpa-indicators-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e8ecf1;
    color: #374151
}

.kpa-indicators-table td.num {
    text-align: center;
    font-weight: 600;
    color: #2e67b1
}

.kpa-indicators-table td.remarks {
    color: #667085;
    font-size: 12px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.kpa-indicators-table tbody tr:hover {
    background: #f0f5ff
}

.kpa-indicators-table tbody tr:last-child td {
    border-bottom: none
}

/* KPA Card Color Variants */
.kpa-card:nth-child(1) .kpa-header {
    background: linear-gradient(135deg, #2e67b1 0%, #1d4e89 100%)
}

.kpa-card:nth-child(2) .kpa-header {
    background: linear-gradient(135deg, #0f766e 0%, #0d5c56 100%)
}

.kpa-card:nth-child(3) .kpa-header {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%)
}

.kpa-card:nth-child(4) .kpa-header {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%)
}

.kpa-card:nth-child(5) .kpa-header {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%)
}

.kpa-card:nth-child(6) .kpa-header {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%)
}

.kpa-card:nth-child(7) .kpa-header {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%)
}

.kpa-card:nth-child(8) .kpa-header {
    background: linear-gradient(135deg, #65a30d 0%, #4d7c0f 100%)
}

.kpa-card:nth-child(9) .kpa-header {
    background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%)
}

/* Responsive */
@media (max-width:767px) {
    .kpa-grid {
        grid-template-columns: 1fr;
        gap: 12px
    }

    .kpa-header {
        padding: 12px 14px;
        flex-wrap: wrap;
        gap: 10px
    }

    .kpa-title {
        width: 100%;
        order: 1
    }

    .kpa-totals {
        order: 2;
        width: 100%;
        justify-content: flex-start;
        gap: 16px
    }

    .kpa-chevron {
        order: 3;
        position: absolute;
        right: 14px;
        top: 16px
    }

    .kpa-header {
        position: relative
    }

    .kpa-name {
        font-size: 13px
    }

    .kpa-total-value {
        font-size: 16px
    }

    .kpa-indicators-table {
        font-size: 12px
    }

    .kpa-indicators-table th,
    .kpa-indicators-table td {
        padding: 8px 10px
    }
}

@media (max-width:479px) {
    .kpa-header {
        padding: 10px 12px
    }

    .kpa-totals {
        gap: 12px
    }

    .kpa-total-item {
        min-width: 40px
    }

    .kpa-total-label {
        font-size: 9px
    }

    .kpa-total-value {
        font-size: 14px
    }
}

/* === REQUIRED FIELD INDICATOR === */
.required {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px
}

.validation-error {
    color: #dc3545;
    padding: 10px;
    margin-top: 10px;
    background: #f8d7da;
    border-radius: 5px;
    border: 1px solid #f5c6cb
}

/* === DASHBOARD FILTERS === */
.dashboard-filters {
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05)
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.filter-group label {
    font-weight: 600;
    font-size: 13px;
    color: #374151
}

.filter-group select,
.filter-group input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    min-height: 44px;
    width: 100%
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #2e67b1;
    box-shadow: 0 0 0 3px rgba(46, 103, 177, .15)
}

.filter-group select:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap
}

.btn-reset {
    background: #fff;
    border: 1px solid #d0d7e2;
    color: #374151;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background .2s, border-color .2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.btn-reset:hover {
    background: #f3f4f6;
    border-color: #9ca3af
}

.filter-error {
    color: #b91c1c;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fee2e2;
    border-radius: 6px
}

/* Dashboard Filters Responsive */
@media (max-width:1023px) {
    .filter-row {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:639px) {
    .dashboard-filters {
        padding: 14px
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px
    }

    .filter-group select,
    .filter-group input {
        font-size: 16px
    }

    /* Prevent iOS zoom */
    .filter-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px
    }

    .filter-actions .btn,
    .filter-actions .btn-reset {
        width: 100%;
        text-align: center;
        justify-content: center
    }
}

@media (max-width:479px) {
    .dashboard-filters {
        padding: 12px;
        border-radius: 8px
    }

    .filter-group label {
        font-size: 12px
    }
}