/* VARIABLE WARNA UTAMA */
:root {
    --primary-orange: #ff6b00;
    --dark-orange: #e05200;
    --light-orange: #ffe0cc;
    --text-dark: #333333;
}

/* RESET STANDARD */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* BODY: LATAR PINK DENGAN LOGO MENYEBAR (PATTERN) */
body {
    background-color: #ffc0cb; /* Latar dasar Pink */
    background-image: url('logo.png'); /* Pattern Logo */
    background-repeat: repeat;
    background-size: 80px 80px; /* Ukuran logo menyebar */
    min-height: 100vh;
    padding-bottom: 20px;
    color: var(--text-dark);
}

/* HEADER BACKGROUND GAMBAR ATAS */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('bg-header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 35px 20px;
    text-align: center;
    border-bottom: 5px solid var(--primary-orange);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
}

.logo-wrapper {
    margin-bottom: 12px;
}

.site-logo {
    max-width: 95px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

header h1 {
    font-size: 26px;
    color: #ffffff;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
    font-weight: 700;
}

header p {
    font-size: 14px;
    color: #f0f0f0;
    margin-top: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

#live-clock {
    color: #ff9800;
    font-weight: bold !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
    font-size: 20px;
}

/* CONTAINER & CARDS */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 25px;
    border-top: 4px solid var(--primary-orange);
}

.card h3 {
    color: var(--primary-orange);
    font-size: 20px;
}

/* FORM STYLING */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444444;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-orange);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.3);
}

/* CAMERA BOX */
.camera-box {
    width: 100%;
    max-width: 400px;
    height: 300px;
    border: 3px dashed var(--primary-orange);
    border-radius: 12px;
    background: #fff8f5;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 0 auto;
}

.camera-box video, 
.camera-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#preview-img {
    display: none;
}

/* BUTTONS */
.btn {
    padding: 11px 18px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary, 
.btn-success {
    background-color: var(--primary-orange);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.25);
}

.btn-primary:hover, 
.btn-success:hover {
    background-color: var(--dark-orange);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #ff9800;
    color: #ffffff;
}

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

.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
}

.btn-login {
    background-color: var(--primary-orange);
    color: #ffffff;
    font-size: 13px;
}

.btn-login:hover {
    background-color: var(--dark-orange);
}

/* TABEL PRESENSI */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th, 
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ffe0cc;
}

table th {
    background-color: #fff3eb;
    color: var(--dark-orange);
}

.img-thumb {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-orange);
}

/* BADGES */
.badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
}

.bg-hadir { background-color: #198754; }
.bg-izin  { background-color: #ff9800; }
.bg-sakit { background-color: #0dcaf0; color: #000000; }
.bg-alfa  { background-color: #dc3545; }

/* FOOTER TEKS BERKEDIP */
footer {
    text-align: center;
    padding: 20px 10px;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 3px solid var(--primary-orange);
}

.blinking-text {
    color: #ff0000;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    header h1 { font-size: 20px; }
    .nav-links { flex-direction: column; gap: 10px; text-align: center; }
    .card { padding: 18px; }
    .blinking-text { font-size: 14px; }
}