/* ============================================================
   Color palette (preserved):
     Header bg:    #0f172a → #1e1b4b  (deep navy gradient)
     Header border: rgb(63,24,235)  (blue)
     Sidebar bg:   #3c3c3d  (dark gray)
     Sidebar border:#738ede (light blue)
     Heading:      #b30000  (dark red)
     Footer bg:    #0d0c0c  (near black)
     Footer text:  #fcfcd4  (cream)
     Table th bg:  #f5ee8e  (pale yellow)
============================================================ */

/* ---- Base ---- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
body {
    background: #f4f6f9;
    font-family: "Inter", sans-serif;
}
td {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 13px;
}
th {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
    color: #000;
    background: #f5ee8e;
}
table, tr, th, thead, tbody, td {
    border: 2px solid #444;
    border-collapse: collapse;
}

/* ---- Utilities ---- */
.no-padding  { padding: 0; }
.padding-10  { padding: 10px; }
.padding-20  { padding: 20px; }
.font-color-fff    { color: #fff; }
.font-color-F9F871 { color: #f9f871; }
.font-color-red    { color: red; }

/* ---- Header ---- */
.admin-header {
    background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
    border-bottom: 3px solid #ffdf00;
    box-shadow: 0 3px 12px rgba(0,0,0,0.28);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    flex-wrap: nowrap;
}
.admin-header .app-logo {
    height: 50px;
    width: auto;
}
.admin-header .app-name {
    font-family: "Sora", sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #ffdf00;
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.admin-header .app-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.user-pill {
    background: rgba(255,255,255,0.10);
    border: 1.5px solid rgba(255,255,255,0.22);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    border-radius: 20px;
    padding: 4px 12px 4px 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.user-pill:hover { background: rgba(255,255,255,0.20); }
.user-initial {
    width: 28px;
    height: 28px;
    background: #ffdf00;
    color: #0f172a;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- Sidebar ---- */
.admin-menu {
    border-right: 4px solid #738ede;
    background: #3c3c3d;
    min-height: calc(100vh - 72px);
}
/* Role badge inside sidebar */
.sidebar-role {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffdf00;
    padding: 14px 14px 5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 2px;
}
/* ---- Accordion sidebar menu ---- */
.acc-menu { background: #3c3c3d; }

.acc-item {
    display: block;
    padding: 11px 38px 11px 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
    position: relative;
    transition: background 0.15s;
    font-family: "Inter", sans-serif;
}
.acc-item:hover {
    background: rgba(255,255,255,0.10);
    color: #fff;
    text-decoration: none;
}
.acc-toggle::after {
    content: "\f054";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #ffdf00;
    transition: transform 0.2s;
}
.acc-toggle[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(90deg);
}
.acc-sub {
    display: block;
    padding: 8px 16px 8px 28px;
    color: #bbb;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: #2e2e2f;
    font-family: "Inter", sans-serif;
    transition: background 0.15s, color 0.15s;
}
.acc-sub:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}
.acc-section-title {
    padding: 18px 20px 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    font-family: "Sora", sans-serif;
    border-top: 1px solid rgba(255,255,255,0.10);
    margin-top: 6px;
}

/* ---- Main Content ---- */
.main-content {
    min-height: calc(100vh - 120px);
    overflow: auto;
    padding: 16px;
    background: #f4f6f9;
}

/* ---- Scrollbars ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { box-shadow: inset 0 0 5px grey; border-radius: 7px; }
::-webkit-scrollbar-thumb { background: #738ede; border-radius: 7px; }
::-webkit-scrollbar-thumb:hover { background: rgb(63,24,235); }

/* ---- Page Title Bar ---- */
.page-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 2px solid #0f766e;
    padding-bottom: 8px;
    margin-bottom: 14px;
}
.page-title {
    font-family: "Sora", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f766e;
}
.heading {
    font-family: "Sora", sans-serif;
    color: #b30000;
}

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.09);
}
.card-header-yellow {
    background: #ffdf00;
    color: #000;
    border-bottom: 2px solid #0f766e;
    border-radius: 6px 6px 0 0;
    padding: 9px 14px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-header-dark {
    background: #0f766e;
    color: #fff;
    border-radius: 6px 6px 0 0;
    padding: 9px 14px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.count-badge {
    background: #0f766e;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ---- Tables ---- */
.table-div-scroll {
    overflow-x: auto;
}
.admin-table thead th {
    background: #f5ee8e;
    color: #000;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.admin-table tbody tr:hover td { background-color: #fffde7 !important; }
.admin-table td { vertical-align: middle; }

/* ---- Action buttons (inside tables) ---- */
.act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
    transition: transform 0.1s, color 0.15s;
    cursor: pointer;
}
.act-btn:hover { transform: scale(1.18); text-decoration: none; }
.act-view   { color: rgb(63,24,235); }
.act-edit   { color: #b87a00; }
.act-delete { color: #b30000; }

/* ---- Alerts ---- */
.alert {
    border-radius: 5px;
    border-left: 4px solid;
    font-size: 13px;
}
.alert-success { border-left-color: #198754; }
.alert-danger  { border-left-color: #b30000; }
.alert-warning { border-left-color: #d68910; }
.alert-info    { border-left-color: #738ede; }

/* ---- Footer ---- */
.footer {
    background-color: #0d0c0c;
    color: #fcfcd4;
    min-height: 40px;
    border-top: 3px solid rgb(63,24,235);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 12px;
}

/* ---- Forms ---- */
.form-control:focus {
    border-color: #738ede;
    box-shadow: 0 0 0 0.2rem rgba(115,142,222,0.25);
}
.field-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
    margin-bottom: 12px;
    font-family: "Sora", sans-serif;
}

/* ---- Dashboard ---- */
.welcome-banner {
    background: linear-gradient(135deg, #ffdf00 0%, #ffe84d 100%);
    border: none;
    border-bottom: 4px solid rgb(63,24,235);
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.welcome-icon {
    width: 52px;
    height: 52px;
    background: rgb(63,24,235);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffdf00;
    font-size: 22px;
    flex-shrink: 0;
}
.welcome-title {
    font-family: "Sora", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #000;
}
.welcome-sub {
    font-size: 12px;
    color: #333;
    margin-top: 2px;
}
.section-label {
    font-family: "Sora", sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}
.quick-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 5px rgba(0,0,0,0.09);
    border: 1.5px solid #e8e8e8;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    border-color: #738ede;
    text-decoration: none;
    color: #000;
}
.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}
.quick-label {
    font-size: 12px;
    font-weight: 600;
    font-family: "Inter", sans-serif;
}
.info-note {
    background: #f0f4ff;
    border: 1px solid #c5d0f0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    color: #444;
}

/* ---- Pagination ---- */
.pagination .page-link {
    color: rgb(63,24,235);
    border-color: #d0d0d0;
    font-size: 13px;
}
.pagination .page-item.active .page-link {
    background-color: rgb(63,24,235);
    border-color: rgb(63,24,235);
    color: #fff;
}
.pagination .page-link:hover {
    background-color: #ffdf00;
    border-color: #ffdf00;
    color: #000;
}

/* ---- Import page ---- */
.import-zone {
    border: 2px dashed #738ede;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9ff;
    color: #555;
}
.import-zone i { color: #738ede; margin-bottom: 10px; }

/* ---- Vacancy badge chips ---- */
.badge-vacant {
    background: #b30000;
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
.badge-sanctioned {
    background: #3c3c3d;
    color: #f5ee8e;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
.badge-alloted {
    background: #198754;
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ---- Profile Cards ---- */
.profile-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: rgb(63,24,235);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffdf00;
    font-size: 24px;
    font-weight: 700;
    border: 3px solid #ffdf00;
    box-shadow: 0 2px 8px rgba(63,24,235,0.25);
}
.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: #0d0c0c;
}
.profile-sub {
    font-size: 12px;
    color: #555;
    margin-top: 3px;
}
.profile-kgid {
    background: #3c3c3d;
    color: #ffdf00;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.profile-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #444;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
}
.profile-stat i {
    color: rgb(63,24,235);
    font-size: 11px;
}
.profile-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #e8e8e8;
}
.info-grid-item {
    padding: 7px 12px;
    border-bottom: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
}
.info-grid-item:nth-child(even) {
    border-right: none;
}
.info-grid-item.full {
    grid-column: 1 / -1;
    border-right: none;
}
.info-grid-item .label {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.info-grid-item .value {
    font-size: 13px;
    color: #111;
    font-weight: 500;
}

/* ---- Verification Badges ---- */
.vbadge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.vbadge-verified {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.vbadge-pending {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}
.vbadge-na {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* ---- Print ---- */
@media print {
    .admin-header, .admin-menu, .footer { display: none !important; }
    .main-content { padding: 0; overflow: visible; }
}

/* ---- Mobile ---- */
@media (max-width: 575px) {
    .admin-menu { min-height: unset; border-right: none; border-bottom: 3px solid #738ede; }
    .admin-header .app-name { font-size: 15px; }
    .admin-header .app-logo { height: 36px; }
    .welcome-banner { padding: 12px; }
    .welcome-icon { width: 40px; height: 40px; font-size: 16px; }
    .welcome-title { font-size: 16px; }
}
