:root {
    --primary-blue: #003366;
    --primary-green: #28a745;
    --light-blue: #e8f4fd;
    --light-green: #e8f5e9;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
}

/* Sidebar */
.wrapper { display: flex; width: 100%; min-height: 100vh; }

.sidebar {
    min-width: 260px;
    max-width: 260px;
    background: linear-gradient(180deg, var(--primary-blue) 0%, #004080 100%);
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-warga {
    background: linear-gradient(180deg, #1a5c2e 0%, var(--primary-green) 100%);
}

.sidebar.active { margin-left: -260px; }

.sidebar-logo { width: 80px; height: auto; border-radius: 50%; background: white; padding: 5px; }

.sidebar .components { padding: 10px 0; }

.sidebar .components li a {
    padding: 12px 20px;
    display: block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar .components li a:hover,
.sidebar .components li a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-left-color: var(--primary-green);
}

.sidebar .components li a i { margin-right: 10px; width: 20px; }

.sidebar-divider { border-top: 1px solid rgba(255,255,255,0.15); }

.content {
    width: 100%;
    margin-left: 260px;
    transition: all 0.3s;
    min-height: 100vh;
}

.content.active { margin-left: 0; }

/* Login Page */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.login-header {
    background: var(--primary-blue);
    padding: 30px;
    text-align: center;
    color: white;
}

.login-logo { width: 120px; margin-bottom: 15px; background: white; border-radius: 50%; padding: 8px; }

.login-body { padding: 30px; }

.nav-tabs .nav-link { color: var(--primary-blue); font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--primary-green); border-bottom-color: var(--primary-green); }

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s;
    overflow: hidden;
}

.stat-card:hover { transform: translateY(-3px); }

.stat-card .card-body { padding: 20px; }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: var(--light-blue); color: var(--primary-blue); }
.stat-icon.green { background: var(--light-green); color: var(--primary-green); }
.stat-icon.orange { background: #fff3e0; color: #f57c00; }
.stat-icon.red { background: #ffebee; color: #c62828; }
.stat-icon.purple { background: #f3e5f5; color: #7b1fa2; }
.stat-icon.teal { background: #e0f2f1; color: #00796b; }

.page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-green);
}

.page-header h4 { color: var(--primary-blue); margin: 0; font-weight: 600; }

.card { border: none; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }

.card-header {
    background: white;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    color: var(--primary-blue);
}

.btn-primary { background: var(--primary-blue); border-color: var(--primary-blue); }
.btn-primary:hover { background: #002244; border-color: #002244; }
.btn-success { background: var(--primary-green); border-color: var(--primary-green); }

.table thead th { background: var(--primary-blue); color: white; font-weight: 500; border: none; }
.table-hover tbody tr:hover { background: var(--light-blue); }

.badge { font-weight: 500; padding: 5px 10px; }

.search-box {
    background: var(--light-blue);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-green);
}

.search-box label { font-weight: 600; color: var(--primary-blue); font-size: 0.85rem; }

.pagination .page-link { color: var(--primary-blue); }
.pagination .page-item.active .page-link { background: var(--primary-blue); border-color: var(--primary-blue); }

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-green);
}

.fc-event { cursor: pointer; }

/* Dashboard Banner */
.dashboard-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.15);
}

.dashboard-banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #00509e 50%, var(--primary-green) 100%);
    opacity: 1;
}

.dashboard-banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.dashboard-banner-content {
    position: relative;
    padding: 28px 32px;
    color: #fff;
}

.dashboard-banner-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dashboard-banner-title {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.dashboard-banner-subtitle {
    opacity: 0.9;
    font-size: 0.85rem;
}

.dashboard-tagline {
    font-size: 1.05rem;
    font-style: italic;
    opacity: 0.95;
    border-left: 3px solid var(--primary-green);
    padding-left: 12px;
    margin-left: 2px;
}

.dashboard-greeting {
    font-size: 0.95rem;
    opacity: 0.95;
}

.dashboard-date {
    display: inline-block;
    margin-left: 12px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 0.85rem;
}

.dashboard-banner-badge {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 20px 16px;
    backdrop-filter: blur(4px);
}

.dashboard-banner-badge i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.dashboard-banner-badge span {
    display: block;
    font-weight: 600;
    font-size: 1rem;
}

.dashboard-banner-badge small {
    opacity: 0.85;
    font-size: 0.8rem;
}

.dashboard-info-card .card-header {
    background: linear-gradient(90deg, var(--light-blue), #fff);
}

.dashboard-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f8f9fa;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.dashboard-action-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateX(4px);
}

.dashboard-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dashboard-action-icon.warning { background: #fff3e0; color: #f57c00; }
.dashboard-action-icon.info { background: var(--light-blue); color: var(--primary-blue); }
.dashboard-action-icon.danger { background: #ffebee; color: #c62828; }

.dashboard-list-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dashboard-list-item:last-of-type { border-bottom: none; }

.dashboard-agenda-highlight {
    display: flex;
    gap: 16px;
    align-items: center;
}

.dashboard-agenda-date {
    background: linear-gradient(135deg, var(--primary-green), #1e7e34);
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    min-width: 70px;
    box-shadow: 0 4px 10px rgba(40,167,69,0.3);
}

.dashboard-agenda-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-agenda-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .sidebar { margin-left: -260px; }
    .sidebar.active { margin-left: 0; }
    .content { margin-left: 0; }
    .stat-card { margin-bottom: 15px; }
    .dashboard-banner-content { padding: 20px; }
    .dashboard-date { display: block; margin-left: 0; margin-top: 8px; }
    .dashboard-banner-badge { margin-top: 8px; }
}

@media print {
    .sidebar, .navbar, .btn, .search-box, .dataTables_filter, .dataTables_length, .dataTables_paginate { display: none !important; }
    .content { margin-left: 0 !important; }
}
