@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================
   1. DESIGN TOKENS — CIVIC & COMPLAINT RESOLUTION PALETTE
   ========================================================== */
:root {
    /* Primary Civic Navy & Trust Blues */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-deep: #0f2942;
    --primary-light: #60a5fa;
    --primary-soft: rgba(37, 99, 235, 0.08);
    --primary-glow: rgba(37, 99, 235, 0.28);

    /* Secondary & Civic Accents */
    --secondary: #0ea5e9;
    --secondary-dark: #0284c7;
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.08);

    /* Complaint Semantic States */
    --status-resolved: #059669;
    --status-resolved-bg: rgba(5, 150, 105, 0.1);
    --status-pending: #d97706;
    --status-pending-bg: rgba(217, 119, 6, 0.1);
    --status-investigating: #0284c7;
    --status-investigating-bg: rgba(2, 132, 199, 0.1);
    --status-rejected: #64748b;
    --status-rejected-bg: rgba(100, 116, 139, 0.1);
    --priority-high: #dc2626;
    --priority-medium: #d97706;
    --priority-low: #10b981;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --dark: #090d16;

    /* Modern Gradients */
    --gradient-hero: linear-gradient(135deg, #0a1128 0%, #0f2942 50%, #1d4ed8 100%);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #0f2942 100%);
    --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-sidebar: linear-gradient(180deg, #0a1128 0%, #0f1f38 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);

    /* Elevation & Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(15, 41, 66, 0.06);
    --shadow-md: 0 6px 18px -2px rgba(15, 41, 66, 0.08), 0 2px 6px -1px rgba(15, 41, 66, 0.04);
    --shadow-lg: 0 14px 34px -4px rgba(15, 41, 66, 0.12), 0 4px 12px -2px rgba(15, 41, 66, 0.06);
    --shadow-xl: 0 22px 50px -8px rgba(15, 41, 66, 0.18);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
    --shadow-card: 0 4px 20px rgba(15, 41, 66, 0.05);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================
   2. BASE & TYPOGRAPHY (POPPINS)
   ========================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
    line-height: 1.25;
}

/* Explicit bright white for dark sections and hero banners */
.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section h4,
.hero-section h5,
.hero-section h6,
.hero-section .display-4,
.hero-section .lead,
.hero-section p,
.hero-section span:not([style*="gradient"]):not(.badge):not(.star-badge),
header.text-white h1,
header.text-white h2,
header.text-white h3,
header.text-white h4,
header.text-white h5,
header.text-white h6,
header.text-white p,
.page-header h1,
.page-header h2,
.page-header p,
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6,
.text-white p,
.top-bar,
.top-bar * {
    color: #ffffff !important;
}

h1, .display-4 { font-weight: 800; }
h2 { font-weight: 700; }
h3, h4 { font-weight: 600; }
h5, h6 { font-weight: 600; }

p {
    font-weight: 400;
    color: var(--gray-600);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.25s var(--ease-smooth);
}
a:hover {
    color: var(--primary-dark);
}

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

/* ==========================================================
   3. TOP BAR
   ========================================================== */
.top-bar {
    background: var(--primary-deep);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.825rem;
    letter-spacing: 0.2px;
}

/* ==========================================================
   4. NAVIGATION WITH OVAL / PILL HOVER EFFECTS
   ========================================================== */
.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(15, 41, 66, 0.04);
    transition: all 0.3s var(--ease-smooth);
    padding: 0.85rem 0;
}

.navbar-brand {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    transition: transform 0.25s var(--ease-smooth);
}
.navbar-brand:hover {
    transform: scale(1.02);
}

.brand-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Oval Pill Navigation Links */
.navbar-nav .nav-link-oval {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px !important;
    margin: 0 4px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    position: relative;
    transition: all 0.25s var(--ease-smooth);
    border: 1px solid transparent;
}

.navbar-nav .nav-link-oval:hover {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.navbar-nav .nav-link-oval.active {
    background: var(--primary);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    border-color: transparent;
}

.navbar-nav .nav-link-oval.active:hover {
    background: var(--primary-dark);
    color: #ffffff !important;
}

.nav-link-track {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary-dark) !important;
    border: 1px solid rgba(14, 165, 233, 0.25) !important;
}
.nav-link-track:hover {
    background: var(--secondary) !important;
    color: white !important;
}

/* ==========================================================
   5. BUTTONS (PILL & OVAL STYLING)
   ========================================================== */
.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-pill);
    transition: all 0.25s var(--ease-smooth);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--status-resolved);
    border-color: var(--status-resolved);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}
.btn-success:hover {
    background: #047857;
    border-color: #047857;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
}
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* ==========================================================
   6. HERO SECTION
   ========================================================== */
.hero-section {
    background: var(--gradient-hero);
    color: white;
    padding: 5.5rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-glow-1 {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0) 70%);
    top: -100px;
    right: 5%;
    filter: blur(50px);
    pointer-events: none;
}

.hero-glow-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0) 70%);
    bottom: -80px;
    left: 10%;
    filter: blur(60px);
    pointer-events: none;
}

.hero-track-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero-track-box h5,
.hero-track-box p,
.hero-track-box label,
.hero-track-box small {
    color: #ffffff !important;
}

.hero-track-box .form-control {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.hero-track-box .form-control::placeholder {
    color: #94a3b8 !important;
    font-weight: 400;
}

.hero-track-box .input-group-text {
    background-color: #f1f5f9 !important;
    color: var(--primary) !important;
    border: 1px solid #cbd5e1 !important;
}

/* ==========================================================
   7. CARDS & SURFACES
   ========================================================== */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: all 0.3s var(--ease-smooth);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.25);
}

.feature-icon-box {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    transition: transform 0.25s ease;
}
.card:hover .feature-icon-box {
    transform: scale(1.1);
}

/* Category Cards */
.category-card {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--gray-200);
    transition: all 0.25s var(--ease-smooth);
}
.category-card:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================
   8. STATUS & PRIORITY BADGES
   ========================================================== */
.badge {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
}

.badge-status-pending {
    background-color: var(--status-pending-bg) !important;
    color: var(--status-pending) !important;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-status-investigating {
    background-color: var(--status-investigating-bg) !important;
    color: var(--status-investigating) !important;
    border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-status-resolved {
    background-color: var(--status-resolved-bg) !important;
    color: var(--status-resolved) !important;
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-status-rejected {
    background-color: var(--status-rejected-bg) !important;
    color: var(--status-rejected) !important;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.badge-priority-high {
    background-color: rgba(220, 38, 38, 0.1) !important;
    color: var(--priority-high) !important;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-priority-medium {
    background-color: rgba(217, 119, 6, 0.1) !important;
    color: var(--priority-medium) !important;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-priority-low {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--priority-low) !important;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==========================================================
   9. DASHBOARD SIDEBARS (OVAL PILL UI)
   ========================================================== */
.sidebar {
    min-height: 100vh;
    background: var(--gradient-sidebar);
    padding: 1.5rem 0.85rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Sidebar Oval Navigation Pills */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.25s var(--ease-smooth);
    border: 1px solid transparent;
}

.sidebar-link i {
    font-size: 1.15rem;
    margin-right: 0.75rem;
    transition: transform 0.25s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.sidebar-link:hover i {
    transform: scale(1.15);
    color: var(--primary-light);
}

.sidebar-link.active {
    background: var(--gradient-primary);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-link.active i {
    color: #ffffff;
}

/* Role specific sidebar accents */
.sidebar-officer .sidebar-link.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
}

.sidebar-admin .sidebar-link.active {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.45);
}

/* ==========================================================
   10. FORMS & INPUT CONTROLS
   ========================================================= */
.form-control, .form-select {
    font-family: 'Poppins', sans-serif;
    font-size: 0.925rem;
    padding: 0.7rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    background-color: #ffffff;
    transition: all 0.25s var(--ease-smooth);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

/* ==========================================================
   11. STAR RATING MODULE (CITIZEN FEEDBACK)
   ========================================================= */
.star-rating-group {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.35rem;
}
.star-rating-group input {
    display: none;
}
.star-rating-group label {
    font-size: 1.75rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.star-rating-group label:hover,
.star-rating-group label:hover ~ label,
.star-rating-group input:checked ~ label {
    color: #f59e0b;
    transform: scale(1.15);
}

.star-badge {
    color: #f59e0b;
    letter-spacing: 2px;
}

/* ==========================================================
   12. TIMELINE COMPONENT
   ========================================================= */
.timeline-track {
    position: relative;
    padding-left: 2rem;
}
.timeline-track::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.75rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-dot.resolved {
    background: var(--status-resolved);
    box-shadow: 0 0 0 2px var(--status-resolved);
}

/* ==========================================================
   13. TABLES & RESPONSIVE POLISH
   ========================================================= */
.table {
    font-size: 0.925rem;
}
.table thead th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
}
.table tbody td {
    padding: 1.1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}
.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.02);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}