:root {
    --uin-green: #00693e; /* Hijau UIN */
    --uin-gold: #fbc02d;  /* Aksen Emas */
    --uin-dark: #1b5e20;
    --bg-light: #f4f6f8;
    --text-main: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --radius: 10px;
}

body {
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

/* --- Layout Wrapper --- */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Navbar --- */
.navbar {
    background-color: var(--uin-green);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.brand {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand span { color: var(--uin-gold); }
.nav-links a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: 0.3s;
}
.nav-links a:hover { color: var(--uin-gold); }

/* --- Cards & Containers --- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-top: 4px solid var(--uin-green);
}
.page-title {
    margin-bottom: 1.5rem;
    color: var(--uin-dark);
    font-size: 1.8rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
th {
    background-color: #e8f5e9;
    color: var(--uin-dark);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--uin-green);
}
td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: var(--text-light);
}
tr:hover td { background-color: #fafafa; }

/* --- Buttons --- */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
    font-size: 0.9rem;
}
.btn-primary { background: var(--uin-green); color: white; }
.btn-primary:hover { background: var(--uin-dark); }
.btn-danger { background: #d32f2f; color: white; }
.btn-danger:hover { background: #b71c1c; }
.btn-warning { background: var(--uin-gold); color: #333; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* --- Forms --- */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--uin-dark); }
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    box-sizing: border-box; /* Fix padding issues */
}
.form-control:focus {
    border-color: var(--uin-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 105, 62, 0.1);
}

/* --- Badges --- */
.badge { padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.badge-pending { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }
.badge-approved { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge-rejected { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

/* --- Detail View Layout --- */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.info-row {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 5px;
}
.info-label { width: 140px; font-weight: 600; color: #555; }
.info-val { flex: 1; color: #333; }

/* --- Login Page Specific --- */
.login-body {
    background: linear-gradient(135deg, var(--uin-green), #004d40);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* --- Login Page Refined --- */
.login-body {
    /* Gradient Background Hijau UIN */
    background: linear-gradient(135deg, var(--uin-dark) 0%, var(--uin-green) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Hiasan aksen emas di atas kartu */
.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--uin-gold);
}

.login-brand {
    margin-bottom: 2rem;
}
.login-brand h1 {
    margin: 0;
    color: var(--uin-green);
    font-size: 1.8rem;
    font-weight: 700;
}
.login-brand p {
    margin: 5px 0 0;
    color: #666;
    font-size: 0.9rem;
}

/* Styling Input yang lebih manis */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}
.input-group label {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}
.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.input-group input:focus {
    background: #fff;
    border-color: var(--uin-green);
    box-shadow: 0 0 0 4px rgba(0, 105, 62, 0.1);
    outline: none;
}

/* Tombol Login Besar */
.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--uin-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(0, 105, 62, 0.2);
}
.btn-login:hover {
    background: var(--uin-dark);
    transform: translateY(-1px);
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #888;
}

/* --- Receptionist Dashboard Styles --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Banner Grid View */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.banner-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid #eee;
    transition: transform 0.2s;
}
.banner-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.banner-img {
    width: 100%;             /* Lebar mengikuti kartu */
    height: 150px;           /* Tinggi KITA PAKSA tetap 150px */
    object-fit: cover;       /* Potong gambar agar pas (crop), jangan dipenyet */
    object-position: center; /* Fokus potong ke tengah */
    display: block;
    background-color: #f0f0f0;
}

/* 2. Gaya untuk Preview Kecil di Form Edit */
.img-preview-small {
    width: 120px;            /* Lebar fix kecil */
    height: 80px;            /* Tinggi fix kecil */
    object-fit: cover;       /* Crop rapi */
    border-radius: 4px;
    border: 2px solid #ddd;
    margin-bottom: 10px;
    display: block;          /* Agar baris baru */
}

/* Pastikan kartu banner tidak melebar aneh */
.banner-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;        /* Sembunyikan jika ada yang lewat batas */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: flex;           /* Flex layout agar rapi */
    flex-direction: column;
}
.banner-body { padding: 10px; }
.banner-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Status Toggle Indicators */
.status-indicator {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}
.st-active { background-color: #2e7d32; box-shadow: 0 0 5px #2e7d32; }
.st-inactive { background-color: #ccc; }

/* Upload Area yang Cantik */
.upload-area {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: 0.3s;
}
.upload-area:hover { border-color: var(--uin-green); background: #f0fdf4; }

@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}