/* Yefwe Portal - admin shell theme (sidebar + topbar + cards). */

:root {
    --portal-sidebar-bg: #16213a;
    --portal-sidebar-bg-active: #1f2e52;
    --portal-sidebar-text: #aab4d4;
    --portal-sidebar-text-active: #ffffff;
    --portal-accent: #4a6cf7;
    --portal-bg: #f4f6fb;
    --portal-card-border: #e7eaf3;
    --portal-sidebar-width: 240px;
}

html, body {
    background: var(--portal-bg);
}

/* ---- App shell ---- */

.portal-shell {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: var(--portal-sidebar-width);
    flex-shrink: 0;
    background: var(--portal-sidebar-bg);
    color: var(--portal-sidebar-text);
    display: flex;
    flex-direction: column;
}

.portal-sidebar .portal-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.1rem 1.25rem;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.portal-sidebar .portal-brand .bi {
    font-size: 1.3rem;
    color: var(--portal-accent);
}

.portal-nav {
    flex: 1;
    padding: .75rem 0;
}

.portal-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--portal-sidebar-text);
    padding: .55rem 1.25rem;
    font-size: .92rem;
    border-left: 3px solid transparent;
}

.portal-nav .nav-link .bi {
    font-size: 1.05rem;
    width: 1.2rem;
    text-align: center;
}

.portal-nav .nav-link:hover {
    color: var(--portal-sidebar-text-active);
    background: rgba(255, 255, 255, .04);
}

.portal-nav .nav-link.active {
    color: var(--portal-sidebar-text-active);
    background: var(--portal-sidebar-bg-active);
    border-left-color: var(--portal-accent);
}

.portal-sidebar-footer {
    padding: .9rem 1.25rem;
    font-size: .75rem;
    color: rgba(255, 255, 255, .35);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.portal-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--portal-card-border);
    padding: .75rem 1.5rem;
}

.portal-topbar .breadcrumb {
    margin: 0;
    font-size: .85rem;
}

.portal-user-badge {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.portal-role-badge {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.portal-content {
    flex: 1;
    padding: 1.5rem;
}

/* ---- Cards ---- */

.portal-card {
    background: #fff;
    border: 1px solid var(--portal-card-border);
    border-radius: .6rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    margin-bottom: 1.25rem;
}

.portal-card-header {
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--portal-card-border);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.portal-card-body {
    padding: 1.25rem;
}

/* ---- KPI tiles ---- */

.portal-kpi {
    background: #fff;
    border: 1px solid var(--portal-card-border);
    border-radius: .6rem;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.portal-kpi .portal-kpi-label {
    font-size: .78rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.portal-kpi .portal-kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a1f36;
}

.portal-kpi .bi {
    font-size: 1.4rem;
    color: var(--portal-accent);
}

/* ---- Login page ---- */

.portal-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--portal-sidebar-bg), #2c3a63);
}

.portal-login-card {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    padding: 2.25rem;
    width: 100%;
    max-width: 380px;
}

.portal-login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.portal-login-brand .bi {
    font-size: 2.2rem;
    color: var(--portal-accent);
}

/* ---- Misc ---- */

.not-set {
    color: #c55;
    font-style: italic;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

.form-group {
    margin-bottom: 1rem;
}

.portal-chart-wrap {
    position: relative;
    height: 260px;
}

@media (max-width: 767px) {
    .portal-shell {
        flex-direction: column;
    }

    .portal-sidebar {
        width: 100%;
    }
}
