/* Reset default browser spacing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Restore Open Iconic font-family overridden by the global * reset */
.oi[data-glyph]::before,
.oi::before {
    font-family: 'Icons' !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #f4f6f9;
    color: #333;
}

/* --- STATIC HEADER --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-color: #ffffff;
    color: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    z-index: 1000;
}

/* --- FULL-WIDTH ACCENT BAR (MAGENTA, WHITE, CYAN) --- */
.header-accent-bar {
    position: fixed;
    top: 120px; /* Sits directly below the 60px header */
    left: 0;
    width: 100%;
    height: 16px;
    z-index: 1000;
    /* Creates a 4px magenta line, 3px white gap, and 9px cyan bar */
    background: linear-gradient(
        to bottom,
        #ff00ff 0px,
        #ff00ff 4px,
        #ffffff 4px,
        #ffffff 7px,
        #00ffff 7px,
        #00ffff 16px
    );
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

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

/* Clickable wrapper for logo and title */
.brand-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.logo {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    border-radius: 4px;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.login-btn {
    background-color: #0284c7;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.login-btn:hover {
    background-color: #0369a1;
}

.user-name {
    font-weight: 500;
    color: #000000;
    margin-right: 15px;
}

/* --- PAGE WRAPPER & SIDEBAR --- */
.page-wrapper {
    display: flex;
    /* Offsets the fixed header + accent bar (136px) and fixed footer (50px) */
    margin-top: 136px; 
    margin-bottom: 50px;
    min-height: calc(100vh - 186px);
}

.sidebar {
    position: fixed;
    top: 136px;
    bottom: 50px;
    left: 0;
    width: 220px;
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding-top: 20px;
    overflow-y: auto;
}

.side-nav ul {
    list-style: none;
}

.side-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #334155;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.side-nav li a .oi {
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    flex-shrink: 0;
    transition: color 0.2s;
}

.side-nav li a:hover,
.side-nav li a.active {
    background-color: #e2e8f0;
    color: #0f172a;
    border-left: 4px solid #0284c7;
    padding-left: 21px;
}

.side-nav li a:hover .oi,
.side-nav li a.active .oi {
    color: #0284c7;
}

/* --- SIDEBAR SECTION DIVIDER FOR APPLICATIONS --- */
.nav-section-divider {
    margin: 18px 25px 8px 25px;
    padding-top: 14px;
    border-top: 1px solid #cbd5e1;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    margin-left: 220px;
    padding: 30px;
    width: calc(100% - 220px);
}

.main-content h2 {
    margin-bottom: 15px;
    color: #1e293b;
}

.main-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

/* --- FIXED FOOTER --- */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #e2e8f0;
    color: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    font-size: 0.75rem;
    border-top: 1px solid #cbd5e1;
    z-index: 1000;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer-left a,
.footer-right a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-left a:hover,
.footer-right a:hover {
    color: #0284c7;
    text-decoration: underline;
}

.footer-divider {
    margin: 0 10px;
    color: #64748b;
}

/* --- MOBILE MENU TOGGLE & BACKDROP (DESKTOP DEFAULTS) --- */
.mobile-menu-btn,
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    color: #0f172a;
    cursor: pointer;
    margin-right: 12px;
}

.mobile-menu-btn:hover,
.menu-toggle:hover {
    background-color: #f1f5f9;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 136px; /* Fixed: aligns cleanly below the 120px header + 16px accent bar */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 998;
}

.sidebar-backdrop.show {
    display: block;
}

/* --- RESPONSIVE BREAKPOINT (TABLETS & PHONES <= 768PX) --- */
@media (max-width: 768px) {
    .mobile-menu-btn,
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-header {
        padding: 0 12px;
    }

    .header-left {
        gap: 10px;
    }

    .site-title {
        font-size: 1.05rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .user-name {
        display: none;
    }

    .login-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
        z-index: 999;
        bottom: 0;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px 15px;
    }

    .page-wrapper {
        margin-bottom: 85px;
    }

    .site-footer {
        height: auto;
        min-height: 75px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 10px 15px;
        gap: 6px;
        font-size: 0.78rem;
    }

    .footer-right {
        gap: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =========================================================
   UNIFIED AUTH & SYSTEM PAGE CARDS (PayChannel Theme)
   ========================================================= */
.auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 30px 32px;
    max-width: 440px;
    margin: 10px auto 25px auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

/* Signature PayChannel Magenta -> Blue -> Cyan top bar */
.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #ff00ff 0%, #0284c7 50%, #00ffff 100%);
}

.auth-card-wide {
    max-width: 680px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 22px 18px;
    }

    .form-row-2col {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.req {
    color: #ef4444;
}

.auth-card h2 {
    margin-top: 0;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 600;
}

.auth-subtitle {
    margin-top: 0;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.85rem;
}

.form-control {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    padding: 10px 12px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.92rem;
    color: #1e293b;
    box-sizing: border-box;
    margin: 0;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.password-field-group {
    position: relative;
    width: 100%;
    display: block;
}

.password-field-group .form-control {
    padding-right: 40px !important;
}

.password-toggle-icon {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    z-index: 5;
}

.password-toggle-icon:hover {
    color: #0284c7;
}

.btn-primary-full {
    width: 100%;
    padding: 11px 16px;
    background-color: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 6px;
}

.btn-primary-full:hover {
    background-color: #0369a1;
}

.btn-primary-full:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* Status Alerts */
.alert-box,
.contact-alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.alert-error,
.contact-alert.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
}

.alert-success,
.contact-alert.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
}

.auth-footer-links {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
}

.auth-footer-links a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer-links a:hover {
    text-decoration: underline;
}

.password-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.35;
}
