/* ==========================================================================
   SIPD SMKN 1 Batumandi — Stylesheet Utama (Bootstrap 5 Companion)
   Tema: Biru Navy (#0f2847), Putih (#ffffff), Aksen Biru (#2563eb)
   ========================================================================== */

:root {
    --sipd-navy: #0f2847;
    --sipd-navy-dark: #0a1b30;
    --sipd-navy-soft: #173a64;
    --sipd-blue: #2563eb;
    --sipd-blue-hover: #1d4ed8;
    --sipd-blue-tint: #eff6ff;
    --sipd-bg: #f4f7fb;
    --sipd-surface: #ffffff;
    --sipd-border: #e2e8f0;
    --sipd-text: #0f172a;
    --sipd-muted: #64748b;
    --sipd-sidebar-width: 280px;
    --sipd-topbar-height: 68px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--sipd-bg);
    color: var(--sipd-text);
    -webkit-font-smoothing: antialiased;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.font-mono-code {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* --------------------------------------------------------------------------
   Halaman Login
   -------------------------------------------------------------------------- */
.sipd-login-body {
    min-height: 100vh;
    background-color: var(--sipd-bg);
    display: flex;
    flex-direction: column;
}

.sipd-login-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.sipd-login-card {
    width: 100%;
    max-width: 960px;
    background: var(--sipd-surface);
    border: 1px solid var(--sipd-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 32px -12px rgba(15, 40, 71, 0.14);
}

.sipd-login-aside {
    background: linear-gradient(155deg, var(--sipd-navy) 0%, var(--sipd-navy-dark) 100%);
    color: #ffffff;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sipd-school-emblem {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
}

.sipd-emblem-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: var(--sipd-blue);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.sipd-school-wordmark {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    color: #bfdbfe;
    text-transform: uppercase;
}

.sipd-login-form-pane {
    padding: 2.5rem;
    background-color: var(--sipd-surface);
}

.sipd-input-group .form-control {
    border-color: var(--sipd-border);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.95rem;
}

.sipd-input-group .input-group-text {
    background-color: #f8fafc;
    border-color: var(--sipd-border);
    color: var(--sipd-muted);
}

.sipd-input-group .form-control:focus {
    border-color: var(--sipd-blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.14);
}

.sipd-btn-primary {
    background-color: var(--sipd-navy);
    border-color: var(--sipd-navy);
    color: #ffffff;
    font-weight: 600;
    padding: 0.7rem 1.25rem;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.sipd-btn-primary:hover,
.sipd-btn-primary:focus {
    background-color: var(--sipd-blue);
    border-color: var(--sipd-blue);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Layout Dashboard Admin
   -------------------------------------------------------------------------- */
.sipd-wrapper {
    display: flex;
    min-height: 100vh;
}

.sipd-sidebar {
    width: var(--sipd-sidebar-width);
    background-color: var(--sipd-navy);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sipd-sidebar-brand {
    height: var(--sipd-topbar-height);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sipd-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background-color: var(--sipd-blue);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.sipd-brand-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

.sipd-brand-school {
    font-size: 0.76rem;
    color: #cbd5e1;
}

.sipd-sidebar-user {
    margin: 0.75rem 0.9rem 0.25rem;
    padding: 0.6rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sipd-sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: var(--sipd-blue);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sipd-sidebar-uname {
    font-size: 0.85rem;
    line-height: 1.25;
}

.sipd-sidebar-role {
    font-size: 0.72rem;
    color: #93c5fd;
    font-weight: 500;
    line-height: 1.2;
}

.sipd-sidebar-nav {
    padding: 0.75rem 0.65rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.sipd-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sipd-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sipd-sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.sipd-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.36);
}

.sipd-nav-section-label {
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.46);
    padding: 0 0.65rem 0.45rem;
}

.sipd-sidebar-nav .nav-item {
    min-width: 0;
    max-width: 100%;
}

.sipd-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.58rem 0.75rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    transition: background-color 150ms ease, color 150ms ease;
}

.sipd-nav-link > span.flex-grow-1 {
    flex: 1 1 0% !important;
    min-width: 0 !important;
}

.sipd-nav-link > i.fa-fw,
.sipd-nav-link .sipd-chevron {
    flex-shrink: 0;
}

.sipd-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.sipd-nav-link.active {
    background-color: var(--sipd-blue);
    color: #ffffff;
    font-weight: 600;
}

.sipd-nav-link.is-disabled {
    color: rgba(255, 255, 255, 0.44);
    cursor: not-allowed;
}

.sipd-nav-link.is-disabled:hover {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.44);
}

.sipd-stage-note {
    font-size: 0.67rem;
    color: rgba(255, 255, 255, 0.56);
    background-color: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.42rem;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.sipd-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sipd-logout-btn {
    background-color: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.58rem 1rem;
    border-radius: 8px;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.sipd-logout-btn:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.sipd-main {
    flex: 1;
    margin-left: var(--sipd-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 992px) {
    body.sipd-sidebar-collapsed .sipd-sidebar {
        transform: translateX(-100%);
    }

    body.sipd-sidebar-collapsed .sipd-main {
        margin-left: 0;
    }

    body.sipd-sidebar-collapsed .sipd-content {
        max-width: 100%;
    }
}

.sipd-topbar {
    height: var(--sipd-topbar-height);
    background-color: var(--sipd-surface);
    border-bottom: 1px solid var(--sipd-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sipd-topbar-breadcrumb {
    font-size: 0.76rem;
    color: var(--sipd-muted);
    font-weight: 500;
}

.sipd-topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sipd-navy);
}

.sipd-user-btn {
    border: 1px solid var(--sipd-border);
    background-color: var(--sipd-surface);
    padding: 0.35rem 0.65rem;
    border-radius: 9px;
}

.sipd-user-btn:hover,
.sipd-user-btn:focus {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.sipd-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background-color: var(--sipd-navy);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sipd-user-name {
    font-size: 0.84rem;
}

.sipd-user-role {
    font-size: 0.72rem;
}

.sipd-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
}

.sipd-footer {
    background-color: var(--sipd-surface);
    border-top: 1px solid var(--sipd-border);
    padding: 0.9rem 1.5rem;
}

/* --------------------------------------------------------------------------
   Kartu & Komponen Dashboard
   -------------------------------------------------------------------------- */
.sipd-welcome-banner {
    background: linear-gradient(135deg, var(--sipd-navy) 0%, var(--sipd-navy-soft) 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
}

.sipd-stat-card {
    background-color: var(--sipd-surface);
    border: 1px solid var(--sipd-border);
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sipd-stat-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px -10px rgba(15, 40, 71, 0.14);
}

.sipd-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background-color: var(--sipd-blue-tint);
    color: var(--sipd-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sipd-stat-icon.is-navy {
    background-color: #eef2f7;
    color: var(--sipd-navy);
}

.sipd-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sipd-navy);
    line-height: 1.15;
}

.sipd-panel-card {
    background-color: var(--sipd-surface);
    border: 1px solid var(--sipd-border);
    border-radius: 12px;
    overflow: hidden;
}

.sipd-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--sipd-border);
    background-color: var(--sipd-surface);
}

.sipd-table th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--sipd-muted);
    background-color: #f8fafc;
    border-bottom-color: var(--sipd-border);
    padding: 0.75rem 1rem;
}

.sipd-table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
    border-bottom-color: #f1f5f9;
}

/* --------------------------------------------------------------------------
   Komponen Tahap 2 (Notifikasi, Status, Modal, Grafik)
   -------------------------------------------------------------------------- */
.bg-navy {
    background-color: var(--sipd-navy) !important;
}

.sipd-icon-btn {
    border: 1px solid var(--sipd-border);
    background-color: var(--sipd-surface);
    color: var(--sipd-navy);
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sipd-icon-btn:hover,
.sipd-icon-btn:focus {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--sipd-blue);
}

.sipd-notif-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: var(--sipd-blue);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.sipd-notif-menu {
    width: 320px;
    max-width: calc(100vw - 2rem);
}

.sipd-status-text {
    font-size: 0.82rem;
    font-weight: 600;
}

.sipd-status-text.is-active {
    color: #15803d;
}

.sipd-status-text.is-inactive {
    color: #b91c1c;
}

.sipd-chart-wrap {
    position: relative;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Responsif Tablet & HP (< 992px)
   -------------------------------------------------------------------------- */
.sipd-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 27, 48, 0.55);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.sipd-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    .sipd-sidebar {
        transform: translateX(-100%);
    }

    .sipd-sidebar.is-open {
        transform: translateX(0);
    }

    .sipd-main {
        margin-left: 0;
    }

    .sipd-topbar {
        padding: 0 1rem;
    }

    .sipd-content {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .sipd-login-aside,
    .sipd-login-form-pane {
        padding: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   Komponen Tahap 3 (Submenu Sidebar, Foto Peserta Didik, Tab Form, Cetak)
   -------------------------------------------------------------------------- */
.sipd-nav-link.is-parent-active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 600;
}

.sipd-nav-link .sipd-chevron {
    transition: transform 180ms ease;
}

.sipd-nav-link[aria-expanded="true"] .sipd-chevron {
    transform: rotate(180deg);
}

.sipd-submenu {
    padding-left: 0.85rem;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    margin-left: 1rem;
}

.sipd-subnav-link {
    display: block;
    padding: 0.44rem 0.7rem;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.825rem;
    font-weight: 500;
    line-height: 1.3;
    transition: background-color 150ms ease, color 150ms ease;
}

.sipd-subnav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sipd-subnav-link.active {
    background-color: var(--sipd-blue);
    color: #ffffff;
    font-weight: 600;
}

.sipd-subnav-link.is-disabled {
    color: rgba(255, 255, 255, 0.44);
    cursor: not-allowed;
}

.sipd-subnav-link.is-disabled:hover {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.44);
}

.sipd-student-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--sipd-border);
    background-color: #f8fafc;
}

.sipd-student-photo-lg {
    width: 88px;
    height: 112px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.sipd-student-photo-print {
    width: 90px;
    height: 116px;
    object-fit: cover;
    border-radius: 4px;
}

.sipd-form-tabs .nav-link {
    color: var(--sipd-muted);
    font-weight: 600;
    font-size: 0.88rem;
}

.sipd-form-tabs .nav-link.active {
    color: var(--sipd-navy);
    border-bottom-color: #ffffff;
}

.sipd-print-body {
    background-color: #eef2f7;
}

.sipd-print-sheet {
    max-width: 900px;
    box-shadow: 0 8px 24px -12px rgba(15, 40, 71, 0.16);
}

.sipd-print-table th,
.sipd-print-table td {
    padding: 0.42rem 0.65rem;
    font-size: 0.875rem;
}

@media print {
    .no-print,
    .sipd-sidebar,
    .sipd-sidebar-backdrop,
    .sipd-topbar,
    .sipd-footer {
        display: none !important;
    }

    body.sipd-admin-body,
    .sipd-print-body {
        background-color: #ffffff !important;
    }

    .sipd-main {
        margin-left: 0 !important;
    }

    .sipd-content {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .sipd-panel-card,
    .sipd-stat-card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    .sipd-print-sheet {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
}

/* --------------------------------------------------------------------------
   Komponen Tahap 8 (Badge Persetujuan Akhir & Grid 7 KPI Dashboard Koreksi)
   -------------------------------------------------------------------------- */
.sipd-badge-approver {
    color: #5b21b6;
    background-color: #f5f3ff;
    border-color: #ddd6fe !important;
}

@media (min-width: 1200px) {
    .row-cols-xl-7 > * {
        flex: 0 0 auto;
        width: 14.285714%;
    }
}

/* --------------------------------------------------------------------------
   Komponen Tahap 9 (Stepper 8-Tahap Import Excel & Utilitas)
   -------------------------------------------------------------------------- */
.sipd-stepper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 0.5rem;
}

.sipd-step-item {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.48rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    color: #64748b;
    text-align: center;
}

.sipd-step-item.is-active {
    background-color: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
}

.sipd-step-item.is-done {
    background-color: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.cursor-pointer {
    cursor: pointer;
}

.btn-xs {
    padding: 0.18rem 0.45rem;
    font-size: 0.75rem;
    border-radius: 0.35rem;
}

/* --------------------------------------------------------------------------
   Logo Sekolah & Foto Profil Admin / Staf
   -------------------------------------------------------------------------- */
.sipd-emblem-box.has-logo {
    background-color: #ffffff;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.sipd-brand-mark.has-logo {
    background-color: #ffffff;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.sipd-brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sipd-avatar.has-photo,
.sipd-sidebar-avatar.has-photo,
.sipd-user-table-avatar.has-photo {
    background-color: transparent;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.sipd-sidebar-avatar.has-photo {
    border-color: rgba(255, 255, 255, 0.28);
}

.sipd-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sipd-profile-avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
    border-radius: 12px;
}

.sipd-user-table-avatar {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background-color: var(--sipd-navy);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.sipd-preview-box {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 4px;
}

.sipd-preview-box.is-circle {
    border-radius: 50%;
    padding: 0;
}

.sipd-preview-box.has-image {
    border-style: solid;
    border-color: #cbd5e1;
}

.sipd-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sipd-preview-img.is-cover {
    object-fit: cover;
}


