/* ============================================
   CommuneConnect - Stylesheet
   Citizen / Admin / Team
   ============================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1E3A5F;
    --primary-hover: #162D4A;
    --primary-light: #E8EEF5;
    --primary-10: rgba(30,58,95,0.1);
    --accent: #9B2226;
    --accent-hover: #7A1B1E;
    --accent-light: #F5E6E7;
    --bg: #F5F5F0;
    --white: #FFFFFF;
    --dark: #1A1A1A;
    --text: #1A1A1A;
    --text-secondary: #5C5C5C;
    --text-muted: #999999;
    --border: #E0DDD8;
    --border-light: #EEECE7;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    --header-h: 60px;
    --sidebar-w: 380px;
    --drawer-w: 280px;
    --admin-nav-w: 260px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { height: 100%; overflow: hidden; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.header {
    height: var(--header-h);
    background: var(--accent);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header .icon-btn { color: #FFFFFF; }
.header .icon-btn:hover { background: rgba(255,255,255,0.15); }
.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.brand-name { font-size: 18px; font-weight: 700; color: #FFFFFF; line-height: 1.2; }
.brand-sub { font-size: 11px; color: rgba(255,255,255,0.7); font-weight: 500; }

.icon-btn {
    background: none; border: none; cursor: pointer; padding: 8px;
    border-radius: var(--radius-sm); color: var(--text);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.icon-btn:hover { background: var(--bg); }

/* Role Badge */
.role-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: var(--radius-full);
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.3); font-family: inherit;
    transition: all var(--transition);
    background: rgba(255,255,255,0.15) !important; color: #FFFFFF !important;
}
.role-badge:hover { opacity: 0.8; }
.role-badge span { white-space: nowrap; }

/* Role Picker */
.role-pick-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-md);
    border: 2px solid var(--border); background: var(--white);
    cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.role-pick-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.role-pick-btn.active { border-width: 2px; background: var(--primary-light); }

.lang-selector {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 14px; border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-sm); cursor: pointer;
    font-size: 14px; font-weight: 600; color: #FFFFFF;
    transition: border-color var(--transition);
}
.lang-selector:hover { border-color: rgba(255,255,255,0.6); }
.lang-selector svg { stroke: #FFFFFF; }

/* --- Drawer --- */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.3);
    z-index: 1200; opacity: 0; pointer-events: none;
    transition: opacity var(--transition);
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--drawer-w); background: var(--white);
    z-index: 1300; transform: translateX(-100%);
    transition: transform var(--transition);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-top { padding: 12px 16px; display: flex; justify-content: flex-end; }
.drawer-menu { list-style: none; padding: 0 12px; flex: 1; }
.drawer-menu li { margin-bottom: 2px; }

.drawer-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-md);
    text-decoration: none; color: var(--text);
    font-size: 15px; font-weight: 500;
    transition: all var(--transition);
}
.drawer-link:hover { background: var(--bg); }
.drawer-link.active { color: var(--accent); background: var(--accent-light); }
.drawer-link svg { flex-shrink: 0; }

.drawer-user {
    padding: 16px 20px; border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px;
}
.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.user-details { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 14px; }
.user-loc { font-size: 12px; color: var(--text-secondary); }

/* --- Main Content --- */
.main {
    margin-top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    overflow-x: hidden;
}

/* ============================================
   CITIZEN PAGES
   ============================================ */

/* --- Home Page --- */
.home-page { display: flex; height: 100%; }
.map-area { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

.map-tools {
    position: absolute; top: 12px; left: 12px; z-index: 900;
    display: flex; flex-direction: column; gap: 6px;
}
.map-tool-btn {
    width: 36px; height: 36px; background: var(--white); border: none;
    border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text); transition: background var(--transition);
}
.map-tool-btn:hover { background: var(--bg); }

.report-fab {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    z-index: 900; background: var(--accent); color: #FFFFFF; border: none;
    padding: 14px 28px; border-radius: var(--radius-full);
    font-size: 15px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    box-shadow: var(--shadow-lg); transition: all var(--transition); font-family: inherit;
}
.report-fab:hover {
    background: var(--accent-hover); transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w); background: var(--white);
    border-left: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-header { padding: 20px 20px 0; }
.sidebar-header h2 { font-size: 18px; font-weight: 700; }
.sidebar-header p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.sidebar-search { margin: 16px 20px 0; position: relative; }
.sidebar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; }
.sidebar-search input {
    width: 100%; padding: 10px 12px 10px 40px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color var(--transition);
}
.sidebar-search input:focus { border-color: var(--primary); }
.sidebar-search input::placeholder { color: var(--text-muted); }

/* Filter Chips */
.filter-chips { display: flex; gap: 6px; padding: 14px 20px; flex-wrap: wrap; }
.chip {
    padding: 6px 16px; border-radius: var(--radius-full);
    border: 1px solid var(--border); background: var(--white);
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all var(--transition); font-family: inherit;
    color: var(--text-secondary);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }

/* Report List (sidebar) */
.report-list { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.report-card-mini {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px; border-radius: var(--radius-md);
    cursor: pointer; transition: background var(--transition);
    border-left: 3px solid transparent;
}
.report-card-mini:hover { background: var(--bg); }
.report-card-mini.active { background: var(--primary-light); border-left-color: var(--primary); }
.report-card-mini .card-top { display: flex; justify-content: space-between; align-items: center; }
.cat-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.report-card-mini .card-date { font-size: 12px; color: var(--text-muted); }
.report-card-mini .card-title { font-size: 14px; font-weight: 600; margin-top: 2px; }
.report-card-mini .card-address { font-size: 12px; color: var(--text-secondary); }

/* Map Popup */
.map-popup { min-width: 260px; }
.map-popup .popup-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.map-popup .popup-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.map-popup .popup-desc { font-size: 13px; color: #6C757D; margin-bottom: 8px; line-height: 1.4; }
.map-popup .popup-loc { font-size: 12px; color: #ADB5BD; margin-bottom: 12px; display: flex; align-items: center; gap: 4px; }
.map-popup .popup-actions { display: flex; gap: 8px; }
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 16px !important; font-family: 'Inter', sans-serif !important; }

/* --- Buttons --- */
.btn {
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: none; transition: all var(--transition); font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: #2a2d3e; }
.btn-danger { background: #FEF2F2; color: #EF4444; border: 1px solid #FECACA; }
.btn-danger:hover { background: #FEE2E2; }
.btn-success { background: #DCFCE7; color: #16A34A; border: 1px solid #BBF7D0; }
.btn-success:hover { background: #BBF7D0; }
.btn-warning { background: #FEF9C3; color: #A16207; border: 1px solid #FDE68A; }
.btn-warning:hover { background: #FDE68A; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }
.btn-ghost { background: none; border: none; color: var(--text-secondary); padding: 10px 16px; }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-icon {
    background: none; border: none; padding: 6px; cursor: pointer;
    color: var(--text-muted); border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.btn-icon:hover { color: #EF4444; background: #FEF2F2; }

/* --- Modal --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    z-index: 1400; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); width: 100%; max-width: 640px;
    max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 24px 0; }
.modal-header h2 { font-size: 22px; font-weight: 700; }
.modal-header .step-label { font-size: 13px; color: var(--primary); font-weight: 500; margin-top: 2px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; transition: color var(--transition); }
.modal-close:hover { color: var(--text); }

/* Progress Bar */
.wizard-progress { display: flex; gap: 4px; padding: 16px 24px; }
.progress-step { flex: 1; height: 4px; background: var(--border-light); border-radius: 2px; transition: background var(--transition); }
.progress-step.active { background: var(--primary); }

/* Wizard */
.wizard-body { padding: 8px 24px 24px; }
.wizard-title { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.wizard-subtitle { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.wizard-footer { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-top: 1px solid var(--border); }

/* Category Grid */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat-card {
    padding: 18px 16px; border: 2px solid var(--border);
    border-radius: var(--radius-md); cursor: pointer;
    display: flex; align-items: center; gap: 12px;
    font-size: 15px; font-weight: 500; transition: all var(--transition);
}
.cat-card:hover { border-color: var(--primary); }
.cat-card.selected { border-color: var(--primary); background: var(--primary-light); }
.cat-card .cat-icon {
    font-size: 24px; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
}

/* Location */
.location-auto {
    padding: 14px 16px; background: var(--primary-light);
    border-radius: var(--radius-md); margin-bottom: 16px;
    display: flex; justify-content: space-between; align-items: center;
}
.location-auto .loc-text strong { display: block; font-size: 14px; }
.location-auto .loc-text span { font-size: 13px; color: var(--primary); }
.location-auto .loc-edit { color: var(--primary); font-weight: 600; cursor: pointer; background: none; border: none; font-size: 14px; font-family: inherit; }
.loc-manual-label { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.mini-map { height: 180px; border-radius: var(--radius-md); overflow: hidden; margin-top: 12px; border: 1px solid var(--border); }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-label .required { color: #EF4444; }
.form-input, .form-textarea {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus { border-color: var(--primary); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-select {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; outline: none;
    background: var(--white); cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C757D' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}

/* Photos */
.photo-upload { display: flex; gap: 12px; flex-wrap: wrap; }
.photo-placeholder {
    width: 120px; height: 100px; background: var(--bg);
    border: 2px dashed var(--border); border-radius: var(--radius-md);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px; cursor: pointer;
    font-size: 12px; color: var(--text-secondary);
    transition: border-color var(--transition);
}
.photo-placeholder:hover { border-color: var(--primary); }
.photo-thumb {
    width: 120px; height: 100px;
    background: linear-gradient(135deg, #8B7355, #6B5940);
    border-radius: var(--radius-md); position: relative;
}

/* Review */
.review-card { background: var(--bg); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.review-row { margin-bottom: 10px; }
.review-row .review-label { font-size: 12px; color: var(--primary); font-weight: 500; margin-bottom: 2px; }
.review-row .review-value { font-size: 14px; font-weight: 500; }
.privacy-notice {
    padding: 14px 16px; background: #DBEAFE;
    border-radius: var(--radius-md); margin-bottom: 16px;
    display: flex; gap: 10px; align-items: flex-start;
}
.privacy-notice svg { flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.privacy-notice strong { display: block; font-size: 14px; margin-bottom: 2px; }
.privacy-notice p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.checkbox-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.checkbox-row label { font-size: 14px; cursor: pointer; }

/* --- Page Container --- */
.page-container {
    padding: 32px; height: 100%; overflow-y: auto;
    max-width: 1000px; margin: 0 auto;
}
.page-title { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }

/* KPI Cards */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; }
.kpi-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.kpi-value { font-size: 28px; font-weight: 700; }

/* Full Report Cards */
.report-card-full { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; overflow: hidden; }
.report-card-body { display: flex; gap: 16px; padding: 16px; }
.report-thumb { width: 100px; height: 100px; border-radius: var(--radius-sm); background: linear-gradient(135deg, #8B7355, #6B5940); flex-shrink: 0; }
.report-info { flex: 1; min-width: 0; }
.report-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.badge { padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.report-info h3 { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.report-info .desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-info .address { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.report-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.report-meta span { display: flex; align-items: center; gap: 4px; }
.report-actions { display: flex; justify-content: space-between; align-items: center; }
.report-actions-left { display: flex; gap: 8px; }
.report-update { background: #EDF2FF; padding: 10px 16px; font-size: 13px; color: var(--primary); }

/* --- Announcements --- */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; }
.search-bar .search-input-wrap { flex: 1; position: relative; }
.search-bar .search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; }
.search-bar input { width: 100%; padding: 10px 12px 10px 40px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; font-family: inherit; outline: none; }
.search-bar input:focus { border-color: var(--primary); }
.commune-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #DBEAFE; border-radius: var(--radius-full); font-size: 13px; color: var(--primary); margin-bottom: 20px; }
.announcement-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px; }
.announcement-img { height: 200px; position: relative; }
.announcement-img .img-placeholder { width: 100%; height: 100%; }
.announcement-badge-important { position: absolute; top: 12px; right: 12px; background: #EF4444; color: white; padding: 4px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; }
.announcement-body { padding: 16px; }
.announcement-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.announcement-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.announcement-footer { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); }
.announcement-footer span { display: flex; align-items: center; gap: 4px; }

/* --- Discussions --- */
.discussions-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.discussions-header h1 { font-size: 26px; font-weight: 700; }
.discussions-header p { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.discussion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.discussion-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; transition: box-shadow var(--transition); cursor: pointer; }
.discussion-card:hover { box-shadow: var(--shadow-md); }
.discussion-card .disc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.disc-cat-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.disc-date { font-size: 12px; color: var(--text-muted); }
.discussion-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.discussion-card .disc-preview { font-size: 13px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.disc-footer { display: flex; justify-content: space-between; align-items: center; }
.disc-author { display: flex; align-items: center; gap: 8px; }
.disc-author .avatar-sm, .avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.disc-author span { font-size: 13px; font-weight: 500; }
.disc-stats { display: flex; gap: 12px; font-size: 13px; color: var(--text-muted); }
.disc-stats span { display: flex; align-items: center; gap: 4px; }

/* --- Entreprises / Business --- */
.biz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.biz-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow var(--transition); }
.biz-card:hover { box-shadow: var(--shadow-md); }
.biz-img { height: 140px; }
.biz-body { padding: 16px; }
.biz-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.biz-header h3 { font-size: 16px; font-weight: 600; }
.biz-body p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 10px; }
.biz-info { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.biz-info span { display: flex; align-items: center; gap: 6px; }
.admin-biz-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.admin-biz-card.pending { border-color: #F59F00; border-left: 3px solid #F59F00; }

/* Image gradient placeholders */
.img-gradient-festival { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.img-gradient-roadwork { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.img-gradient-waste { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.img-gradient-alert { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.img-gradient-market { background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%); }
.img-gradient-food { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.img-gradient-auto { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); }
.img-gradient-health { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); }
.img-gradient-retail { background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%); }
.img-gradient-beauty { background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%); }

/* --- Settings --- */
.settings-section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px; }
.settings-section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.settings-section-title svg { color: var(--text-secondary); }
.profile-row { display: flex; align-items: center; gap: 16px; }
.profile-row .avatar-lg, .avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.profile-info { flex: 1; }
.profile-info .name { font-size: 16px; font-weight: 600; }
.profile-info .email { font-size: 14px; color: var(--text-secondary); }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.setting-row + .setting-row { border-top: 1px solid var(--border-light); }
.setting-label { font-size: 14px; font-weight: 500; }
.setting-desc { font-size: 13px; color: var(--text-secondary); }

/* Toggle */
.toggle { width: 48px; height: 26px; background: var(--border); border-radius: 13px; position: relative; cursor: pointer; transition: background var(--transition); border: none; }
.toggle.on { background: var(--primary); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: transform var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.toggle.on::after { transform: translateX(22px); }

/* Nav Tabs */
.nav-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.nav-tab { padding: 8px 16px; border-radius: var(--radius-full); border: none; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; color: var(--text-secondary); transition: all var(--transition); }
.nav-tab:hover { background: var(--bg); color: var(--text); }
.nav-tab.active { background: var(--primary); color: var(--white); }

/* Search row */
.search-row { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.search-row .search-wrap { flex: 1; position: relative; }
.search-row .search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-row input { width: 100%; padding: 10px 12px 10px 40px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; font-family: inherit; outline: none; }
.search-row input:focus { border-color: var(--primary); }

/* Success animation */
@keyframes checkmark { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: #DCFCE7; color: #22C55E; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; animation: checkmark 0.4s ease; }

/* Section title */
.section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }

/* --- QR Code --- */
.qr-header-btn { position: relative; }
.qr-header-btn::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: #22C55E; border-radius: 50%; border: 2px solid var(--white); }
.qr-modal-body { padding: 32px 24px; text-align: center; }
.qr-modal-body h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.qr-modal-body .qr-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.qr-container { display: inline-block; padding: 20px; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.qr-container img, .qr-container canvas, .qr-container table { display: block; margin: 0 auto; }
.qr-url { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--bg); border-radius: var(--radius-md); font-size: 13px; color: var(--text-secondary); font-family: 'SF Mono','Consolas',monospace; margin-bottom: 20px; max-width: 100%; word-break: break-all; }
.qr-url .copy-btn { background: none; border: none; cursor: pointer; color: var(--primary); padding: 4px; border-radius: 4px; flex-shrink: 0; transition: background var(--transition); }
.qr-url .copy-btn:hover { background: var(--primary-light); }
.qr-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* QR in Settings */
.qr-settings-card { display: flex; gap: 32px; align-items: flex-start; }
.qr-settings-left { flex-shrink: 0; }
.qr-big-container { width: 220px; height: 220px; padding: 16px; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; }
.qr-big-container img { display: block; width: 100%; height: 100%; }
.qr-settings-right { flex: 1; min-width: 0; }
.qr-settings-steps { display: flex; flex-direction: column; gap: 14px; }
.qr-s-step { display: flex; gap: 12px; align-items: flex-start; }
.qr-s-step .qr-step-num, .qr-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qr-s-step strong { display: block; font-size: 14px; margin-bottom: 1px; }
.qr-s-step p { font-size: 13px; color: var(--text-secondary); line-height: 1.3; }


/* ============================================
   NOTIFICATION CENTER
   ============================================ */

/* Notification Bell Badge */
.notif-badge { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; background: #EF4444; color: white; border-radius: 50%; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid white; }
.notif-btn { position: relative; }

/* Notification Page */
.notif-list { display: flex; flex-direction: column; gap: 2px; }
.notif-item { display: flex; gap: 14px; padding: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition); }
.notif-item:hover { box-shadow: var(--shadow-sm); }
.notif-item.unread { background: #EDF2FF; border-color: rgba(59,91,219,0.2); }
.notif-icon { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-icon.status { background: #DBEAFE; color: #3B82F6; }
.notif-icon.resolved { background: #DCFCE7; color: #22C55E; }
.notif-icon.comment { background: #FEF3C7; color: #F59F00; }
.notif-icon.announcement { background: #EDE9FE; color: #8B5CF6; }
.notif-icon.escalation { background: #FEF2F2; color: #EF4444; }
.notif-icon.welcome { background: #DBEAFE; color: #3B5BDB; }
.notif-content { flex: 1; min-width: 0; }
.notif-content h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.notif-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.notif-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }


/* ============================================
   PHOTO BEFORE/AFTER
   ============================================ */

.photo-compare { display: flex; gap: 16px; margin: 16px 0; }
.photo-compare-item { flex: 1; border-radius: var(--radius-md); overflow: hidden; }
.photo-compare-item .photo-label { padding: 6px 12px; font-size: 12px; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: 0.5px; }
.photo-compare-item .photo-label.before { background: #FEF2F2; color: #EF4444; }
.photo-compare-item .photo-label.after { background: #DCFCE7; color: #22C55E; }
.photo-compare-item .photo-box { height: 160px; background: linear-gradient(135deg, #8B7355, #6B5940); position: relative; }
.photo-compare-item .photo-box.resolved { background: linear-gradient(135deg, #22C55E, #16A34A); }
.photo-compare-item .photo-box .photo-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; font-weight: 600; background: rgba(0,0,0,0.3); }

/* Team photo upload */
.team-photo-upload { display: flex; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.team-photo-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px dashed var(--border); background: var(--bg); cursor: pointer; font-size: 13px; color: var(--text-secondary); transition: all var(--transition); font-family: inherit; }
.team-photo-btn:hover { border-color: var(--primary); color: var(--primary); }
.validation-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; }
.validation-badge.validated { background: #DCFCE7; color: #16A34A; }
.validation-badge.pending-val { background: #FEF9C3; color: #A16207; }


/* ============================================
   SLA INDICATORS
   ============================================ */

.sla-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.sla-badge.on-track { background: #DCFCE7; color: #16A34A; }
.sla-badge.warning { background: #FEF9C3; color: #A16207; }
.sla-badge.overdue { background: #FEF2F2; color: #EF4444; }
.sla-badge.escalated { background: #FEF2F2; color: #EF4444; border: 1px solid #FECACA; animation: sla-pulse 2s infinite; }
@keyframes sla-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.sla-bar { height: 4px; background: var(--border-light); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.sla-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.sla-bar-fill.green { background: #22C55E; }
.sla-bar-fill.yellow { background: #EAB308; }
.sla-bar-fill.red { background: #EF4444; }
.escalation-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #FEF2F2; border: 1px solid #FECACA; border-radius: var(--radius-md); margin-bottom: 16px; }
.escalation-alert svg { flex-shrink: 0; color: #EF4444; }
.escalation-alert strong { display: block; font-size: 14px; color: #EF4444; margin-bottom: 2px; }
.escalation-alert p { font-size: 13px; color: var(--text-secondary); }


/* ============================================
   PUBLIC STATISTICS PAGE
   ============================================ */

.stats-hero { background: linear-gradient(135deg, var(--primary), #2F4BC0); color: white; border-radius: var(--radius-lg); padding: 32px; margin-bottom: 24px; text-align: center; }
.stats-hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.stats-hero p { font-size: 14px; opacity: 0.8; }
.stats-kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 700px; margin: -40px 24px 24px; position: relative; z-index: 1; }
.stats-kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; text-align: center; box-shadow: var(--shadow-sm); }
.stats-kpi-val { font-size: 28px; font-weight: 700; color: var(--primary); }
.stats-kpi-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.stats-chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.stats-satisfaction { text-align: center; padding: 32px; }
.satisfaction-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; position: relative; }
.satisfaction-circle::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: var(--white); }
.satisfaction-val { position: relative; z-index: 1; font-size: 24px; font-weight: 700; color: #22C55E; }

/* Bars for reported vs resolved */
.compare-bars { display: flex; align-items: flex-end; gap: 16px; height: 200px; padding-top: 24px; }
.compare-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.compare-bar-pair { display: flex; gap: 4px; align-items: flex-end; width: 100%; height: 100%; }
.compare-bar { flex: 1; border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.5s ease; }
.compare-bar.reported { background: var(--primary); opacity: 0.3; }
.compare-bar.resolved { background: var(--primary); }
.compare-bar-label { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 6px; }


/* ============================================
   MODERATION & DISCUSSIONS
   ============================================ */

.mod-actions { display: flex; gap: 6px; }
.mod-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); font-size: 12px; cursor: pointer; color: var(--text-secondary); transition: all var(--transition); font-family: inherit; }
.mod-btn:hover { border-color: #EF4444; color: #EF4444; background: #FEF2F2; }
.mod-btn.hide-btn:hover { border-color: #F59F00; color: #F59F00; background: #FFF9DB; }
.reported-flag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius-sm); background: #FEF2F2; color: #EF4444; font-size: 11px; font-weight: 600; }
.discussion-card.reported { border-color: #FECACA; }
.discussion-card.hidden-mod { opacity: 0.5; }

/* Discussion Detail */
.disc-detail-header { margin-bottom: 24px; }
.disc-detail-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.disc-detail-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; flex-wrap: wrap; }
.disc-detail-content { font-size: 15px; line-height: 1.6; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.disc-reply-form { display: flex; gap: 12px; margin-bottom: 24px; }
.disc-reply-form textarea { flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; font-family: inherit; resize: vertical; min-height: 60px; outline: none; }
.disc-reply-form textarea:focus { border-color: var(--primary); }
.disc-replies-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* Reply Cards */
.reply-card { padding: 14px 16px; background: var(--bg); border-radius: var(--radius-md); margin-bottom: 8px; }
.reply-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.reply-author { display: flex; align-items: center; gap: 8px; }
.reply-content { font-size: 14px; line-height: 1.5; }
.reply-footer { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.reply-footer button { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 12px; font-family: inherit; display: flex; align-items: center; gap: 4px; }
.reply-footer button:hover { color: var(--primary); }


/* ============================================
   EXPORT / PDF PAGE
   ============================================ */

.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.export-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; cursor: pointer; transition: all var(--transition); }
.export-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.export-card.selected { border-color: var(--primary); background: var(--primary-light); }
.export-card-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.export-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.export-card p { font-size: 13px; color: var(--text-secondary); }
.export-config { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px; }
.export-config h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.export-preview { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.export-preview-placeholder { text-align: center; color: var(--text-muted); }
.export-preview-placeholder svg { margin-bottom: 12px; }


/* ============================================
   ONBOARDING / CATEGORIES ADMIN
   ============================================ */

/* Onboarding Steps */
.onboarding-progress { display: flex; gap: 4px; margin-bottom: 32px; position: relative; }
.onboarding-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.onboarding-step-circle { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all var(--transition); z-index: 1; }
.onboarding-step.completed .onboarding-step-circle { background: #22C55E; border-color: #22C55E; color: white; }
.onboarding-step.active .onboarding-step-circle { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.onboarding-step-label { font-size: 11px; color: var(--text-muted); text-align: center; font-weight: 500; }
.onboarding-step.completed .onboarding-step-label { color: #22C55E; }
.onboarding-step.active .onboarding-step-label { color: var(--primary); font-weight: 600; }
.onboarding-line { position: absolute; top: 22px; left: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.onboarding-step.completed .onboarding-line { background: #22C55E; }
.onboarding-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; }
.onboarding-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.onboarding-card > p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }

/* Category Management */
.cat-manage-list { display: flex; flex-direction: column; gap: 8px; }
.cat-manage-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); }
.cat-manage-icon { font-size: 24px; width: 40px; text-align: center; }
.cat-manage-info { flex: 1; }
.cat-manage-info strong { font-size: 14px; display: block; }
.cat-manage-info span { font-size: 12px; color: var(--text-secondary); }
.cat-manage-actions { display: flex; gap: 6px; }
.cat-color-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.add-cat-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border: 2px dashed var(--border); border-radius: var(--radius-md); background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-secondary); width: 100%; margin-top: 8px; transition: all var(--transition); font-family: inherit; }
.add-cat-btn:hover { border-color: var(--primary); color: var(--primary); }


/* ============================================
   ANONYMOUS REPORT
   ============================================ */

.anon-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg); border-radius: var(--radius-md); margin-top: 16px; }
.anon-option label { flex: 1; }
.anon-option .anon-title { font-size: 14px; font-weight: 600; display: block; }
.anon-option .anon-desc { font-size: 12px; color: var(--text-secondary); }
.anon-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); background: var(--bg); color: var(--text-secondary); font-size: 11px; font-weight: 600; }


/* ============================================
   ADMIN LAYOUT
   ============================================ */

.admin-layout { display: flex; height: 100%; }

/* Admin Sidebar Navigation */
.admin-nav {
    width: var(--admin-nav-w); background: var(--dark);
    display: flex; flex-direction: column; flex-shrink: 0;
    overflow-y: auto;
}
.admin-nav-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 24px 20px 20px;
}
.admin-nav-logo {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--accent); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.admin-nav-title { font-size: 16px; font-weight: 700; color: white; }
.admin-nav-subtitle { font-size: 11px; color: rgba(255,255,255,0.4); }
.admin-nav-menu { list-style: none; padding: 8px 12px; flex: 1; }
.admin-nav-menu li { margin-bottom: 2px; }

.admin-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; border-radius: var(--radius-sm);
    text-decoration: none; color: rgba(255,255,255,0.55);
    font-size: 14px; font-weight: 500;
    transition: all var(--transition); border-left: 3px solid transparent;
}
.admin-nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
.admin-nav-item.active {
    background: rgba(155,34,38,0.25); color: white;
    border-left-color: var(--accent);
}
.admin-nav-item svg { flex-shrink: 0; }
.admin-nav-user {
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 12px;
}

/* Admin Main Content */
.admin-main {
    flex: 1; overflow-y: auto; padding: 32px;
    background: var(--bg); min-width: 0;
}
.admin-page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px;
}
.admin-page-header h1 { font-size: 26px; font-weight: 700; margin-bottom: 2px; }
.admin-page-header p { font-size: 14px; color: var(--text-secondary); }

/* Admin KPI Row */
.admin-kpi-row {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 24px;
}
.admin-kpi {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 20px;
    display: flex; align-items: center; gap: 16px;
}
.admin-kpi-icon {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.admin-kpi-val { font-size: 24px; font-weight: 700; }
.admin-kpi-label { font-size: 13px; color: var(--text-secondary); }

/* Admin Two Column */
.admin-two-col {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 24px; margin-bottom: 24px;
}
.admin-charts-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 24px; margin-bottom: 24px;
}

/* Charts */
.chart-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 24px;
}
.chart-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; margin-bottom: 16px;
}
.chart-title svg { color: var(--text-secondary); }

/* Bar Chart */
.chart-bars {
    display: flex; align-items: flex-end; gap: 8px;
    height: 180px; padding-top: 24px;
}
.chart-bar-col {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 6px; height: 100%;
    justify-content: flex-end;
}
.chart-bar {
    width: 100%; background: var(--primary); border-radius: 4px 4px 0 0;
    min-height: 4px; position: relative;
    transition: height 0.5s ease;
}
.chart-bar-val {
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
    white-space: nowrap;
}
.chart-bar-label { font-size: 11px; color: var(--text-muted); }

/* Donut Chart */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.chart-donut {
    width: 160px; height: 160px; border-radius: 50%;
    position: relative; flex-shrink: 0;
}
.donut-hole {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 90px; height: 90px; border-radius: 50%;
    background: var(--white); display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.donut-total { font-size: 24px; font-weight: 700; }
.donut-label { font-size: 12px; color: var(--text-muted); }
.donut-legend { display: flex; flex-direction: column; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-val { margin-left: auto; font-weight: 500; color: var(--text-secondary); font-size: 12px; }

/* Stat Bars */
.stat-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.stat-bar-label { font-size: 13px; font-weight: 500; width: 80px; flex-shrink: 0; }
.stat-bar-track { flex: 1; height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.stat-bar-val { font-size: 13px; font-weight: 600; width: 24px; text-align: right; }

/* Admin Map Card */
.admin-map-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 24px;
}

/* Incoming Reports */
.incoming-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 24px;
}
.incoming-list { max-height: 340px; overflow-y: auto; }
.incoming-report {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.incoming-report:last-child { border-bottom: none; }
.incoming-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.incoming-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Admin Quick Stats */
.admin-quick-stats {
    display: flex; gap: 24px; padding: 16px 20px;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); margin-bottom: 16px;
}
.qs-item { display: flex; flex-direction: column; }
.qs-val { font-size: 20px; font-weight: 700; }
.qs-label { font-size: 12px; color: var(--text-secondary); }

/* Admin Report Cards */
.admin-reports-list { display: flex; flex-direction: column; gap: 12px; }
.admin-report-card {
    display: flex; gap: 16px; padding: 16px;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.admin-report-body { flex: 1; min-width: 0; }
.admin-report-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.admin-report-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Admin Form Card */
.admin-form-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 24px;
}

/* Announcement Type Buttons */
.ann-type-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ann-type-btn {
    padding: 8px 16px; border-radius: var(--radius-full);
    border: 1px solid var(--border); background: var(--white);
    font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; color: var(--text-secondary);
    transition: all var(--transition);
}
.ann-type-btn:hover { border-color: var(--primary); color: var(--primary); }
.ann-type-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Admin Announcement List */
.admin-ann-list { display: flex; flex-direction: column; gap: 8px; }
.admin-ann-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.admin-ann-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-ann-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Team Cards Grid */
.team-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.team-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 20px;
}
.team-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.team-color-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.team-card-header h3 { font-size: 16px; font-weight: 600; margin-bottom: 1px; }
.team-members { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.team-member-avatar { position: relative; }
.status-dot { position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; }
.team-stats { display: flex; gap: 16px; margin-bottom: 12px; }
.team-stats > div { display: flex; flex-direction: column; }
.team-stat-val { font-size: 18px; font-weight: 700; }
.team-stat-label { font-size: 11px; color: var(--text-secondary); }
.team-progress { height: 6px; background: var(--border-light); border-radius: 3px; margin-bottom: 16px; overflow: hidden; }
.team-progress-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.team-card-actions { display: flex; gap: 8px; }


/* ============================================
   TEAM LAYOUT (Mobile-first)
   ============================================ */

.team-layout { display: flex; flex-direction: column; height: 100%; }
.team-main { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 80px; }
.team-page-header { margin-bottom: 20px; }
.team-page-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 2px; }
.team-page-header p { font-size: 13px; color: var(--text-secondary); }

.team-bottombar {
    display: flex; justify-content: space-around; align-items: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--border);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1100;
}
.team-tab {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: var(--text-muted);
    font-size: 11px; font-weight: 500; padding: 4px 16px;
    border-radius: var(--radius-sm); transition: all var(--transition);
}
.team-tab.active { color: var(--primary); }
.team-tab:hover { color: var(--text); }

/* Team Task Cards */
.team-tasks-list { display: flex; flex-direction: column; gap: 12px; }
.team-task-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 16px;
}
.team-task-top { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.team-task-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.team-task-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }


/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Leaflet overrides */
.leaflet-control-zoom { border-radius: var(--radius-sm) !important; border: none !important; box-shadow: var(--shadow-md) !important; }
.leaflet-control-zoom a { border-radius: 0 !important; }
.leaflet-control-zoom a:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important; }
.leaflet-control-zoom a:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important; }


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1100px) {
    .admin-nav { width: 220px; }
    .admin-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .admin-two-col { grid-template-columns: 1fr; }
    .admin-charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .sidebar { display: none; }
    .report-fab { bottom: 20px; }
    .discussion-grid { grid-template-columns: 1fr; }
    .biz-grid { grid-template-columns: 1fr; }
    .kpi-row { grid-template-columns: 1fr; }
    .page-container { padding: 20px; }
    /* Admin: hide sidebar, use drawer */
    .admin-nav { display: none; }
    .admin-main { padding: 20px; }
    .admin-kpi-row { grid-template-columns: 1fr 1fr; }
    /* Stats & Exports responsive */
    .stats-kpi-row { grid-template-columns: 1fr 1fr; margin: -20px 12px 16px; }
    .stats-chart-row { grid-template-columns: 1fr; }
    .export-grid { grid-template-columns: 1fr; }
    .photo-compare { flex-direction: column; }
}

@media (max-width: 700px) {
    .qr-settings-card { flex-direction: column; align-items: center; }
    .qr-big-container { width: 200px; height: 200px; }
    .admin-kpi-row { grid-template-columns: 1fr; }
    .admin-kpi { padding: 16px; }
    .donut-wrap { flex-direction: column; }
    .team-cards-grid { grid-template-columns: 1fr; }
    .stats-kpi-row { grid-template-columns: 1fr; }
    .onboarding-step-label { display: none; }
}

@media (max-width: 600px) {
    .brand-sub { display: none; }
    .brand-name { font-size: 16px; }
    .cat-grid { grid-template-columns: 1fr; }
    .modal { margin: 8px; max-height: 95vh; }
    .report-card-body { flex-direction: column; }
    .report-thumb { width: 100%; height: 160px; }
    .qr-header-btn { display: none; }
    .role-badge span { display: none; }
    .admin-report-card { flex-direction: column; }
    .admin-report-card .report-thumb { width: 100%; height: 120px; }
    .admin-quick-stats { flex-direction: column; gap: 12px; }
    .admin-two-col { grid-template-columns: 1fr; }
    .stats-hero { padding: 24px 16px; }
    .stats-hero h2 { font-size: 20px; }
    .disc-reply-form { flex-direction: column; }
}

/* ============================================
   MOBILE APP-LIKE EXPERIENCE
   ============================================ */

/* Bottom Tab Bar */
.mobile-tabs {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--white);
    border-top: 1px solid var(--border);
    z-index: 1100;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.mobile-tab {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 6px 0; flex: 1;
    text-decoration: none; color: var(--text-muted);
    font-size: 10px; font-weight: 500;
    transition: color 0.2s; cursor: pointer;
    background: none; border: none; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.mobile-tab.active { color: var(--accent); }
.mobile-tab svg { width: 22px; height: 22px; }
.mobile-tab-label { line-height: 1; }

/* Show tabs on mobile for citizen/team */
@media (max-width: 768px) {
    .mobile-tabs { display: flex; }
    .is-admin .mobile-tabs, .is-platform .mobile-tabs { display: none; }

    /* Adjust main content for bottom tabs */
    .main { height: calc(100vh - var(--header-h) - 56px - env(safe-area-inset-bottom, 0px)); }
    .is-admin .main, .is-platform .main { height: calc(100vh - var(--header-h)); }

    /* Compact header */
    .header { height: 52px; padding: 0 12px; }
    :root { --header-h: 52px; }

    /* Hide burger on mobile (use bottom tabs instead) */
    #menu-toggle { display: none; }

    /* Bigger touch targets */
    .chip { padding: 8px 14px; font-size: 13px; min-height: 36px; }
    .btn { min-height: 44px; padding: 10px 18px; }
    .btn-sm { min-height: 36px; padding: 8px 14px; }
    .icon-btn { padding: 10px; min-width: 44px; min-height: 44px; }

    /* Report card touch friendly */
    .report-card-mini { padding: 14px 16px; }

    /* FAB position above tabs */
    .report-fab { bottom: 72px !important; }

    /* Full width map on mobile */
    .home-page { flex-direction: column; }
    .map-area { height: 45vh; width: 100%; }
    .sidebar { position: relative; width: 100%; height: auto; max-height: 55vh; overflow-y: auto; border-left: none; border-top: 1px solid var(--border); }
    .sidebar-header { display: none; }

    /* Page containers - more padding bottom for tabs */
    .page-container { padding: 16px 12px 80px; }

    /* Notification badge on tab */
    .mobile-tab { position: relative; }
    .mobile-tab .tab-badge {
        position: absolute; top: 2px; right: 50%; transform: translateX(14px);
        background: #EF4444; color: white; font-size: 9px; font-weight: 700;
        min-width: 16px; height: 16px; border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        padding: 0 4px;
    }

    /* Swipe-feel transitions */
    #main-content > * {
        animation: slideIn 0.2s ease-out;
    }
    @keyframes slideIn {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Cards more rounded on mobile */
    .report-card-mini, .card, .stat-card { border-radius: 14px; }

    /* Settings page mobile spacing */
    .settings-section { margin: 0 -4px 16px; }
}

/* Dark mode for mobile tabs */
[data-theme="dark"] .mobile-tabs { background: #1A1D2E; border-top-color: var(--border); }
[data-theme="dark"] .mobile-tab { color: var(--text-muted); }
[data-theme="dark"] .mobile-tab.active { color: var(--accent); }

/* ============================================
   AUTH PAGES (Login, Register, Forgot)
   ============================================ */
.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
    background: linear-gradient(135deg, #F5E6E7 0%, #F5F5F0 50%, #E8EEF5 100%);
}
.auth-card {
    background: var(--white); border-radius: 20px;
    padding: 40px 36px; width: 100%; max-width: 420px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    position: relative;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: var(--accent); color: white;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; margin-bottom: 16px;
}
.auth-logo h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-logo p { font-size: 14px; color: var(--text-secondary); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-input {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 15px; font-family: inherit;
    background: var(--bg); transition: all 0.2s; outline: none;
}
.form-input:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(59,91,219,0.1); }
.form-input::placeholder { color: var(--text-muted); }

.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 44px; }
.password-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    padding: 6px; display: flex; align-items: center;
}

.btn-full { width: 100%; justify-content: center; }
.auth-submit { margin-top: 4px; font-size: 15px; font-weight: 600; padding: 13px; }

.auth-links { margin-top: 20px; text-align: center; }
.auth-link { color: var(--primary); text-decoration: none; font-size: 14px; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0; color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-alert {
    padding: 12px 16px; border-radius: 10px; font-size: 14px;
    margin-bottom: 8px; animation: fadeIn 0.3s;
}
.auth-alert-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.auth-alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.auth-alert.fade-out { opacity: 0; transition: opacity 0.5s; }

.auth-footer { margin-top: 24px; text-align: center; }
.auth-footer p { font-size: 12px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); text-decoration: none; }

/* Auth pages: hide header, tabs */
.is-auth .header, .is-auth .mobile-tabs, .is-auth .drawer, .is-auth .drawer-overlay { display: none !important; }
.is-auth .main { height: 100vh; margin-top: 0; overflow-y: auto; }

@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; border-radius: 16px; }
    .auth-logo-icon { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; }
    .auth-logo h1 { font-size: 20px; }
}

/* Dark mode auth */
[data-theme="dark"] .auth-page { background: linear-gradient(135deg, #0F1117 0%, #1A1D2E 100%); }
[data-theme="dark"] .auth-card { background: #1A1D2E; box-shadow: 0 8px 40px rgba(0,0,0,0.3); }
[data-theme="dark"] .form-input { background: #0F1117; border-color: var(--border); color: var(--text); }
[data-theme="dark"] .form-input:focus { background: #1A1D2E; }

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
    --bg: #0F1117;
    --white: #1A1D2E;
    --dark: #F8F9FA;
    --text: #E8EAF0;
    --text-secondary: #9BA3B2;
    --text-muted: #5C6478;
    --border: #2A2D3E;
    --border-light: #1E2132;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
    --primary-light: rgba(59,91,219,0.15);
    --primary-10: rgba(59,91,219,0.12);
}
[data-theme="dark"] .header { background: #1A1D2E; border-bottom-color: var(--border); }
[data-theme="dark"] .drawer { background: #1A1D2E; }
[data-theme="dark"] .report-card-mini,
[data-theme="dark"] .report-card-full,
[data-theme="dark"] .discussion-card,
[data-theme="dark"] .announcement-card,
[data-theme="dark"] .biz-card,
[data-theme="dark"] .settings-section,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .stats-kpi,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .admin-stat-card,
[data-theme="dark"] .notif-item { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .admin-layout { background: var(--bg); }
[data-theme="dark"] .admin-nav { background: #1A1D2E; border-right-color: var(--border); }
[data-theme="dark"] .sidebar { background: #1A1D2E; border-right-color: var(--border); }
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea { background: var(--bg); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .chip { background: var(--border-light); border-color: var(--border); color: var(--text-secondary); }
[data-theme="dark"] .chip.active { background: var(--primary-10); color: var(--primary); }
[data-theme="dark"] .btn-outline { border-color: var(--border); color: var(--text); }
[data-theme="dark"] .modal { background: #1A1D2E; }
[data-theme="dark"] .map-popup { background: #1A1D2E; color: var(--text); }

/* Dark mode toggle button */
.dark-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--border-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer; transition: all var(--transition);
    color: var(--text-secondary);
}
.dark-toggle:hover { background: var(--primary-10); color: var(--primary); }

/* ============================================
   VOTES / +1 on Reports
   ============================================ */
.vote-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px; border-radius: var(--radius-full);
    border: 1px solid var(--border); background: var(--white);
    font-size: 12px; font-weight: 600; cursor: pointer;
    color: var(--text-secondary); transition: all var(--transition);
    font-family: inherit;
}
.vote-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.vote-btn.voted { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.vote-btn .vote-count { font-weight: 700; }

/* ============================================
   INTERNAL COMMENTS (admin/team only)
   ============================================ */
.internal-section {
    background: #FFF8E1; border: 1px solid #FFE082;
    border-radius: var(--radius-md); padding: 16px; margin-top: 16px;
}
[data-theme="dark"] .internal-section { background: rgba(255,224,130,0.06); border-color: rgba(255,224,130,0.2); }
.internal-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: #F59E0B; margin-bottom: 12px;
}
.internal-comment {
    background: var(--white); border-radius: var(--radius-sm);
    padding: 10px 12px; margin-bottom: 8px;
    border-left: 3px solid #F59E0B; font-size: 13px;
}
.internal-comment-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.internal-add-row { display: flex; gap: 8px; margin-top: 8px; }
.internal-add-row input {
    flex: 1; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; background: var(--white);
    color: var(--text); font-family: inherit;
}

/* ============================================
   ASSIGNMENT BADGE
   ============================================ */
.assign-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--radius-full);
    background: rgba(16,185,129,0.1); color: #10B981;
    font-size: 11px; font-weight: 600; border: 1px solid rgba(16,185,129,0.2);
}
.assign-select {
    padding: 6px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--white);
    color: var(--text); font-size: 13px; cursor: pointer;
    font-family: inherit;
}

/* ============================================
   ENHANCED SEARCH & FILTERS
   ============================================ */
.advanced-filters {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 10px 16px; background: var(--white);
    border-bottom: 1px solid var(--border); align-items: center;
}
.advanced-filters select {
    padding: 6px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--white);
    color: var(--text); font-size: 13px; cursor: pointer;
    font-family: inherit;
}
.filter-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; background: var(--primary-10);
    color: var(--primary); border-radius: var(--radius-full);
    font-size: 12px; font-weight: 500;
}
.filter-tag button { background: none; border: none; cursor: pointer; color: inherit; padding: 0; line-height: 1; }

/* ============================================
   BLASON COMMUNAL (header)
   ============================================ */
.header-blason { display: flex; align-items: center; margin-right: 4px; }
.header-blason .blason { display: flex; align-items: center; }
.header-blason .blason svg { width: 100%; height: 100%; }

/* Blason Upload (admin settings) */
.blason-upload-area { display: flex; align-items: flex-start; gap: 24px; padding: 16px 0; }
.blason-preview {
    width: 80px; height: 96px; border-radius: var(--radius-md);
    border: 2px dashed var(--border); background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.blason-preview-img { width: 100%; height: 100%; object-fit: contain; }
.blason-preview-svg { display: flex; align-items: center; justify-content: center; }
.blason-placeholder-lg {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: var(--text-muted); font-size: 11px;
}
.blason-upload-actions { flex: 1; padding-top: 4px; }

/* ============================================
   PLATFORM ADMIN LAYOUT
   ============================================ */
.platform-layout { display: flex; height: 100%; }
.platform-nav {
    width: var(--admin-nav-w); background: #0C1222;
    display: flex; flex-direction: column; flex-shrink: 0;
    overflow-y: auto;
}
.platform-nav-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 24px 20px 20px;
}
.platform-nav-logo {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--accent); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.platform-nav-title { font-size: 16px; font-weight: 700; color: white; }
.platform-nav-subtitle { font-size: 11px; color: rgba(255,255,255,0.4); }
.platform-nav-menu { list-style: none; padding: 8px 12px; flex: 1; }
.platform-nav-menu li { margin-bottom: 2px; }
.platform-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; border-radius: var(--radius-sm);
    text-decoration: none; color: rgba(255,255,255,0.55);
    font-size: 14px; font-weight: 500;
    transition: all var(--transition); border-left: 3px solid transparent;
}
.platform-nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
.platform-nav-item.active {
    background: rgba(155,34,38,0.25); color: white;
    border-left-color: var(--accent);
}
.platform-nav-item svg { flex-shrink: 0; }
.platform-nav-user {
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 12px;
}
.platform-main {
    flex: 1; overflow-y: auto; padding: 32px;
    background: var(--bg); min-width: 0;
}
.is-platform .header, .is-platform .drawer, .is-platform .drawer-overlay { display: none; }
.is-platform #main-content { padding: 0; margin: 0; height: 100vh; }

.platform-page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px;
}
.platform-page-header h1 { font-size: 24px; font-weight: 700; }

/* Platform Grid */
.platform-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }

/* Platform Table */
.platform-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.platform-table thead th {
    text-align: left; padding: 12px 16px;
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}
.platform-table tbody td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.platform-table tbody tr:hover { background: var(--bg); }

/* Plan Cards */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card {
    background: var(--white); border-radius: var(--radius-md);
    padding: 24px; border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.plan-card-header { margin-bottom: 20px; }
.plan-card-header h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.plan-price { font-size: 28px; font-weight: 800; color: var(--text); }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.plan-details { display: flex; flex-direction: column; gap: 8px; }
.plan-detail-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.plan-detail-row span { color: var(--text-secondary); }

/* Audit Rows */
.audit-list { display: flex; flex-direction: column; }
.audit-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--border-light);
}
.audit-row:last-child { border-bottom: none; }
.audit-icon {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--text-secondary); flex-shrink: 0;
}
.audit-action { font-size: 14px; font-weight: 500; }
.audit-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.audit-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Ticket Rows */
.ticket-list { display: flex; flex-direction: column; }
.ticket-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px; border-bottom: 1px solid var(--border-light); gap: 16px;
}
.ticket-row:last-child { border-bottom: none; }
.ticket-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ticket-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Analytics Bars */
.analytics-bar-row { padding: 12px 16px; }
.analytics-bar-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.analytics-bar-track { height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.analytics-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

/* Settings */
.settings-section { padding: 8px 16px; }
.setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--border-light);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; font-weight: 600; }
.setting-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Card helper */
.card { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border-light); }
.card-header h3 { font-size: 16px; font-weight: 700; }

/* Dark mode for platform */
[data-theme="dark"] .platform-layout { background: var(--bg); }
[data-theme="dark"] .platform-nav { background: #0A0E1A; }
[data-theme="dark"] .platform-table tbody tr:hover { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .plan-card { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .card { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .audit-icon { background: rgba(255,255,255,0.05); }

/* Responsive */
@media (max-width: 1024px) {
    .platform-nav { width: 220px; }
    .platform-grid-2 { grid-template-columns: 1fr; }
    .plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .platform-nav { display: none; }
    .platform-main { padding: 20px; }
    .is-platform .header, .is-platform .drawer, .is-platform .drawer-overlay { display: flex; }
    .plan-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PRICING PAGE (public)
   ============================================ */
.pricing-page { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
.pricing-hero { text-align: center; padding: 40px 20px 32px; }
.pricing-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.pricing-hero p { font-size: 16px; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

.pricing-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 32px 0; max-width: 700px; margin-left: auto; margin-right: auto; }
.pricing-plans.three-plans { grid-template-columns: 1fr 1fr 1fr; max-width: 960px; }
.pricing-card {
    background: var(--white); border: 2px solid var(--border-light); border-radius: 16px;
    padding: 32px 28px; text-align: center; position: relative;
    transition: all 0.2s; box-shadow: var(--shadow-sm);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.pricing-card.popular { border-color: #8B5CF6; box-shadow: 0 8px 30px rgba(139,92,246,0.15); }
.pricing-popular-tag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: #8B5CF6; color: white; font-size: 11px; font-weight: 700;
    padding: 4px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.pricing-card-badge {
    display: inline-block; padding: 4px 16px; border-radius: 20px;
    color: white; font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.pricing-price { font-size: 36px; font-weight: 800; }
.pricing-price span { font-size: 16px; font-weight: 400; color: var(--text-secondary); }
.pricing-desc { font-size: 14px; color: var(--text-secondary); margin: 8px 0 20px; }
.pricing-features { list-style: none; text-align: left; padding: 0; margin-bottom: 24px; }
.pricing-features li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.pricing-cta { width: 100%; }
.pricing-justif {
    font-size: 12px; color: var(--text-secondary); line-height: 1.5;
    padding: 10px 12px; margin: 12px 0 16px;
    background: var(--bg); border-radius: 8px; text-align: left;
    display: flex; align-items: flex-start; gap: 6px;
}
.pricing-justif svg { flex-shrink: 0; margin-top: 1px; }

/* Compare table */
.pricing-compare { margin: 48px 0; }
.pricing-compare h2 { text-align: center; font-size: 24px; margin-bottom: 20px; }
.pricing-table { width: 100%; background: var(--white); border-radius: 12px; border: 1px solid var(--border-light); overflow: hidden; border-collapse: collapse; }
.pricing-table thead th { background: var(--bg); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border); }
.pricing-table tbody tr { border-bottom: 1px solid var(--border-light); }
.pricing-table tbody tr:last-child { border-bottom: none; }

/* Testimonials */
.pricing-testimonials { margin: 48px 0; }
.pricing-testimonials h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.testimonial-card {
    background: var(--white); border: 1px solid var(--border-light); border-radius: 12px;
    padding: 24px; box-shadow: var(--shadow-sm);
}
.testimonial-text { font-size: 14px; line-height: 1.6; color: var(--text-secondary); font-style: italic; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }

/* FAQ */
.pricing-faq { margin: 48px 0; max-width: 640px; margin-left: auto; margin-right: auto; }
.pricing-faq h2 { text-align: center; font-size: 24px; margin-bottom: 20px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
    background: var(--white); border: 1px solid var(--border-light); border-radius: 10px;
    padding: 16px 20px; cursor: pointer;
}
.faq-question { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.faq-answer { font-size: 14px; color: var(--text-secondary); line-height: 1.6; padding-left: 24px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, margin 0.3s ease; margin-top: 0; }
.faq-item.open .faq-answer { max-height: 200px; margin-top: 10px; }
.faq-item .faq-question svg { transition: transform 0.3s ease; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }

/* CTA section */
.pricing-cta-section {
    text-align: center; padding: 48px 24px; margin: 32px 0;
    background: linear-gradient(135deg, #3B5BDB08, #8B5CF608);
    border-radius: 16px; border: 1px solid var(--border-light);
}
.pricing-cta-section h2 { font-size: 24px; margin-bottom: 8px; }
.pricing-cta-section p { color: var(--text-secondary); font-size: 15px; }

/* Responsive */
@media (max-width: 900px) {
    .pricing-plans.three-plans { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 768px) {
    .pricing-plans { grid-template-columns: 1fr; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .pricing-hero h1 { font-size: 24px; }
    .pricing-price { font-size: 28px; }
    .pricing-table { font-size: 12px; }
    .pricing-table th, .pricing-table td { padding: 8px 6px !important; }
}

/* ============================================
   ADMIN SUBSCRIPTION PAGE
   ============================================ */
.sub-current { margin-bottom: 24px; }
.sub-plan-card {
    background: var(--white); border: 1px solid var(--border-light);
    border-radius: 12px; padding: 24px; box-shadow: var(--shadow-sm);
}
.sub-plan-header { display: flex; justify-content: space-between; align-items: flex-start; }
.sub-plan-name { font-size: 20px; font-weight: 800; }
.sub-plan-price { font-size: 28px; font-weight: 800; margin-top: 4px; }
.sub-plan-price span { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.sub-plan-dates { display: flex; gap: 24px; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }
.sub-plan-dates div { display: flex; align-items: center; gap: 6px; }

.sub-usage { margin-bottom: 24px; }
.sub-usage h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.sub-usage-grid { display: flex; flex-direction: column; gap: 16px; background: var(--white); border: 1px solid var(--border-light); border-radius: 12px; padding: 20px; }
.sub-usage-item { display: flex; align-items: center; gap: 16px; }
.sub-usage-label { width: 140px; font-size: 14px; font-weight: 500; flex-shrink: 0; }
.sub-usage-bar { flex: 1; height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.sub-usage-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.sub-usage-val { font-size: 13px; color: var(--text-secondary); width: 100px; text-align: right; flex-shrink: 0; }

.sub-upgrade { margin-bottom: 24px; }
.sub-upgrade h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.sub-upgrade-card {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--white); border: 1px solid var(--border-light);
    border-radius: 12px; padding: 20px; box-shadow: var(--shadow-sm);
}

.sub-invoices { margin-bottom: 24px; }
.sub-invoices h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

/* Dark mode */
[data-theme="dark"] .pricing-card { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .pricing-table { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .testimonial-card { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .faq-item { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .sub-plan-card, [data-theme="dark"] .sub-usage-grid, [data-theme="dark"] .sub-upgrade-card { background: var(--white); border-color: var(--border); }