/* assets/css/glassmorphism.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(-45deg, #667eea, #764ba2, #6b8cff, #9f7aea);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Animasi gradien */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efek glassmorphism pada elemen utama */
.sidebar, .card, .filter-box, .modal-content, .btn, .table-responsive table, .form-control {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    padding: 20px;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    color: #fff;
    background: rgba(15, 43, 75, 0.4); /* biru tua transparan */
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.2);
}

.sidebar h2 {
    font-weight: 500;
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar a {
    display: block;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 400;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.sidebar a:hover, .sidebar a.active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.sidebar a i {
    margin-right: 10px;
    width: 20px;
    display: inline-block;
}

/* Tombol toggle sidebar untuk mobile */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Logo watermark */
.logo-watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    opacity: 0.15;
    transition: opacity 0.3s ease;
    pointer-events: none; /* agar tidak mengganggu klik */
}

.logo-watermark:hover {
    opacity: 0.3;
}

.logo-watermark img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.2));
}

/* Konten utama */
.content {
    margin-left: 260px;
    padding: 30px;
    transition: margin-left 0.3s ease;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.content-header h2 {
    font-weight: 600;
    font-size: 1.8rem;
    color: #fff;
}

.content-header p {
    color: rgba(255,255,255,0.9);
}

/* Kartu / Card */
.card {
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 15px;
    font-weight: 600;
    color: #fff;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tabel */
.table-responsive {
    overflow-x: auto;
    border-radius: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

th {
    background: rgba(15, 43, 75, 0.3);
    font-weight: 600;
    padding: 15px 10px;
    text-align: left;
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #1e293b;
    background: rgba(255,255,255,0.2);
}

tr:last-child td {
    border-bottom: none;
}

/* Badge status */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #1e293b;
}

.badge-hadir {
    background: rgba(46, 125, 50, 0.4);
    color: #fff;
}

.badge-terlambat {
    background: rgba(237, 108, 2, 0.4);
    color: #fff;
}

.badge-belum {
    background: rgba(211, 47, 47, 0.4);
    color: #fff;
}

/* Tombol */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #fff;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
}

.btn-primary {
    background: rgba(15, 43, 75, 0.6);
}

.btn-primary:hover {
    background: rgba(15, 43, 75, 0.8);
}

.btn-success {
    background: rgba(46, 125, 50, 0.6);
}

.btn-warning {
    background: rgba(237, 108, 2, 0.6);
}

.btn-danger {
    background: rgba(211, 47, 47, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.6);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.2);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: rgba(255,255,255,0.8);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.6);
}

/* Filter box */
.filter-box {
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.filter-box .form-group {
    margin-bottom: 0;
    min-width: 200px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    border-radius: 24px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e293b;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    transition: color 0.2s;
}

.close:hover {
    color: #fff;
}

/* Responsif */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 20px;
    }

    .menu-toggle {
        display: block;
    }

    .filter-box {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-box .form-group {
        width: 100%;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .content-header h2 {
        font-size: 1.5rem;
    }

    /* Logo watermark di mobile lebih kecil */
    .logo-watermark img {
        max-width: 80px;
    }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 10px; }
.mb-2 { margin-bottom: 10px; }
.mt-3 { margin-top: 20px; }
.mb-3 { margin-bottom: 20px; }

/* Gambar dalam tabel */
table img {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    padding: 3px;
}

/* Link dalam tabel */
td a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.5);
}

td a:hover {
    border-bottom: 1px solid #fff;
}