/**
 * HRIS Modern White & Blue Admin Theme
 * Clean, lightweight, professional dashboard styles
 */

:root {
    --hris-primary: #1d4ed8;
    --hris-primary-light: #3b82f6;
    --hris-primary-soft: #eff6ff;
    --hris-bg: #f8fafc;
    --hris-card-bg: #ffffff;
    --hris-sidebar-bg: #ffffff;
    --hris-border: #e2e8f0;
    --hris-text-main: #0f172a;
    --hris-text-muted: #64748b;
    --hris-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --hris-shadow-md: 0 4px 12px rgba(15,23,42,0.05);
}

body {
    background-color: var(--hris-bg);
    color: var(--hris-text-main);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

body.admin-page {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.admin-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}

.admin-sidebar {
    width: 250px;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1020;
    background: var(--hris-sidebar-bg);
    border-right: 1px solid var(--hris-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--hris-border);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.brand-text {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    color: #0f172a;
}

.sidebar-menu {
    padding: 16px 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.menu-heading {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 8px 12px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 3px;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.sidebar-link > i:first-child {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background-color: #f1f5f9;
    color: #1d4ed8;
}

.sidebar-link.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.sidebar-link .chevron-icon {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s ease;
}

.sidebar-link[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
}

.sidebar-menu-group > summary {
    display: flex;
    list-style: none;
}

.sidebar-menu-group > summary::-webkit-details-marker {
    display: none;
}

.sidebar-menu-group > summary::marker {
    content: "";
}

.sidebar-menu-group[open] > summary .chevron-icon {
    transform: rotate(180deg);
}

.sidebar-submenu {
    padding-left: 12px;
    margin: 4px 0 8px;
    border-left: 2px solid #e2e8f0;
    margin-left: 20px;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: all 0.15s ease;
}

.sidebar-sublink:hover {
    color: #1d4ed8;
    background-color: #f1f5f9;
}

.sidebar-sublink.active {
    color: #1d4ed8;
    font-weight: 700;
    background-color: #eff6ff;
}

.sidebar-sublink i {
    font-size: 13px;
    color: #94a3b8;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-sublink:hover i,
.sidebar-sublink.active i {
    color: #2563eb;
}

.admin-main {
    position: fixed;
    inset: 0 0 0 250px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.admin-topbar {
    height: 64px;
    flex: 0 0 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--hris-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.lang-pill {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid var(--hris-border);
    border-radius: 20px;
    padding: 2px;
    gap: 2px;
}

.lang-pill a {
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 16px;
    color: #64748b;
}

.lang-pill a.active {
    background: #ffffff;
    color: #1d4ed8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.admin-content {
    padding: 24px 28px;
    flex: 1 1 0%;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.hero-banner {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border-radius: 14px;
    padding: 24px 28px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.25);
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--hris-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--hris-shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hris-shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.admin-card {
    background: #ffffff;
    border: 1px solid var(--hris-border);
    border-radius: 12px;
    box-shadow: var(--hris-shadow-sm);
    margin-bottom: 20px;
}

.admin-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--hris-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.admin-card-body {
    padding: 20px;
}

.badge-role-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-role-superadmin { background: #ede9fe; color: #6d28d9; }
.badge-role-admin { background: #dbeafe; color: #1d4ed8; }
.badge-role-hr { background: #dcfce7; color: #15803d; }
.badge-role-manager { background: #fef3c7; color: #b45309; }
.badge-role-employee { background: #f1f5f9; color: #475569; }
