/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

/* ===== CONTAINER ===== */
.container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TYPOGRAPHY ===== */
h2 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h3 {
    color: #555;
    font-size: 1.3em;
    margin-bottom: 10px;
}

p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ===== FORMS ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

label {
    color: #555;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: -10px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== BUTTONS ===== */
button,
.btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active,
.btn:active {
    transform: translateY(0);
}

/* ===== LINKS ===== */
a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

td {
    padding: 15px 18px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

tr:hover {
    background: #f8f9ff;
}

tr:last-child td {
    border-bottom: none;
}

/* Action links in table */
td a {
    padding: 8px 16px;
    background: #ff4757;
    color: white;
    border-radius: 8px;
    font-size: 0.9em;
    display: inline-block;
    transition: all 0.3s ease;
}

td a:hover {
    background: #ff3838;
    text-decoration: none;
    transform: scale(1.05);
}

/* ===== CARDS ===== */
.card-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.card h3 {
    color: white;
    font-size: 1.1em;
    margin-bottom: 15px;
    opacity: 0.9;
}

.card p {
    color: white;
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
}

/* ===== MENU NAVIGATION ===== */
.menu {
    list-style: none;
    margin: 30px 0;
    padding: 0;
}

.menu li {
    margin: 15px 0;
}

.menu li a {
    display: block;
    padding: 18px 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 12px;
    font-size: 1.1em;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.menu li a:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
    text-decoration: none;
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

.dashboard-header h2 {
    margin-bottom: 10px;
}

.dashboard-header p {
    color: #888;
    font-size: 1.1em;
}

/* ===== MENU BOXES GRID (SISWA DASHBOARD) ===== */
.menu-box-wrapper {
    margin: 30px 0;
}

.menu-siswa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.menu-box {
    background: white;
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    display: block;
}

.menu-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.menu-box .icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.menu-box h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #333;
}

.menu-box p {
    color: #888;
    font-size: 0.9em;
    margin: 0;
}

/* Menu Box Colors */
.menu-box.blue {
    border-color: #667eea;
}

.menu-box.blue:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-box.blue:hover h3,
.menu-box.blue:hover p {
    color: white;
}

.menu-box.green {
    border-color: #11998e;
}

.menu-box.green:hover {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.menu-box.green:hover h3,
.menu-box.green:hover p {
    color: white;
}

.menu-box.purple {
    border-color: #8E2DE2;
}

.menu-box.purple:hover {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);
    color: white;
}

.menu-box.purple:hover h3,
.menu-box.purple:hover p {
    color: white;
}

.menu-box.red {
    border-color: #ff4757;
}

.menu-box.red:hover {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
}

.menu-box.red:hover h3,
.menu-box.red:hover p {
    color: white;
}

/* ===== CHART CONTAINER ===== */
canvas {
    max-width: 100%;
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== ERROR & SUCCESS MESSAGES ===== */
.error {
    background: #ff4757;
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.success {
    background: #11998e;
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

/* ===== BACK BUTTON ===== */
.back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #f0f0f0;
    color: #667eea;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }
    
    h2 {
        font-size: 2em;
    }
    
    .menu-siswa-grid {
        grid-template-columns: 1fr;
    }
    
    .card-wrapper {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 12px;
    }
}
/* Tombol cetak */
.btn-cetak {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}
.btn-cetak:hover {
    opacity: 0.9;
}

/* MODE CETAK */
@media print {

    body {
        background: white !important;
    }

    /* sembunyikan tombol & navigasi */
    .btn-cetak,
    .back-btn {
        display: none !important;
    }

    /* fokus ke laporan */
    .laporan-cetak {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* tabel rapi */
    table {
        width: 100%;
        border-collapse: collapse;
    }

    table th, table td {
        border: 1px solid #333;
        padding: 8px;
        font-size: 12px;
    }

    h2, h3 {
        color: #000 !important;
    }

    /* grafik agar tidak kepotong */
    canvas {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* hindari potong halaman di card */
    div {
        page-break-inside: avoid;
    }
}

