/* ==========================================
   WEDDING GUESTBOOK PREMIUM v2
========================================== */

:root{
    --primary:#214E43;
    --secondary:#2f6a5c;
    --accent:#E8C547;

    --success:#2ecc71;
    --warning:#f1c40f;
    --danger:#e74c3c;

    --white:#ffffff;
    --dark:#222;
    --gray:#777;
    --bg:#f6f7fb;

    --radius:18px;
    --shadow:0 10px 30px rgba(0,0,0,.08);
    --transition:.3s ease;
}

/* ==========================================
RESET
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI",sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:var(--bg);
    color:#333;
}

/* Scrollbar */

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#eee;
}

::-webkit-scrollbar-thumb{
    background:var(--primary);
    border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
    background:var(--secondary);
}

/* ==========================================
LAYOUT
========================================== */

.layout{
    display:flex;
    min-height:100vh;
}

.content{
    flex:1;
    padding:35px;
}

/* ==========================================
SIDEBAR
========================================== */

.sidebar{

    width:270px;

    background:linear-gradient(
        180deg,
        var(--primary),
        var(--secondary)
    );

    color:white;

    display:flex;
    flex-direction:column;

    padding:25px;

    box-shadow:
        6px 0 20px rgba(0,0,0,.08);

}

/* ==========================================
LOGO
========================================== */

.logo{
    text-align:center;
    margin-bottom:35px;
}

.logo img{

    width:95px;
    height:95px;

    border-radius:50%;

    object-fit:cover;

    border:4px solid rgba(255,255,255,.15);

    background:white;

    margin-bottom:15px;

    transition:var(--transition);

}

.logo img:hover{

    transform:rotate(5deg) scale(1.05);

}

.logo h2{

    font-size:22px;
    font-weight:700;
    line-height:1.3;

}

/* ==========================================
MENU
========================================== */

.sidebar nav{

    display:flex;
    flex-direction:column;
    flex:1;
    gap:8px;

}

.sidebar nav a{

    display:flex;
    align-items:center;

    gap:12px;

    text-decoration:none;

    color:white;

    padding:15px 18px;

    border-radius:14px;

    transition:var(--transition);

    font-weight:500;

}

.sidebar nav a:hover{

    background:rgba(255,255,255,.12);

    transform:translateX(6px);

}

.sidebar nav a.active{

    background:white;

    color:var(--primary);

    font-weight:bold;

    box-shadow:0 8px 18px rgba(0,0,0,.15);

}

/* Logout */

.sidebar nav a:last-child{

    margin-top:auto;

    background:#c0392b;

}

.sidebar nav a:last-child:hover{

    background:#e74c3c;

}

/* ==========================================
TOPBAR
========================================== */

.topbar{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:30px;

}

.topbar h1{

    color:var(--primary);

    font-size:34px;

}

.topbar p{

    color:#777;

    margin-top:6px;

}

.admin{

    background:white;

    padding:12px 22px;

    border-radius:50px;

    box-shadow:var(--shadow);

    font-weight:600;

}
/* ==========================================
HERO
========================================== */

.hero{

    position:relative;

    overflow:hidden;

    border-radius:25px;

    padding:60px 40px;

    margin-bottom:35px;

    text-align:center;

    background:
        linear-gradient(
            rgba(0,0,0,.35),
            rgba(0,0,0,.35)
        ),
        center/cover no-repeat;

    color:white;

    box-shadow:var(--shadow);

}

.hero::before{

    content:"";

    position:absolute;

    inset:0;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.08),
            transparent
        );

}

.hero>*{

    position:relative;

    z-index:2;

}

.hero-logo{

    width:120px;

    height:120px;

    object-fit:cover;

    border-radius:50%;

    border:5px solid white;

    background:white;

    box-shadow:0 12px 30px rgba(0,0,0,.25);

    margin-bottom:20px;

    transition:.4s;

}

.hero-logo:hover{

    transform:scale(1.08) rotate(5deg);

}

.hero h1{

    font-size:42px;

    margin-bottom:10px;

    color:white;

}

.hero p{

    font-size:18px;

    opacity:.95;

    margin-top:6px;

}

/* ==========================================
STATISTIC CARD
========================================== */

.cards{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));

    gap:20px;

    margin-bottom:35px;

}

.card{

    background:white;

    border-radius:22px;

    padding:28px;

    box-shadow:var(--shadow);

    transition:.35s;

    position:relative;

    overflow:hidden;

}

.card::after{

    content:"";

    position:absolute;

    right:-40px;

    top:-40px;

    width:120px;

    height:120px;

    background:rgba(33,78,67,.05);

    border-radius:50%;

}

.card:hover{

    transform:translateY(-8px);

}

.card h3{

    color:#777;

    margin-bottom:10px;

}

.card h2{

    font-size:44px;

    color:var(--primary);

    transition:.3s;

}

.card:hover h2{

    transform:scale(1.08);

}

/* ==========================================
ACTIVITY
========================================== */

.activity{

    background:white;

    border-radius:22px;

    padding:28px;

    margin-bottom:30px;

    box-shadow:var(--shadow);

}

.activity h2{

    margin-bottom:20px;

    color:var(--primary);

}

/* ==========================================
LATEST GUEST
========================================== */

.latest-card{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:15px;

    padding:18px;

    border-left:6px solid var(--primary);

    border-radius:16px;

    background:#f9fbfb;

    margin-bottom:12px;

    animation:fadeLatest .4s;

}

.latest-card:last-child{

    margin-bottom:0;

}

.latest-icon{

    width:60px;

    height:60px;

    border-radius:50%;

    display:flex;

    align-items:center;

    justify-content:center;

    background:var(--primary);

    color:white;

    font-size:26px;

}

.latest-info{

    flex:1;

}

.latest-info h3{

    color:var(--primary);

    margin-bottom:5px;

}

.latest-info p{

    color:#777;

}

.latest-time{

    font-size:22px;

    font-weight:bold;

    color:var(--primary);

}

@keyframes fadeLatest{

    from{

        opacity:0;

        transform:translateY(20px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================================
PROGRESS
========================================== */

.progress-box{

    margin-top:20px;

}

.progress-bar{

    width:100%;

    height:22px;

    background:#ececec;

    border-radius:30px;

    overflow:hidden;

}

.progress-fill{

    width:0;

    height:100%;

    background:

    linear-gradient(

        90deg,

        var(--primary),

        var(--accent)

    );

    border-radius:30px;

    transition:width .8s ease;

}

.progress-text{

    margin-top:12px;

    text-align:center;

    font-size:20px;

    font-weight:bold;

    color:var(--primary);

}
/* ==========================================
TABLE
========================================== */

table{

    width:100%;

    border-collapse:collapse;

    background:white;

    border-radius:20px;

    overflow:hidden;

    box-shadow:var(--shadow);

}

th{

    background:var(--primary);

    color:white;

    padding:18px;

    text-align:left;

    font-size:15px;

}

td{

    padding:16px;

    border-bottom:1px solid #eee;

    transition:.3s;

}

tbody tr{

    transition:.3s;

}

tbody tr:hover{

    background:#f5faf8;

}

/* ==========================================
SEARCH
========================================== */

#search{

    width:100%;

    padding:14px 18px;

    border:1px solid #ddd;

    border-radius:14px;

    margin:20px 0;

    font-size:16px;

    transition:.3s;

}

#search:focus{

    outline:none;

    border-color:var(--primary);

    box-shadow:0 0 0 4px rgba(33,78,67,.12);

}

/* ==========================================
STATUS BADGE
========================================== */

.hadir{

    display:inline-block;

    background:#2ecc71;

    color:white;

    padding:7px 16px;

    border-radius:30px;

    font-size:13px;

    font-weight:bold;

}

.belum{

    display:inline-block;

    background:#f1c40f;

    color:#333;

    padding:7px 16px;

    border-radius:30px;

    font-size:13px;

    font-weight:bold;

}

/* ==========================================
BUTTON
========================================== */

button{

    border:none;

    border-radius:12px;

    padding:12px 20px;

    cursor:pointer;

    font-size:15px;

    font-weight:bold;

    transition:.25s;

}

button:hover{

    transform:translateY(-2px);

}

.btn-checkin{

    background:var(--primary);

    color:white;

}

.btn-checkin:hover{

    background:var(--secondary);

}

.btn-disabled{

    background:#dcdcdc;

    color:#666;

}

/* ==========================================
FORM
========================================== */

input,
select{

    width:100%;

    padding:13px 15px;

    border:1px solid #ddd;

    border-radius:12px;

    font-size:15px;

    transition:.3s;

    background:white;

}

input:focus,
select:focus{

    outline:none;

    border-color:var(--primary);

    box-shadow:0 0 0 4px rgba(33,78,67,.10);

}

label{

    display:block;

    margin-bottom:8px;

    font-weight:bold;

    color:#555;

}

/* ==========================================
SAVE BUTTON
========================================== */

#saveBtn{

    width:100%;

    margin-top:25px;

    padding:16px;

    background:var(--primary);

    color:white;

    font-size:17px;

}

#saveBtn:hover{

    background:var(--secondary);

}

/* ==========================================
IMAGE PREVIEW
========================================== */

#logoPreview{

    width:130px;

    height:130px;

    object-fit:cover;

    border-radius:18px;

    border:3px solid white;

    box-shadow:0 8px 20px rgba(0,0,0,.12);

}

#bgPreview{

    width:100%;

    height:230px;

    object-fit:cover;

    border-radius:18px;

    box-shadow:0 8px 20px rgba(0,0,0,.12);

}

/* ==========================================
LOGOUT
========================================== */

.sidebar nav a:last-child{

    margin-top:auto;

    background:#d9534f;

}

.sidebar nav a:last-child:hover{

    background:#c9302c;

}

/* ==========================================
RESPONSIVE
========================================== */

@media(max-width:900px){

    .layout{

        flex-direction:column;

    }

    .sidebar{

        width:100%;

        min-height:auto;

    }

    .topbar{

        flex-direction:column;

        align-items:flex-start;

        gap:15px;

    }

    .hero{

        padding:40px 20px;

    }

    .hero h1{

        font-size:30px;

    }

    .cards{

        grid-template-columns:1fr;

    }

    table{

        display:block;

        overflow-x:auto;

    }

}
/* ==========================================
HERO BACKGROUND
========================================== */

.hero{

    position:relative;

    min-height:340px;

    border-radius:24px;

    overflow:hidden;

    background-size:cover;

    background-position:center;

    background-repeat:no-repeat;

    display:flex;

    justify-content:center;

    align-items:center;

    margin-bottom:30px;

}

.hero-overlay{

    position:absolute;

    inset:0;

    background:linear-gradient(

        rgba(0,0,0,.25),

        rgba(0,0,0,.45)

    );

}

.hero-content{

    position:relative;

    z-index:2;

    text-align:center;

    color:white;

}

.hero-logo{

    width:120px;

    height:120px;

    border-radius:50%;

    object-fit:cover;

    border:5px solid rgba(255,255,255,.9);

    margin-bottom:20px;

}

.hero h1{

    color:white;

    font-size:44px;

}

.hero p{

    color:white;

    opacity:.95;

    font-size:18px;

}
.export-btn{

    display:flex;
    gap:15px;
    margin:20px 0;

}

.export-btn button{

    width:auto;
    padding:12px 22px;

}

.export-btn button:first-child{

    background:#27ae60;

}

.export-btn button:last-child{

    background:#c0392b;

}