/* Global Styles */
:root {
    --primary-color: #10b981;
    --secondary-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1f2937;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    line-height: 1.5;
    color: #374151;
    font-size: 0.875rem; /* 14px */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="mosque-pattern" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M50 10 L90 50 L50 90 L10 50 Z" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="1000" height="1000" fill="url(%23mosque-pattern)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-icon {
    font-size: 8rem;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Gradients */
.bg-gradient-brand {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.bg-gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.bg-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Authentication Styles */
.auth-bg {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
    padding: 1rem;
}

.auth-bg::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(16,185,129,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: -1;
}

.auth-card {
    max-width: 500px;
    margin: 2rem auto;
    padding: 1.5rem;
}

/* Card Styles */
.card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 1.25rem;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.feature-header {
    padding: 1.25rem;
    text-align: center;
    position: relative;
}

.feature-header i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-body {
    padding: 1.25rem;
}

.feature-body ul li {
    padding: 0.375rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.feature-body ul li:last-child {
    border-bottom: none;
}

/* Icon Circle */
.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.icon-circle i {
    font-size: 1.5rem;
}

/* Dashboard Styles */
.dashboard-sidebar {
    background: linear-gradient(180deg, #111827 0%, #1f2937 45%, #111827 100%);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    max-width: 90vw;
    z-index: 999;
    transition: all 0.3s ease;
    overflow-y: auto;
    font-size: 0.875rem;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.18);
}

.dashboard-sidebar.collapsed {
    width: 60px;
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.sidebar-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        120px 80px at 20% 0%,
        rgba(16, 185, 129, 0.25),
        transparent 70%
    );
    opacity: 0.6;
    pointer-events: none;
}

.sidebar-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f8fafc;
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    /* border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12); */
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sidebar-subtitle {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.55);
}

.sidebar-nav {
    padding: 0.75rem 0.25rem 1rem;
}

.sidebar-nav .nav-link {
    color: rgba(248, 250, 252, 0.72);
    padding: 0.6rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.875rem;
    margin: 0.15rem 0.5rem;
    position: relative;
    gap: 0.65rem;
}

.sidebar-nav .nav-link i {
    width: 18px;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(16, 185, 129, 0.16);
    color: #e2f8f0;
    border-color: rgba(16, 185, 129, 0.25);
}

.sidebar-nav .nav-link.active::before {
    content: "";
    position: absolute;
    left: -0.5rem;
    top: 50%;
    width: 3px;
    height: 28px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, #34d399 0%, #0ea5a4 100%);
}

.sidebar-logout .nav-link {
    color: rgba(248, 113, 113, 0.9);
}

.sidebar-logout .nav-link:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
}

.dashboard-content {
    margin-left: 200px;
    padding: 1rem 0.75rem;
    background: #f8fafc;
    min-height: 100vh;
    transition: all 0.3s ease;
    width: calc(100% - 200px);
    max-width: 100vw;
    box-sizing: border-box;
    font-size: 0.875rem;
}

.dashboard-content.expanded {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
    position: fixed;
    top: 1rem;
    left: 1rem;
}

.hamburger-line {
    width: 30px;
    height: 3px;
    background: #1f2937;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
    transform-origin: center;
}

.hamburger-menu.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Sidebar */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.dashboard-sidebar.mobile {
    position: fixed;
    left: -250px;
    width: 250px;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.dashboard-sidebar.mobile.active {
    left: 0;
}

/* Top Navbar */
.top-navbar {
    background: linear-gradient(135deg, #0f766e 0%, #0b4f44 60%, #083b33 100%);
    padding: 0.85rem 1.25rem;
    margin: -1rem -0.75rem 1.5rem -0.75rem; /* Negative margin to counteract dashboard-content padding */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-navbar h4 {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    color: #f8fafc;
}

.navbar-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.navbar-kicker {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: rgba(255, 255, 255, 0.6);
}

.navbar-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-menu-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
}

.user-avatar i {
    font-size: 1.4rem;
}

.user-meta small {
    color: rgba(255, 255, 255, 0.7);
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 1.5rem;
    overflow-x: auto;
}

.stats-col {
    min-width: 0;
}

.dashboard-hero-image {
    width: 100%;
    max-width: 360px;
    height: 200px;
    object-fit: cover;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stats-card.primary {
    border-left-color: #3b82f6;
}
.stats-card.success {
    border-left-color: #10b981;
}
.stats-card.warning {
    border-left-color: #f59e0b;
}
.stats-card.danger {
    border-left-color: #ef4444;
}

.stats-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-card p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stats-card small {
    font-size: 0.75rem;
}

/* Data Table */
.table-responsive {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.table th {
    border-top: none;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #f3f4f6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 0.375rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.15);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-content {
        padding: 0.875rem 0.625rem;
    }

    .stats-card,
    .chart-container,
    .card {
        padding: 1rem;
    }

    .dashboard-header {
        padding: 0.875rem 1.25rem;
    }
}

@media (max-width: 992px) {
    .dashboard-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        max-width: 100vw;
        height: auto;
    }

    .dashboard-content {
        margin-left: 0;
        width: 100%;
        padding: 0.75rem 0.5rem;
    }

    .row {
        flex-direction: column !important;
    }

    .stats-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .dashboard-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        max-width: 100vw;
        height: auto;
    }

    .dashboard-content {
        margin-left: 0;
        width: 100%;
        padding: 0.625rem 0.375rem;
        min-width: 0;
        max-width: 100vw;
    }

    .row {
        flex-direction: column !important;
    }

    .stats-card,
    .chart-container,
    .card {
        padding: 0.875rem;
        margin-bottom: 0.875rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
    }

    .hero-icon {
        font-size: 5rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-content {
        padding: 1rem 0.5rem;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex;
    }

    /* Adjust sidebar for mobile */
    .dashboard-sidebar.mobile {
        display: block;
    }
}

@media (max-width: 576px) {
    .dashboard-sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100vw;
    }

    .dashboard-content {
        margin-left: 0;
        width: 100%;
        padding: 0.5rem 0.25rem;
        min-width: 0;
        max-width: 100vw;
    }

    .stats-card,
    .chart-container,
    .card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .dashboard-header {
        padding: 0.75rem;
    }

    .stats-number {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.375rem 0.875rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px 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);
    }
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1055;
}

.toast {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
}

.toast-header {
    padding: 0.5rem 0.75rem;
}

.toast-body {
    padding: 0.75rem;
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.chart-container h5 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

/* Payment Status */
.status-lunas {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-belum {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    margin: 0.25rem 0;
}

/* Dropdowns */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    padding: 0.25rem 0;
    z-index: 1050 !important;
    position: absolute !important;
}

.dropdown-item {
    padding: 0.375rem 1rem;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
}

/* List Group */
.list-group-item {
    padding: 0.75rem 1rem;
}

/* Pagination */
.pagination {
    font-size: 0.875rem;
}

.page-link {
    padding: 0.375rem 0.75rem;
}
