* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --danger: #f56565;
    --success: #48bb78;
    --warning: #ed8936;
    --info: #4299e1;
    --light: #f7fafc;
    --dark: #2d3748;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
}

body {
    color: var(--dark);
    line-height: 1.6;
}

.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: var(--primary);
    color: white;
    border-bottom: none;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.btn {
    border-radius: 6px;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.alert {
    border: none;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
}

.alert-danger {
    background-color: #fed7d7;
    color: #742a2a;
}

.alert-warning {
    background-color: #feebc8;
    color: #7c2d12;
}

.alert-info {
    background-color: #bee3f8;
    color: #2c5282;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

table thead {
    background-color: var(--dark);
    color: white;
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

table tbody tr:hover {
    background-color: var(--light);
}

.form-control {
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background-color: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background-color: #fed7d7;
    color: #742a2a;
}

.badge-warning {
    background-color: #feebc8;
    color: #7c2d12;
}

.sidebar {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar a:hover {
    background-color: var(--light);
    color: var(--primary);
}

.sidebar a.active {
    background-color: var(--primary);
    color: white;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.stat-card h5 {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.modal-header {
    background-color: var(--primary);
    color: white;
}

.presensi-form {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    padding: 2rem;
    color: white;
    margin: 2rem 0;
}

.presensi-form h2 {
    margin-bottom: 1.5rem;
}

/* Kotak pencarian dengan hasil dropdown (dipakai di beberapa halaman
   untuk mencari jemaat: presensi umat & pendaftaran fingerprint admin) */
.autocomplete-box {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.autocomplete-list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.9rem;
    border: none;
    background: white;
    cursor: pointer;
}

.autocomplete-list button:hover {
    background-color: var(--light);
}

.selected-jemaat {
    display: none;
    background-color: #ebf4ff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .sidebar {
        margin-bottom: 2rem;
    }

    table {
        font-size: 0.9rem;
    }

    table th, table td {
        padding: 0.75rem 0.5rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}