/* Warga Modern CSS - Modern & Responsive Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #818cf8;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Modern Navbar */
.warga-navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.warga-navbar .brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.warga-navbar .brand i {
    font-size: 1.5rem;
}

.warga-navbar .nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.warga-navbar .nav-menu li {
    list-style: none;
}

.warga-navbar .nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    pointer-events: auto;
}

.warga-navbar .nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s;
}

.warga-navbar .nav-menu a:hover::before,
.warga-navbar .nav-menu a.active::before {
    left: 0;
}

.warga-navbar .nav-menu a:hover,
.warga-navbar .nav-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.warga-navbar .user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.warga-navbar .hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    color: #fff;
}

.warga-navbar .hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.warga-navbar .nav-menu .close-btn {
    display: none;
}

/* Main Content */
.warga-main-content {
    padding: 2rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Cards */
.warga-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.warga-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.warga-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.warga-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.warga-card-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Modern Buttons */
.warga-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.warga-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
}

.warga-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

.warga-btn-secondary {
    background: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.warga-btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

.warga-btn-success {
    background: var(--success-color);
    color: #fff;
}

.warga-btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Modern Forms */
.warga-form-group {
    margin-bottom: 1.25rem;
}

.warga-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.warga-form-label .required {
    color: var(--danger-color);
}

.warga-form-input,
.warga-form-select,
.warga-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
}

.warga-form-input:focus,
.warga-form-select:focus,
.warga-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.warga-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Modern Tables */
.warga-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.warga-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
}

.warga-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.warga-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

.warga-table tbody tr {
    transition: var(--transition);
}

.warga-table tbody tr:hover {
    background: var(--light-color);
}

.warga-table tbody tr:last-child td {
    border-bottom: none;
}

/* Modern Alerts */
.warga-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.warga-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.warga-alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.warga-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.warga-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

/* Modern Badges */
.warga-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.warga-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.warga-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.warga-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.warga-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Modern Grid */
.warga-grid {
    display: grid;
    gap: 1.5rem;
}

.warga-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.warga-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.warga-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Modern Stats Cards */
.warga-stat-card {
    background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
}

.warga-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.warga-stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
}

.warga-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.warga-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modern Menu Cards */
.warga-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.warga-menu-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.warga-menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.warga-menu-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.warga-menu-card:hover i {
    transform: scale(1.1);
}

.warga-menu-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

/* Bottom Navigation Bar (Mobile Only) */
.warga-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
    max-height: 80px;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.warga-bottom-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.warga-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    padding: clamp(0.375rem, 1.5vw, 0.5rem) clamp(0.125rem, 1vw, 0.25rem);
    min-width: clamp(50px, 12vw, 60px);
    max-width: clamp(60px, 15vw, 80px);
    transition: var(--transition);
    flex: 0 0 auto;
    position: relative;
    flex-shrink: 0;
}

.warga-bottom-nav-item i {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    margin-bottom: clamp(0.125rem, 0.5vw, 0.25rem);
    transition: var(--transition);
    color: var(--text-secondary);
}

.warga-bottom-nav-item span {
    font-size: clamp(0.6rem, 2vw, 0.6875rem);
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

.warga-bottom-nav-item.active {
    color: var(--primary-color);
}

.warga-bottom-nav-item.active i {
    color: var(--primary-color);
    transform: scale(1.15);
}

.warga-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 3px 3px;
}

.warga-bottom-nav-item:hover {
    color: var(--primary-color);
}

.warga-bottom-nav-item:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .warga-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .warga-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .warga-navbar {
        padding: 0.875rem 1rem;
    }
    
    /* Sembunyikan menu di header pada mobile */
    .warga-navbar .nav-menu {
        display: none !important;
    }
    
    .warga-navbar .hamburger {
        display: none !important;
    }
    
    .warga-navbar .user {
        display: none;
    }
    
    /* Tampilkan bottom navigation */
    .warga-bottom-nav {
        display: flex;
        padding: clamp(0.375rem, 1.5vw, 0.5rem) 0;
        max-height: clamp(65px, 18vw, 80px);
    }
    
    /* Tambahkan padding bottom pada content agar tidak tertutup bottom nav */
    .warga-main-content {
        padding: 1.25rem 1rem;
        padding-bottom: clamp(4.5rem, 22vw, 5.5rem);
    }
    
    body {
        padding-bottom: clamp(65px, 18vw, 80px);
    }
    
    /* Responsif untuk banyak item menu */
    .warga-bottom-nav-item {
        min-width: clamp(45px, 11vw, 55px);
        max-width: clamp(55px, 14vw, 70px);
    }
    
    .warga-bottom-nav-item i {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
    }
    
    .warga-bottom-nav-item span {
        font-size: clamp(0.55rem, 1.8vw, 0.65rem);
    }
    
    .warga-grid-2,
    .warga-grid-3,
    .warga-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .warga-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .warga-table {
        font-size: 0.875rem;
    }
    
    .warga-table th,
    .warga-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .warga-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .warga-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .warga-stat-value {
        font-size: 1.5rem;
    }
    
    .warga-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Bottom nav untuk layar sangat kecil */
    .warga-bottom-nav {
        padding: 0.375rem 0;
        max-height: 65px;
        justify-content: flex-start;
        gap: 0.25rem;
    }
    
    .warga-bottom-nav-item {
        min-width: 45px;
        max-width: 55px;
        padding: 0.375rem 0.125rem;
    }
    
    .warga-bottom-nav-item i {
        font-size: 0.9rem;
        margin-bottom: 0.125rem;
    }
    
    .warga-bottom-nav-item span {
        font-size: 0.55rem;
    }
    
    .warga-main-content {
        padding-bottom: 4.5rem;
    }
    
    body {
        padding-bottom: 65px;
    }
}

/* Untuk layar sangat kecil dengan banyak menu, enable horizontal scroll */
@media (max-width: 360px) {
    .warga-bottom-nav {
        justify-content: flex-start;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .warga-bottom-nav-item {
        min-width: 42px;
        max-width: 50px;
    }
}

/* Mobile Menu Overlay */
.warga-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.warga-menu-overlay.active {
    display: block;
    pointer-events: auto;
}

/* Pastikan overlay tidak menghalangi di desktop */
@media (min-width: 769px) {
    .warga-menu-overlay {
        display: none !important;
        pointer-events: none !important;
    }
    
    /* Sembunyikan bottom nav di desktop */
    .warga-bottom-nav {
        display: none !important;
    }
    
    /* Pastikan body tidak ada padding bottom di desktop */
    body {
        padding-bottom: 0 !important;
    }
    
    /* Sembunyikan bottom nav di desktop */
    .warga-bottom-nav {
        display: none !important;
    }
}

/* Loading Animation */
.warga-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}


