:root {
    --bg: #e0e5ec;
    --text: #4a4a4a;
    --shadow-1: 9px 9px 16px rgba(163, 177, 198, 0.6);
    --shadow-2: -9px -9px 16px rgba(255, 255, 255, 0.5);
    --shadow-inset-1: inset 6px 6px 10px rgba(163, 177, 198, 0.6);
    --shadow-inset-2: inset -6px -6px 10px rgba(255, 255, 255, 0.5);
    --primary: #4e65ff;
    --success: #00b09b;
    --danger: #ff416c;
    --card-bg: rgba(255, 255, 255, 0.2);
}

body.dark-mode {
    --bg: #292d32;
    --text: #e0e5ec;
    --shadow-1: 9px 9px 16px rgba(0, 0, 0, 0.4);
    --shadow-2: -9px -9px 16px rgba(60, 65, 71, 0.3);
    --shadow-inset-1: inset 6px 6px 10px rgba(0, 0, 0, 0.4);
    --shadow-inset-2: inset -6px -6px 10px rgba(60, 65, 71, 0.3);
    --card-bg: rgba(0, 0, 0, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg); color: var(--text); transition: all 0.4s ease; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-x: hidden; }

.theme-switch { position: absolute; top: 20px; right: 20px; width: 50px; height: 50px; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow-1), var(--shadow-2); border: none; cursor: pointer; color: var(--text); font-size: 1.2rem; transition: 0.3s; display: flex; justify-content: center; align-items: center; }
.theme-switch:active { box-shadow: var(--shadow-inset-1), var(--shadow-inset-2); }

.numpad-container { text-align: center; padding: 40px; border-radius: 30px; background: var(--bg); box-shadow: var(--shadow-1), var(--shadow-2); width: 350px; }
.numpad-container h2 { margin-bottom: 5px; font-weight: 600; letter-spacing: 1px; }
.numpad-container p { font-size: 0.9rem; margin-bottom: 25px; opacity: 0.7; }
.pin-display { font-size: 2rem; letter-spacing: 15px; margin-bottom: 30px; height: 50px; display: flex; justify-content: center; align-items: center; background: var(--bg); box-shadow: var(--shadow-inset-1), var(--shadow-inset-2); border-radius: 15px; color: var(--primary); font-weight: bold; }

.numpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.num-btn { width: 70px; height: 70px; margin: 0 auto; border-radius: 50%; border: none; background: var(--bg); color: var(--text); font-size: 1.5rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1), var(--shadow-2); transition: all 0.2s ease; }
.num-btn:active { box-shadow: var(--shadow-inset-1), var(--shadow-inset-2); color: var(--primary); transform: scale(0.95); }
.num-btn.clear { color: var(--danger); }

.secret-admin { position: absolute; bottom: 20px; right: 20px; color: var(--text); opacity: 0.2; text-decoration: none; font-size: 1.2rem; transition: 0.3s; }
.secret-admin:hover { opacity: 1; color: var(--primary); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; pointer-events: none; transition: 0.4s ease; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.id-card { background: var(--bg); width: 320px; border-radius: 20px; padding: 30px; text-align: center; box-shadow: var(--shadow-1), var(--shadow-2); transform: translateY(-50px) scale(0.8); transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; border: 1px solid rgba(255,255,255,0.1); }
.modal-overlay.active .id-card { transform: translateY(0) scale(1); }
.id-photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 15px; border: 4px solid var(--bg); box-shadow: var(--shadow-1), var(--shadow-2); }
.id-name { font-size: 1.5rem; font-weight: bold; margin-bottom: 5px; }
.id-div { font-size: 0.9rem; opacity: 0.8; margin-bottom: 20px; }
.id-time { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: 15px; }
.status-badge { padding: 8px 20px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; display: inline-block; color: white; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.status-hadir { background: linear-gradient(135deg, #00b09b, #96c93d); }
.status-telat { background: linear-gradient(135deg, #ff416c, #ff4b2b); }

.alert-box { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); padding: 15px 30px; border-radius: 30px; background: var(--danger); color: white; font-weight: bold; opacity: 0; transition: 0.4s; z-index: 1001; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.alert-box.show { opacity: 1; top: 40px; }

.admin-container { width: 100%; display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--bg); box-shadow: var(--shadow-1); padding: 30px 20px; display: flex; flex-direction: column; z-index: 10; }
.sidebar a { text-decoration: none; color: var(--text); padding: 15px; margin-bottom: 10px; border-radius: 15px; font-weight: 500; transition: 0.3s; display: block; box-shadow: var(--shadow-1), var(--shadow-2); }
.sidebar a:hover, .sidebar a.active { box-shadow: var(--shadow-inset-1), var(--shadow-inset-2); color: var(--primary); }
.main-content { flex: 1; padding: 40px; overflow-y: auto; }
.widget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; }
.widget { padding: 30px; border-radius: 20px; background: var(--bg); box-shadow: var(--shadow-1), var(--shadow-2); text-align: center; }
.widget h3 { font-size: 1rem; opacity: 0.7; margin-bottom: 10px; }
.widget h1 { font-size: 2.5rem; color: var(--primary); }
.table-container { background: var(--bg); padding: 30px; border-radius: 20px; box-shadow: var(--shadow-1), var(--shadow-2); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(163, 177, 198, 0.3); }
th { font-weight: 600; color: var(--primary); }
.btn { padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer; font-weight: bold; color: white; transition: 0.3s; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--primary); }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }
.btn:hover { opacity: 0.8; transform: translateY(-2px); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-control { width: 100%; padding: 12px 15px; border-radius: 10px; border: none; background: var(--bg); box-shadow: var(--shadow-inset-1), var(--shadow-inset-2); color: var(--text); outline: none; }

/* REVISI: EFEK GOLD SHINE & SUBTITLE */
.gold-shine {
    background: linear-gradient(to right, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 5px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0px 4px 15px rgba(191, 149, 63, 0.3);
}

@keyframes shine {
    to { background-position: 200% center; }
}

.sub-title {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 4px;
    opacity: 0.7;
    margin-bottom: 25px;
    font-weight: 600;
    text-transform: uppercase;
}