/* =========================================================
   MandiriTech PPDB
   style.css
   PHP 7.3 + Bootstrap + DataTables + SweetAlert2
========================================================= */

/* ===== FONT & GLOBAL ===== */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none !important;
}

img {
    max-width: 100%;
}

.text-primary {
    color: #1d4ed8 !important;
}

.bg-primary {
    background: linear-gradient(135deg, #0d6efd, #1d4ed8) !important;
}

.bg-soft-primary {
    background-color: #eef4ff;
}

.bg-soft-success {
    background-color: #eafaf1;
}

.bg-soft-warning {
    background-color: #fff8e6;
}

.bg-soft-danger {
    background-color: #fdeeee;
}

.border-radius-lg {
    border-radius: 18px;
}

.shadow-soft {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ===== NAVBAR ===== */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.4px;
}

.navbar {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-weight: 800;
    font-size: 2.6rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.hero .btn {
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.section-subtitle {
    color: #6b7280;
    margin-bottom: 30px;
}

/* ===== CARD ===== */
.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
}

.card .card-body {
    padding: 1.4rem;
}

.card-hover {
    transition: all 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.12);
}

/* ===== ICON BOX ===== */
.icon-box {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 22px;
    margin-bottom: 15px;
}

.icon-primary {
    background: #e8f0ff;
    color: #0d6efd;
}

.icon-success {
    background: #e8fff1;
    color: #198754;
}

.icon-warning {
    background: #fff6dd;
    color: #f59e0b;
}

.icon-danger {
    background: #ffe9e9;
    color: #dc3545;
}

/* ===== BUTTON ===== */
.btn {
    border-radius: 12px;
    font-weight: 600;
}

.btn i {
    margin-right: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #1d4ed8);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7, #1b44be);
}

.btn-success {
    border: none;
}

.btn-warning {
    border: none;
    color: #212529;
}

.btn-danger {
    border: none;
}

.btn-light {
    border: 1px solid #dee2e6;
}

/* ===== FORM ===== */
.form-control,
.custom-select,
.form-control-file,
textarea,
select {
    border-radius: 12px !important;
    min-height: 45px;
    border: 1px solid #dbe2ea;
    box-shadow: none !important;
}

.form-control:focus,
textarea:focus,
select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15) !important;
}

label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

textarea.form-control {
    min-height: 100px;
}

.form-step-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

/* ===== MULTI STEP FORM ===== */
.step-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-section.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.step-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 12px 10px;
    border-radius: 14px;
    background: #eef2f7;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step-item.active {
    background: linear-gradient(135deg, #0d6efd, #1d4ed8);
    color: #fff;
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.22);
}

.step-item.done {
    background: #198754;
    color: #fff;
}

/* ===== DASHBOARD ADMIN/SISWA ===== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #fff;
    transition: all 0.3s ease;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

.sidebar-brand {
    padding: 20px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-menu a {
    display: block;
    color: rgba(255,255,255,0.88);
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 15px;
}

.sidebar-menu a i {
    width: 22px;
    margin-right: 10px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: all 0.3s ease;
}

.topbar {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #eef2f7;
    position: sticky;
    top: 0;
    z-index: 900;
}

.content-area {
    padding: 25px;
}

/* ===== STAT CARD ===== */
.stat-card {
    border-radius: 18px;
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stat-card h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-card p {
    margin-bottom: 0;
    opacity: 0.95;
}

.stat-card i.stat-icon {
    position: absolute;
    right: 15px;
    bottom: 12px;
    font-size: 42px;
    opacity: 0.15;
}

.stat-primary {
    background: linear-gradient(135deg, #0d6efd, #1d4ed8);
}

.stat-success {
    background: linear-gradient(135deg, #198754, #157347);
}

.stat-danger {
    background: linear-gradient(135deg, #dc3545, #b02a37);
}

.stat-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* ===== TABLE ===== */
.table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    border-top: none;
    font-size: 14px;
    color: #374151;
    background: #f8fafc;
    vertical-align: middle;
}

.table td,
.table th {
    vertical-align: middle !important;
}

.badge {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== DATATABLES ===== */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    padding: 6px 10px;
    margin-left: 8px;
    min-width: 220px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    padding: 6px 30px 6px 10px;
    min-width: 80px;
    height: 38px;
    background-color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 4px 10px !important;
    margin: 2px !important;
    border-radius: 8px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0d6efd !important;
    color: #fff !important;
    border: 1px solid #0d6efd !important;
}

/* ===== LOGIN ===== */
.auth-card {
    border-radius: 20px;
    overflow: hidden;
}

.auth-left {
    background: linear-gradient(135deg, #0d6efd, #1d4ed8);
    color: #fff;
    padding: 35px;
    min-height: 100%;
}

.auth-left h2 {
    font-weight: 800;
}

.auth-right {
    padding: 35px;
}

/* ===== PRINT AREA ===== */
.print-area {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
}

.kop-surat {
    border-bottom: 3px solid #000;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.kop-surat img {
    max-height: 80px;
}

.print-title {
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
}

/* ===== ALERT CUSTOM ===== */
.alert {
    border: none;
    border-radius: 14px;
}

/* ===== FOOTER ===== */
footer {
    margin-top: 40px;
}

/* ===== UTILITIES ===== */
.rounded-xl {
    border-radius: 18px !important;
}

.rounded-lg {
    border-radius: 14px !important;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .sidebar {
        left: -260px;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .content-area {
        padding: 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero {
        min-height: 75vh;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .step-item {
        font-size: 12px;
        padding: 10px 6px;
    }

    .card .card-body {
        padding: 1rem;
    }

    .topbar {
        padding: 12px 15px;
    }

    .stat-card h3 {
        font-size: 24px;
    }
}

@media print {
    .no-print,
    .sidebar,
    .topbar,
    .btn,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .dataTables_info {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .main-content,
    .content-area {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .card,
    .print-area {
        box-shadow: none !important;
        border: none !important;
    }
}

.file-name {
    display: block;
    margin-top: 8px;
    font-size: 13px;
}

.progress {
    background-color: #e9eef7;
}

.progress-bar {
    font-weight: 600;
}

.is-valid,
.is-invalid {
    background-position: right calc(.375em + .1875rem) center !important;
}

/* ===== SIDEBAR SCROLL ===== */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #fff;
    transition: all 0.3s ease;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.28);
}

/* ===== SUBMENU SIDEBAR ===== */
.submenu-sidebar {
    margin: 6px 8px 10px 28px;
    padding: 8px 8px 8px 14px;
    border-left: 2px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 12px 12px 0;
}

.submenu-sidebar a {
    display: block;
    color: rgba(255,255,255,0.80);
    padding: 10px 14px;
    margin: 4px 0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.submenu-sidebar a i {
    width: 20px;
    margin-right: 8px;
}

.submenu-sidebar a::before {
    content: "";
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.45);
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.submenu-sidebar a:hover,
.submenu-sidebar a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateX(4px);
}

.submenu-sidebar a.active::before {
    background: #ffffff;
}

/* ===== CHEVRON ROTATE ON OPEN ===== */
.sidebar-menu a[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.sidebar-menu a[aria-expanded="false"] .fa-chevron-down {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.sidebar-menu > a {
    font-weight: 500;
}

.sidebar-menu > a.d-flex {
    padding-right: 16px;
}

.sidebar-menu > a.d-flex .fa-chevron-down {
    font-size: 12px;
    opacity: 0.8;
}

.table-sm th {
    white-space: nowrap;
    font-weight: 600;
    color: #374151;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(13, 110, 253, 0.03);
}

.rounded-lg {
    border-radius: 14px !important;
}

.card.border-0 {
    border: none !important;
}

.modal-content {
    border-radius: 16px;
    overflow: hidden;
}

#filePreviewContent img {
    max-height: 75vh;
}

#filePreviewContent iframe {
    min-height: 70vh;
    border-radius: 10px;
}