
/* ===================== HERO SECTION ===================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1.75rem 0 1rem 0;
    margin-bottom: 0.25rem;
    box-shadow: var(--shadow-md);
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    min-height: 160px;
}
.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}
.hero-desc {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #e0e7ff;
}
.hero-ctas {
    display: flex;
    gap: 1rem;
}
.btn-warning {
    background-color: var(--warning);
    color: var(--primary);
    border: none;
}
.btn-warning:hover {
    background-color: #fbbf24;
    color: var(--primary);
}
@media (max-width: 768px) {
    .hero-inner {
        min-height: 120px;
    }
    .hero-title {
        font-size: 1.3rem;
    }
    .hero-desc {
        font-size: 0.95rem;
    }
}

:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #4b5563;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0891b2;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 15.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Admin pages: let footer follow content (no forced bottom) */
.page-admin {
    display: block;
    min-height: auto;
}

.page-admin .footer {
    margin-top: 1.5rem;
}

/* Subtle UI rhythm */
.small, small {
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    margin-right: 0.4rem;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* ===================== HEADER (PPN) ===================== */
.ppn-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-bottom: none;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.ppn-header .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 1rem;
}

/* Make the whole header clickable without changing its appearance */
.ppn-header .header-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.ppn-header .header-link:hover {
    text-decoration: none;
}

.logo-section {
    flex-shrink: 0;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ppn-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.institution-section {
    flex: 0 1 auto;
    min-width: 0;
}

.institution-section h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 1px;
}

.institution-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0.25rem 0 0 0;
    letter-spacing: 1px;
}

.spacer {
    flex: 1;
}

.logout-section {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .ppn-logo {
        width: 60px;
        height: 60px;
    }

    .institution-section h1 {
        font-size: 1.3rem;
    }

    .institution-section h2 {
        font-size: 1rem;
    }

    .spacer {
        display: none;
    }

    .logo-group {
        gap: 0.5rem;
    }

    .logout-section {
        width: 100%;
    }
}

/* ===================== NAVBAR ===================== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: var(--shadow-md);
    padding: 0.35rem 0;
    min-height: 58px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: white !important;
    letter-spacing: 0.5px;
}

.navbar-brand small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.navbar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.navbar .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.navbar .nav-link.login-link {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.35rem 0.95rem;
    font-weight: 700;
}

.navbar .nav-link.login-link:hover {
    background: rgba(255, 255, 255, 0.28);
}

.nav-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.nav-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.nav-profile-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nav-profile-text small {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* Ensure nav-tabs (page tabs) text is visible on light backgrounds */
.nav-tabs .nav-link {
    color: var(--text-muted);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.dropdown-menu {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ===================== CONTAINER ===================== */
.container-main {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2.75rem 1.5rem 3rem;
}

/* ===================== HEADER ===================== */
.page-header {
    margin: 0.5rem 0 2rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
}

.page-header h1 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.65rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    opacity: 0.85;
}

/* ===================== CARD ===================== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 5px solid var(--primary);
    overflow: hidden;
    background: white;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    font-weight: 700;
    color: white;
    padding: 1rem 1.25rem;
    letter-spacing: 0.3px;
}

.card-title {
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

/* ===================== STAT CARD ===================== */
.stat-card {
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    background: white;
    border: none;
    border-left: 5px solid var(--primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.stat-card-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.12);
}

.stat-card.primary .stat-card-icon {
    background: rgba(30, 58, 138, 0.12);
    color: var(--primary);
}

.stat-card.success .stat-card-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.stat-card.info .stat-card-icon {
    background: rgba(8, 145, 178, 0.12);
    color: var(--info);
}

.stat-card.warning .stat-card-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

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

.stat-card.primary {
    border-left-color: var(--primary);
}

.stat-card.success {
    border-left-color: var(--success);
}

.stat-card.info {
    border-left-color: var(--info);
}

.stat-card.warning {
    border-left-color: var(--warning);
}

.stat-card-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.65rem;
}

.stat-card-value {
    font-size: 2.35rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

/* ===================== COMPACT STATS (HOME) ===================== */
.stats-compact .stat-card {
    padding: 1.4rem 1.5rem;
    min-height: 120px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.stats-compact .stat-card-modern {
    gap: 0.85rem;
}

.stats-compact .stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.stats-compact .stat-card-label {
    font-size: 0.78rem;
    letter-spacing: 0.7px;
    margin-bottom: 0.4rem;
}

.stats-compact .stat-card-value {
    font-size: 2rem;
    letter-spacing: -0.5px;
}

/* ===================== PELAPORAN IKAN REFINEMENTS ===================== */
.page-ikan .chart-container {
    height: 420px;
    padding: 1.5rem 1.75rem 1.75rem;
    gap: 0.75rem;
}

.page-ikan .chart-container .chart-title {
    margin-bottom: 0.5rem;
}

.page-ikan .chart-container .chart-canvas {
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
}

.page-ikan .filter-section {
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
}

.page-ikan .filter-title {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.page-ikan .filter-controls {
    gap: 0.85rem;
}

.page-ikan .table-container .h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.page-ikan .btn-group .btn {
    border-radius: 8px !important;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.2px;
    background: #f8fafc;
    border: 1px solid var(--border-color) !important;
    color: var(--primary) !important;
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.06);
    min-width: 72px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
}

.page-ikan .btn-group .btn.active {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    box-shadow: 0 6px 14px rgba(30, 58, 138, 0.18);
}

.page-ikan .btn-group .btn:hover {
    background: #eef2ff;
    color: var(--primary) !important;
}

/* Force toggle button visibility */
.page-ikan #viewTableBtn,
.page-ikan #viewGridBtn {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1px solid var(--border-color) !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-weight: 700;
}

.page-ikan #viewTableBtn.active,
.page-ikan #viewGridBtn.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

/* ===================== ADMIN: GOOGLE SHEETS CONFIG ===================== */
.gs-config-card .card-body {
    padding: 1.5rem 1.75rem;
}

.gs-config-card .form-label {
    margin-bottom: 0.6rem;
}

.gs-config-row {
    align-items: flex-end;
}

.gs-config-action {
    align-self: flex-end;
    padding-top: 1.2rem;
}

.gs-config-help-row {
    margin-top: 0.35rem;
}

.gs-config-button {
    height: 44px;
    padding: 0 1.2rem;
}

@media (max-width: 992px) {
    .gs-config-row {
        align-items: stretch;
    }

    .gs-config-action {
        align-self: stretch;
    }

    .gs-config-button {
        width: 100%;
        height: 44px;
    }
}

/* ===================== BUTTON ===================== */
.btn {
    border-radius: 8px;
    font-weight: 700;
    padding: 0.7rem 1.4rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid rgba(30, 58, 138, 0.35);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover,
.btn-danger:hover,
.btn-light:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #374151;
}

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

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
}

/* ===================== FORM ===================== */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
    background-color: white;
}

.form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 76, 117, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ===================== TABLE ===================== */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: white;
}

.table {
    margin-bottom: 0;
    font-size: 0.95rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: #eff6ff;
    color: var(--primary);
}

.table thead th {
    border: none;
    padding: 0.85rem 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 0.8rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-light);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.table tbody tr:nth-child(even) {
    background-color: #fbfdff;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    color: #1f2937;
    line-height: 1.4;
}

.table td .badge {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.table-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    padding: 0.75rem 0;
}

.table-pagination .page-btn {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--primary);
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.table-pagination .page-btn.active,
.table-pagination .page-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===================== FILTER SECTION ===================== */
.filter-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
    border-left: 5px solid var(--primary);
}

.filter-mode-tabs {
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-color);
}

.filter-mode-tabs .nav-link {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.6rem 1rem;
}

.filter-mode-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.filter-tab-content {
    padding-top: 0.5rem;
}

.filter-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: flex-end;
}

.filter-control {
    display: flex;
    flex-direction: column;
}

.filter-control label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
}

.filter-control input,
.filter-control select {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}

.filter-control input:focus,
.filter-control select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* ===================== CHART CONTAINER ===================== */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
    position: relative;
    height: 450px;
    display: flex;
    flex-direction: column;
    border-left: 5px solid var(--primary);
}

.chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.chart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.chart-toggle input {
    accent-color: var(--primary);
}

.chart-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-title small {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.25rem;
}

.chart-canvas {
    flex: 1;
    position: relative;
    min-height: 300px;
}

/* ===================== TABS ===================== */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 0.35rem;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 10px 10px 0 0;
    background: #f1f5f9;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary-light);
    background: rgba(30, 58, 138, 0.08);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: white;
    box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.08);
}

/* ===================== ALERT ===================== */
.alert {
    border: none;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #047857;
}

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

.alert-info {
    background-color: #cffafe;
    color: #0c4a6e;
}

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

/* ===================== MODAL ===================== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ===================== FOOTER ===================== */
.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2.5rem 1rem 1.5rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.footer-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    line-height: 1.6;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

.footer-social i {
    font-size: 1.1rem;
    line-height: 1;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-map-embed iframe {
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .container-main {
        padding: 1rem;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .chart-container {
        height: 300px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 0.85rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .footer-content {
        text-align: left;
    }
}

/* ===================== UTILITY ===================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-2 { padding-top: 1rem; }
.pb-2 { padding-bottom: 1rem; }

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* ===================== DASHBOARD STYLING ===================== */
.dashboard-card {
    border: 1px solid var(--border-color) !important;
    border-top: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.dashboard-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: 0.2px;
}

.chart-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.8rem;
    background-color: var(--bg-light);
}

.chart-icon.primary {
    background-color: rgba(30, 58, 138, 0.1);
    border: 2px solid var(--primary);
}

.chart-icon.success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
}

.chart-icon.info {
    background-color: rgba(8, 145, 178, 0.1);
    border: 2px solid var(--info);
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    color: white !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.table thead th {
    background-color: #eff6ff !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 1rem 1.1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-light);
    box-shadow: inset 0 0 10px rgba(30, 58, 138, 0.05);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table-light {
    background-color: var(--bg-light) !important;
}

.btn-light {
    background-color: white !important;
    color: var(--primary) !important;
    border: 1px solid var(--border-color);
}

.btn-light:hover {
    background-color: var(--bg-light) !important;
}

/* ===================== IMPROVED FORM STYLING ===================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 76, 117, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ===================== FORM SECTION CARDS ===================== */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary);
}

.form-section-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================== TABLE IMPROVEMENTS ===================== */
.table-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: white;
    margin-bottom: 2rem;
}

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

.table thead {
    background: #eff6ff;
    color: var(--primary);
}

.table thead th {
    border: none;
    padding: 1rem 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 0.8rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-light);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.table tbody td {
    padding: 1.125rem;
    vertical-align: middle;
}

.table-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================== BADGE STYLING ===================== */
.badge {
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.table-empty {
    padding: 0.5rem;
    text-align: center;
}

.table-empty .empty-state {
    padding: 1.5rem 1rem;
}
 
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ===================== CAROUSEL ===================== */
.carousel-banner {
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow-md);
    border-radius: 16px;
    overflow: hidden;
    min-height: 250px;
    max-height: 450px;
}

.carousel-item {
    height: 420px;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
    padding: 3rem 2rem 2rem;
    margin: 0;
}

.carousel-caption .btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-caption .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators [data-bs-target] {
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-indicators [data-bs-target]:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.carousel-indicators .active {
    background-color: white;
    width: 12px;
    height: 12px;
}

.carousel-control-prev,
.carousel-control-next {
    opacity: 0.5;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-item {
        height: 320px;
    }
    
    .carousel-caption {
        padding: 2rem 1rem 1rem;
    }
    
    .carousel-caption .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
}

/* ===================== CAROUSEL (REMOVED - Dashboard First) ===================== */

@keyframes zoomIn {
    from {
        opacity: 0.9;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 280px;
    }

    .carousel-banner {
        margin-bottom: 1.5rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
    }
}