* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
    /* background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533a63 75%, #8b5e86 100%); */
}

/* Background Daurah Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* glow emas */
        radial-gradient(circle at 20% 80%, rgba(255,215,0,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,215,0,0.08) 0%, transparent 50%),

        /* pattern halus */
        radial-gradient(circle at 10% 30%, rgba(212,175,55,0.05) 1px, transparent 1px),
        radial-gradient(circle at 90% 70%, rgba(212,175,55,0.05) 1px, transparent 1px),

        /* ✅ gradient hijau pilihan kamu */
        linear-gradient(135deg, #0b3d2e, #14532d, #166534, #22c55e),

        /* texture */
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.03) 0%, transparent 50%);

    z-index: -2;
    animation: daurahGlow 20s ease-in-out infinite alternate;
}
.container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    height: calc(100vh - 40px);
}
.btn-setting,
.btn-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;

    background: #f1f5f9;
    color: #334155;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    transition: all 0.2s ease;
}

/* hover effect */
.btn-setting:hover,
.btn-fullscreen:hover {
    background: #1d8537;
    color: #fff;
    transform: rotate(90deg);
}

/* optional shadow */
.btn-setting:active,
.btn-fullscreen:active  {
    transform: scale(0.95);
}

/* posisi */
.btn-setting {
    right: 10px;
}

.btn-fullscreen {
    right: 60px; /* samping tombol setting */
}
.left-panel {
    flex: 2;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50, #2196F3, #FF9800);
}

.title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}
.title .text-sesi {
    display: block;        /* biar turun ke bawah */
    font-size: 1rem;
    color: #7f8c8d;
    margin-top: 10px;
    font-weight: 500;
}
.rfid-area {
    background: linear-gradient(145deg, #f0f2f5, #ffffff);
    border: 4px dashed #4CAF50;
    border-radius: 20px;
    width: 600px;
    height: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.rfid-area:hover {
    border-color: #09883a;
    transform: scale(1.02);
}

.rfid-area.success {
    border-color: #4CAF50;
    background: linear-gradient(145deg, #d4edda, #f8f9fa);
    animation: pulse 1s infinite;
}

.rfid-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 5px;
}

.rfid-area.success .rfid-icon {
    color: #4CAF50;
}

.rfid-text {
    font-size: 1.2rem;
    color: #7f8c8d;
    text-align: center;
}

.stats {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    color: #7f8c8d;
    font-size: 1rem;
    margin-top: 5px;
}

.present { color: #4CAF50; }
.presentOut { color: #f44336; }
.absent { color: #f44336; }
.total { color: #2196F3; }



.right-panel{
    flex:1;
    background: rgba(255,255,255,0.95);
    border-radius:20px;
    padding:20px;
    display:flex;
    flex-direction:column;
    height:100%;
    overflow:hidden;
}

/* HEADER */
.panel-header{
    background: linear-gradient(135deg,#16a34a,#22c55e);
    color:white;
    padding:18px;
    border-radius:16px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
    flex-shrink:0;
}

.header-left{
    display:flex;
    gap:12px;
    align-items:center;
}

.header-left i{
    font-size:26px;
}

.header-title{
    font-size:1.1rem;
    font-weight:700;
}

.header-subtitle{
    font-size:0.9rem;
    opacity:0.9;
}

.header-count{
    text-align:center;
}

.header-count span{
    display:block;
    font-size:1.8rem;
    font-weight:700;
}

.header-count small{
    font-size:0.8rem;
}

/* BODY */
.panel-body{
    flex:1;
    overflow-y:auto;
    padding-right:5px;
}



.right-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow-y: auto;
    position: relative;
}

.right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #FF9800, #4CAF50, #2196F3);
    border-radius: 20px 20px 0 0;
}

/* .list-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
} */

.list-title {
    position: sticky;
    top: 0;
    z-index: 10;

    background: rgba(255,255,255,0.98);
    padding: 12px 0;
    margin-bottom: 15px;

    font-size: 1.1rem;   /* dikecilkan */
    font-weight: 700;
    color: #2c3e50;

    display: flex;
    align-items: center;
    gap: 8px;

    border-bottom: 1px solid #e5e7eb;
}

.list-empty {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-top: 50px;
}

.attendance-item {
    background: linear-gradient(145deg, #b4ffe9, #aaffdb);
    /* background: linear-gradient(145deg, #f8f9fa, #ffffff); */
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease forwards;
    opacity: 0;
    transform: translateX(-30px);
}

.attendance-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.attendance-item:last-child {
    margin-bottom: 0;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
}

.info {
    flex: 1;
}

.name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.time {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.status {
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status.present {
    background: #d4edda;
    color: #155724;
}
    

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

/* box modal */
.modal-content {
    background: #fff;
    width: 320px;
    padding: 20px;
    border-radius: 12px;
    margin: 120px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeIn 0.2s ease;
}

/* tombol action */
.modal-action {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-action button {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-save {
    background: #3b82f6;
    color: white;
}
/* WRAPPER ALERT */
.notif-alert{
    width: 100%;
    margin-bottom: 20px;
}

/* BOX ALERT */
.alert{
    padding: 16px 22px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    animation: fadeSlide .4s ease;
    border-left: 6px solid transparent;
    position: relative;
    overflow: hidden;
}

/* SUCCESS */
.alert-success{
    background: #acffcf;
    border-left-color: #22c55e;
    color: #166534;
}

/* ERROR */
.alert-danger{
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* JUDUL */
.alert h5{
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* DESKRIPSI */
.alert h6{
    margin: 0;
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.6;
    opacity: .95;
}

/* ICON */
.alert i{
    font-size: 1rem;
}

/* CLOSE BUTTON OPTIONAL */
.alert-dismissible::after{
    /* content: "×"; */
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.3rem;
    font-weight: bold;
    opacity: .35;
}

/* ANIMASI */
@keyframes fadeSlide{
    from{
        opacity:0;
        transform: translateY(-10px);
    }
    to{
        opacity:1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-10px);}
    to {opacity: 1; transform: translateY(0);}
}
.modal-content select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    background: white;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* FOOTER */
.footer{
    margin-top: 15px;
    margin-bottom: -20px;
    text-align: center;

    color: rgba(0, 141, 71, 0.9);
    font-size: 14px;
    letter-spacing: .3px;

}

/* TEXT */
.footer p{
    margin: 0;
    line-height: 1.6;
}

/* LINK OPTIONAL */
.footer a{
    color: #22c55e;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover{
    text-decoration: underline;
}

/* MOBILE */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 20px;
        height: auto;
    }
    .rfid-area {
        width: 100%;
        height: 200px;
    }
    
    .left-panel, .right-panel {
        padding: 20px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    .footer{
        font-size: 13px;
        padding: 15px;
        margin-top: 18px;
    }
}