/* ABVMU Dashboard layout */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.dashboard-body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f0f4f8;
    color: #1e293b;
    min-height: 100vh;
}

/* ----- Header ----- */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.dashboard-header__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dashboard-header__logo {
    height: 56px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.dashboard-header__title {
    font-size: 15px;
    font-weight: 700;
    color: #b91c1c;
    line-height: 1.3;
}

.dashboard-header__title span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.dashboard-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.dashboard-header__user-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-width: min(100%, 520px);
}

.dashboard-header__user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dashboard-header__avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e84b5, #0d5d82);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dashboard-header__user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: left;
}

.dashboard-header__user-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    line-height: 1.2;
}

.dashboard-header__user-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-header__user-email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.3;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-header__user-email i {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

.dashboard-header__logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #0d5d82;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.dashboard-header__logout:hover {
    background: #e0f2fe;
    border-color: #1e84b5;
    color: #0d5d82;
}

.dashboard-header__logout--solo {
    color: #fff;
    background: #1e84b5;
    border-color: #1e84b5;
}

.dashboard-header__logout--solo:hover {
    background: #0d5d82;
    border-color: #0d5d82;
    color: #fff;
}

.dashboard-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 22px;
    color: #1e1e5a;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
}

.dashboard-header__toggle:hover {
    background: #e2e8f0;
}

/* ----- Navigation ----- */

.dashboard-nav {
    background: #1e1e5a;
    border-bottom: 3px solid #1e84b5;
}

.dashboard-nav__inner {
    display: flex;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
}

.dashboard-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.dashboard-nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-nav__link.is-active {
    color: #fff;
    background: rgba(30, 132, 181, 0.25);
    border-bottom-color: #5ec4f0;
}

.dashboard-nav__link i {
    font-size: 14px;
    opacity: 0.9;
}

/* ----- Main content ----- */

.dashboard-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.dashboard-page-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.dashboard-page-subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 24px;
}

.dashboard-welcome-card {
    background: linear-gradient(135deg, #1e84b5 0%, #0d5d82 100%);
    color: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(30, 132, 181, 0.25);
}

.dashboard-welcome-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-welcome-card p {
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.5;
    max-width: 640px;
}

/* Stats cards — placeholder until backend is ready */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.dashboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.dashboard-card__label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
}

.dashboard-card__value {
    font-size: 32px;
    font-weight: 700;
    color: #1e84b5;
    line-height: 1;
}

.dashboard-card__value.is-muted {
    font-size: 18px;
    color: #94a3b8;
}

.dashboard-placeholder {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    color: #64748b;
}

.dashboard-placeholder i {
    font-size: 40px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.dashboard-placeholder h3 {
    font-size: 18px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.dashboard-placeholder p {
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ----- Mobile ----- */

@media (max-width: 768px) {
    .dashboard-header {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .dashboard-header__title {
        display: none;
    }

    .dashboard-header__user-panel {
        padding: 4px 4px 4px 8px;
        max-width: calc(100vw - 120px);
    }

    .dashboard-header__user-label,
    .dashboard-header__user-email {
        display: none;
    }

    .dashboard-header__user-name {
        max-width: 140px;
        font-size: 13px;
    }

    .dashboard-header__avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .dashboard-header__logout span {
        display: none;
    }

    .dashboard-header__logout {
        padding: 9px 11px;
    }

    .dashboard-header__toggle {
        display: inline-flex;
    }

    .dashboard-header__actions {
        gap: 8px;
    }

    .dashboard-nav__inner {
        display: none;
        flex-direction: column;
        padding: 8px 0 12px;
    }

    .dashboard-nav__inner.is-open {
        display: flex;
    }

    .dashboard-nav__link {
        width: 100%;
        border-bottom: none;
        margin-bottom: 0;
        border-left: 3px solid transparent;
    }

    .dashboard-nav__link.is-active {
        border-left-color: #5ec4f0;
        border-bottom-color: transparent;
    }

    .dashboard-main {
        padding: 16px;
    }

    .dashboard-page-title {
        font-size: 22px;
    }

    .dashboard-welcome-card {
        padding: 20px;
    }
}

/* ----- Guest header (login / OTP) ----- */

body.guest-body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f6f8;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header--guest {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.site-header__logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.site-header__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.site-header__text strong {
    font-size: 16px;
    color: #b91c1c;
}

.site-header__text span {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.site-header__link {
    font-size: 14px;
    font-weight: 600;
    color: #1e84b5;
    text-decoration: none;
}

.site-header__link:hover {
    color: #0d5d82;
}

.dashboard-header__brand-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

/* ----- Site footer ----- */

.site-footer {
    margin-top: auto;
    background: #1e1e5a;
    color: rgba(255, 255, 255, 0.85);
    padding: 16px 24px;
}

.site-footer__inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.site-footer p {
    font-size: 13px;
    margin: 0;
}

.guest-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 15px;
}
