/* ORE Dashboard — lime accent health-analytics style */

:root {
    --dash-bg: #f3f4f6;
    --dash-surface: #ffffff;
    --dash-ink: #111827;
    --dash-muted: #6b7280;
    --dash-line: #e8eaee;
    --dash-lime: #c8f31d;
    --dash-lime-soft: #eef9c8;
    --dash-lime-dark: #9bc400;
    --dash-dark: #1f2937;
    --dash-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
    --dash-radius: 24px;
    --dash-radius-sm: 16px;
}

body.admin-dashboard-body,
body.dash-auth-body {
    margin: 0;
    font-family: "Inter", "Roboto", sans-serif;
    background: var(--dash-bg);
    color: var(--dash-ink);
}

.admin-shell,
.dash-shell {
    display: flex;
    min-height: 100vh;
}

/* Icon rail sidebar */
.dash-rail {
    width: 92px;
    padding: 1.25rem .85rem;
    background: var(--dash-surface);
    border-right: 1px solid var(--dash-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.dash-rail-brand {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    overflow: hidden;
    display: block;
    box-shadow: var(--dash-shadow);
}

.dash-rail-brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-rail-nav {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    width: 100%;
    flex: 1;
}

.dash-rail-nav a {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--dash-muted);
    text-decoration: none;
    transition: .2s ease;
    font-size: 1.05rem;
    position: relative;
}

.dash-rail-nav a:hover,
.dash-rail-nav a.active {
    background: var(--dash-lime);
    color: var(--dash-ink);
    box-shadow: 0 10px 24px rgba(200, 243, 29, 0.35);
}

.dash-rail-nav a span {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--dash-dark);
    color: #fff;
    padding: .35rem .65rem;
    border-radius: 10px;
    font-size: .75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
    z-index: 5;
}

.dash-rail-nav a:hover span {
    opacity: 1;
}

.dash-rail-footer {
    text-align: center;
    font-size: .72rem;
    color: var(--dash-muted);
    line-height: 1.3;
}

.dash-rail-footer strong {
    display: block;
    color: var(--dash-ink);
    font-size: .8rem;
}

/* Legacy sidebar mapped to rail look */
.admin-sidebar {
    width: 92px;
    padding: 1.25rem .85rem;
    background: var(--dash-surface);
    border-right: 1px solid var(--dash-line);
    color: var(--dash-ink);
}

.admin-brand {
    flex-direction: column;
    text-align: center;
    margin-bottom: 1.25rem;
}

.admin-brand img {
    width: 52px;
    height: 52px;
    border-radius: 18px;
}

.admin-brand strong,
.admin-brand span {
    display: none;
}

.admin-nav {
    gap: .65rem;
}

.admin-nav a {
    justify-content: center;
    padding: 0;
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 18px;
    color: var(--dash-muted);
}

.admin-nav a span {
    display: none;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--dash-lime);
    color: var(--dash-ink);
}

.admin-sidebar-footer {
    background: transparent;
    padding: .5rem 0;
    text-align: center;
    font-size: .72rem;
}

.admin-sidebar-footer small {
    color: var(--dash-muted);
}

.admin-main,
.dash-main {
    flex: 1;
    padding: 1.5rem 1.75rem 2rem;
    min-width: 0;
}

/* Header */
.dash-header,
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--dash-lime);
    color: var(--dash-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}

.dash-greeting,
.admin-eyebrow {
    margin: 0 0 .15rem;
    color: var(--dash-muted);
    font-size: .9rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.dash-title,
.admin-topbar h1 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.dash-subtitle,
.admin-subtitle {
    color: var(--dash-muted);
    margin-top: .35rem;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.dash-date-pill,
.dash-role-pill {
    padding: .55rem .9rem;
    border-radius: 999px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-line);
    font-size: .85rem;
    font-weight: 600;
    color: var(--dash-muted);
}

.dash-role-pill {
    background: var(--dash-lime-soft);
    color: var(--dash-ink);
    border-color: transparent;
}

.admin-user-chip {
    background: var(--dash-surface);
    color: var(--dash-ink);
    border: 1px solid var(--dash-line);
    box-shadow: none;
}

.admin-user-chip i {
    background: var(--dash-lime);
    color: var(--dash-ink);
}

/* Cards */
.dash-card,
.admin-panel,
.admin-stat-card,
.admin-feature-card,
.admin-form-panel {
    background: var(--dash-surface);
    border: 1px solid var(--dash-line);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
}

.dash-card {
    padding: 1.35rem 1.5rem;
    height: 100%;
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-card-header h3,
.admin-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.dash-card-header p,
.admin-panel-header p {
    margin: .25rem 0 0;
    color: var(--dash-muted);
    font-size: .9rem;
}

.dash-metric {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
}

.dash-metric-label {
    color: var(--dash-muted);
    font-size: .88rem;
    font-weight: 600;
}

.dash-trend-up {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: var(--dash-lime-soft);
    color: #3f6212;
    font-size: .8rem;
    font-weight: 700;
}

.dash-trend-down {
    background: #fee2e2;
    color: #991b1b;
}

.dash-chart-wrap,
.admin-chart-wrap {
    position: relative;
    height: 280px;
}

.dash-chart-wrap-sm {
    height: 180px;
}

/* Stat cards */
.admin-stat-card {
    border: 1px solid var(--dash-line);
    align-items: center;
}

.admin-stat-card h2 {
    font-size: 2rem;
    font-weight: 800;
}

.admin-stat-icon {
    background: var(--dash-lime) !important;
    color: var(--dash-ink) !important;
    border-radius: 18px;
}

.admin-stat-primary .admin-stat-icon,
.admin-stat-success .admin-stat-icon,
.admin-stat-dark .admin-stat-icon {
    background: var(--dash-lime) !important;
}

/* Actions & features */
.admin-action-card,
.admin-feature-card {
    border: 1px solid var(--dash-line);
    background: #fafafa;
}

.admin-action-card:hover,
.admin-feature-card:hover {
    background: var(--dash-lime-soft);
    transform: translateY(-2px);
}

.admin-action-card i,
.admin-feature-icon {
    background: var(--dash-dark) !important;
    color: #fff !important;
}

.admin-feature-card span {
    color: var(--dash-ink);
}

.admin-panel-header {
    border-bottom-color: var(--dash-line);
}

.admin-table thead th {
    background: #fafafa;
}

.admin-role-pill {
    background: var(--dash-lime-soft);
    color: #365314;
}

.admin-user-avatar {
    background: var(--dash-lime-soft);
    color: var(--dash-ink);
}

/* Auth / login */
.dash-auth-body {
    background: var(--dash-bg);
}

.dash-auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
}

.dash-auth-trends {
    padding: 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
    border-right: 1px solid var(--dash-line);
}

.dash-auth-trends-inner {
    max-width: 720px;
    margin: 0 auto;
}

.dash-auth-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.5rem;
}

.dash-auth-brand img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.dash-auth-brand strong {
    font-size: 1.1rem;
}

.dash-auth-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: .75rem;
}

.dash-auth-hero p {
    color: var(--dash-muted);
    max-width: 520px;
}

.dash-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.dash-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-line);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--dash-shadow);
}

.dash-login-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: .35rem;
}

.dash-login-card .form-control {
    min-height: 52px;
    border-radius: 14px;
    border-color: var(--dash-line);
}

.dash-login-card .form-control:focus {
    border-color: var(--dash-lime-dark);
    box-shadow: 0 0 0 .2rem rgba(200, 243, 29, 0.25);
}

.btn-dash-primary,
.btn-primary.btn-auth-submit {
    background: var(--dash-lime);
    border-color: var(--dash-lime);
    color: var(--dash-ink);
    font-weight: 700;
    border-radius: 14px;
    min-height: 52px;
}

.btn-dash-primary:hover,
.btn-primary.btn-auth-submit:hover {
    background: var(--dash-lime-dark);
    border-color: var(--dash-lime-dark);
    color: var(--dash-ink);
}

.dash-pill-tabs {
    display: inline-flex;
    gap: .35rem;
    padding: .25rem;
    background: #f3f4f6;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.dash-pill-tabs span {
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--dash-muted);
}

.dash-pill-tabs span.active {
    background: var(--dash-surface);
    color: var(--dash-ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.admin-alert {
    border-radius: 14px;
}

@media (max-width: 991.98px) {
    .dash-auth-layout {
        grid-template-columns: 1fr;
    }

    .dash-auth-trends {
        border-right: none;
        border-bottom: 1px solid var(--dash-line);
    }

    .admin-shell,
    .dash-shell {
        flex-direction: column;
    }

    .dash-rail,
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .admin-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .dash-header,
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .admin-main,
    .dash-main {
        padding: 1rem;
    }

    .dash-title,
    .admin-topbar h1 {
        font-size: 1.45rem;
    }
}
