/* =========================================
   1. CSS LAMA (DASAR TAMPILAN)
   ========================================= */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    flex-direction: column;
}

/* NAVBAR UNTUK SPA */
.navbar {
    background-color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

.btn-nav {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    width: auto;
}

.btn-nav:hover {
    background: #3498db;
    color: white;
}

.main-container {
    margin-top: 80px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* KARTU DOSEN */
.card {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    transition: max-width 0.5s ease;
}

.card.expanded {
    max-width: 850px;
}

h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 5px;
}

p.subtitle {
    color: #7f8c8d;
    text-align: center;
    font-size: 14px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 600;
}

input[type="text"],
input[type="file"],
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #95a5a6;
    margin-top: 10px;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #2ecc71;
    margin-bottom: 20px;
}

.btn-success:hover {
    background-color: #27ae60;
}

#alert {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#section-otp,
#section-upload {
    display: none;
}

/* Style untuk Tabel Panduan */
.guide-container {
    margin-top: 30px;
    border-top: 2px dashed #ecf0f1;
    padding-top: 20px;
}

.guide-title {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: center;
}

.guide-table th,
.guide-table td {
    border: 1px solid #bdc3c7;
    padding: 8px;
}

.guide-table th {
    background-color: #34495e;
    color: white;
}

.bg-red {
    background-color: #fadbd8;
    font-weight: bold;
    color: #c0392b;
}

.bg-green {
    background-color: #d5f5e3;
    color: #27ae60;
}

.bg-grey {
    background-color: #f2f3f4;
    color: #95a5a6;
    font-style: italic;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 5px;
    color: white;
}

.badge-red {
    background-color: #e74c3c;
}

.badge-green {
    background-color: #2ecc71;
}

/* =========================================
   2. CSS LAMA (DIVIDER & CTA BOX DOWNLOAD)
   ========================================= */

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0 15px 0;
    color: #95a5a6;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ecf0f1;
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.cta-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.cta-box p {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 0;
    margin-bottom: 12px;
}

.btn-outline {
    background-color: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline:hover {
    background-color: #2c3e50;
    color: white;
}

/* =========================================
   3. CSS MODAL KONFIRMASI (POPUP)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-content h3 {
    margin-top: 0;
    color: #2c3e50;
}

.modal-content p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

#confirmPhoneNumber {
    margin: 20px 0;
    color: #3498db;
    letter-spacing: 1px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions button {
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
    }

    to {
        transform: translateY(0);
    }
}

/* =========================================
   4. CSS PORTAL MAHASISWA (PENCARIAN & KARTU UTAMA)
   ========================================= */
#student-portal {
    width: 100%;
    max-width: 800px;
}

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 30px;
    border: 2px solid #bdc3c7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    outline: none;
}

.search-box input:focus {
    border-color: #3498db;
}

.search-results {
    position: absolute;
    top: 55px;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    text-align: left;
}

.search-item {
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
    transition: background 0.2s;
}

.search-item:hover {
    background: #f8f9fa;
}

.search-item strong {
    display: block;
    color: #2c3e50;
}

.search-item span {
    font-size: 12px;
    color: #7f8c8d;
}

.schedule-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px dashed #ecf0f1;
    padding-bottom: 20px;
}

.schedule-header h2 {
    margin: 0;
    text-align: left;
}

.schedule-header p {
    margin: 0;
    color: #7f8c8d;
}

.date-picker {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #bdc3c7;
    width: auto;
}

.legend-box {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.badge-blue {
    background-color: #3498db;
}

.badge-grey {
    background-color: #95a5a6;
}

/* =========================================
   5. VERTICAL TIMELINE UI (DESAIN BARU)
   ========================================= */
.vertical-timeline {
    width: 100%;
    margin-top: 20px;
    padding: 10px 0;
}

.v-timeline-item {
    display: flex;
    align-items: stretch;
    margin-bottom: 20px;
    position: relative;
}

.v-time-col {
    width: 90px;
    text-align: right;
    padding-right: 15px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 8px;
}

.v-time-start {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.v-time-end {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 2px;
}

.v-divider-col {
    width: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v-line {
    width: 2px;
    background-color: #ecf0f1;
    flex-grow: 1;
    margin-top: 5px;
}

.v-timeline-item:last-child .v-line {
    display: none;
    /* Hilangkan garis di ujung bawah */
}

.v-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    font-size: 14px;
    color: white;
    border: 3px solid white;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.v-content-col {
    flex-grow: 1;
    padding-left: 15px;
    padding-bottom: 10px;
}

.v-card {
    padding: 15px 20px;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f2f6;
    border-left-width: 5px;
    border-left-style: solid;
    transition: transform 0.2s;
}

.v-card:hover {
    transform: translateX(5px);
}

.v-card h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #2c3e50;
}

.v-card p {
    margin: 0;
    font-size: 12px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Warna Status */
.status-free {
    border-left-color: #2ecc71;
}

.status-free .v-card h4 {
    color: #27ae60;
}

.bg-free {
    background-color: #2ecc71;
}

.status-consult {
    border-left-color: #3498db;
}

.status-consult .v-card h4 {
    color: #2980b9;
}

.bg-consult {
    background-color: #3498db;
}

.status-busy {
    border-left-color: #95a5a6;
}

.bg-busy {
    background-color: #95a5a6;
}

/* Warna Status Tambahan: Mengajar & Legend Oranye */
.status-teaching {
    border-left-color: #f39c12;
}

.status-teaching .v-card h4 {
    color: #d35400;
}

.bg-teaching {
    background-color: #f39c12;
}

.badge-orange {
    background-color: #f39c12;
}