:root {
    --app-bg: #f4f7fb;
    --primary: #0d6efd;
    --primary-dark: #075bd8;
    --text-main: #162033;
    --text-muted: #6b7280;
    --card-border: #edf0f5;
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
    background: var(--app-bg);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-navbar {
    background: linear-gradient(135deg, #0d6efd 0%, #084fc7 100%);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.25);
}

.navbar-brand {
    letter-spacing: -0.3px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 800;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    margin-right: 0.2rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.user-name {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.1;
}

.user-role {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    text-transform: capitalize;
}

.app-main {
    min-height: calc(100vh - 64px);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 0 0.5rem;
}

.page-label {
    display: inline-block;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.page-title {
    font-size: clamp(1.7rem, 2.5vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.2rem;
}

.page-subtitle {
    color: var(--text-muted);
    margin-bottom: 0;
}

.metric-card,
.panel-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.metric-card {
    min-height: 155px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.metric-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: inline-block;
    flex-shrink: 0;
}

.bg-primary-soft {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.bg-success-soft {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.bg-warning-soft {
    background: rgba(255, 193, 7, 0.18);
    color: #996c00;
}

.bg-dark-soft {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

.metric-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
    letter-spacing: -0.04em;
}

.metric-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.metric-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.panel-card {
    padding: 1.4rem;
    min-height: 280px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.panel-header h5 {
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.panel-header p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.92rem;
}

.empty-state {
    min-height: 170px;
    border: 1px dashed #d9dee8;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    background: #fafbfe;
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.empty-state h6 {
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.status-list {
    display: grid;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.status-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-item strong {
    font-size: 0.9rem;
}

.app-navbar .dropdown-menu {
    border-radius: 6px;
    border: 1px solid rgba(17, 17, 17, 0.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.app-navbar .dropdown-item {
    font-size: 13px;
    font-weight: 600;
}

.app-navbar .dropdown-item.active,
.app-navbar .dropdown-item:active {
    background: rgba(17, 17, 17, 1);
    color: rgba(255, 204, 0, 1);
}

.app-navbar .dropdown-item:hover {
    background: rgba(255, 204, 0, 0.18);
    color: rgba(17, 17, 17, 1);
}

@media (max-width: 768px) {
    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-card {
        min-height: auto;
    }
}