/* ===== CSS VARIABLES ===== */
:root {
    --primary: #1e40af; /* Blue 800 */
    --primary-light: #3b82f6; /* Blue 500 */
    --primary-dark: #1e3a8a; /* Blue 900 */
    --accent: #2563eb;
    --bg-white: #FFFFFF;
    --bg-light: #f8fafc; /* Slate 50 */
    --bg-card: #FFFFFF;
    --text-dark: #0f172a; /* Slate 900 */
    --text-mid: #475569; /* Slate 600 */
    --text-light: #94a3b8; /* Slate 400 */
    --border: #e2e8f0; /* Slate 200 */
    --border-focus: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 50px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Outfit', 'Inter', 'Noto Sans Thai', sans-serif;

    --priority-low: #22c55e;
    --priority-medium: #f59e0b;
    --priority-high: #f97316;
    --priority-urgent: #ef4444;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== PARTICLES CANVAS ===== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ===== PAGE TRANSITIONS ===== */
.page {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== INTRO PAGE (MINIMALIST) ===== */
#intro-page {
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

#intro-page::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    top: -300px;
    right: -200px;
}

.intro-container {
    text-align: center;
    padding: 60px 24px;
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 8px 24px;
    border-radius: 50px;
    margin-bottom: 40px;
    animation: fadeSlideIn 0.6s 0.1s both;
}

.badge-text {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.intro-title {
    color: var(--text-dark);
    margin-bottom: 24px;
    animation: fadeSlideIn 0.6s 0.2s both;
}

.title-line {
    display: block;
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.title-highlight {
    color: var(--primary-light);
}

.intro-divider {
    display: none; /* Hide decorative divider for minimalist look */
}

.intro-description {
    color: var(--text-mid);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 12px;
    animation: fadeSlideIn 0.6s 0.3s both;
}

.intro-sub-description {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 48px;
    animation: fadeSlideIn 0.6s 0.4s both;
}

/* ===== BUTTONS (MINIMALIST) ===== */
.btn-primary, .btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(30, 64, 175, 0.2);
}

.btn-primary:hover, .btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.25);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border);
    padding: 16px 36px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
}

.intro-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 64px;
    animation: fadeSlideIn 0.6s 0.5s both;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-mid);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* ===== STATS (MINIMALIST) ===== */
.intro-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-top: 20px;
    padding: 32px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    animation: fadeSlideIn 0.6s 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    color: var(--primary);
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    display: block;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

/* ===== FORM PAGE (MINIMALIST) ===== */
#form-page {
    background: var(--bg-light);
    padding: 60px 20px;
}

.form-wrapper {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 14.28%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition);
}

.step.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(10, 42, 102, 0.15);
}

.step.completed .step-circle {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
}

.step.active .step-label {
    color: var(--primary);
}

.step.completed .step-label {
    color: var(--secondary-dark);
}

/* ===== FORM SECTIONS ===== */
.form-section {
    display: none;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 228, 236, 0.5);
}

.form-section.active {
    display: block;
    animation: sectionIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes sectionIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.section-icon {
    font-size: 24px;
    flex-shrink: 0;
    background: white;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 400;
}

/* ===== FORM FIELDS ===== */
.field-group {
    margin-bottom: 28px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: #ef4444;
}

.text-input, .textarea-input, .select-wrapper select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 16px;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: var(--transition);
    outline: none;
}

.text-input:focus, .textarea-input:focus, .select-wrapper select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

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

.char-count, .field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* ===== RADIO & SELECTION CARDS (MINIMALIST) ===== */
.radio-group, .priority-group, .identity-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.category-group {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 640px) {
    .category-group {
        grid-template-columns: 1fr 1fr;
    }
}

.radio-card, .priority-card, .identity-card {
    position: relative;
    cursor: pointer;
}

.radio-card input, .priority-card input, .identity-card input {
    position: absolute;
    opacity: 0;
}

.radio-card-content, .priority-content, .identity-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 24px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: var(--bg-white);
    height: 100%;
}

.radio-card:hover .radio-card-content, 
.priority-card:hover .priority-content,
.identity-card:hover .identity-content {
    border-color: var(--text-light);
    background: var(--bg-light);
}

.radio-card input:checked ~ .radio-card-content,
.priority-card input:checked ~ .priority-content,
.identity-card input:checked ~ .identity-content {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.12); /* Brighter/Darker background */
    border-width: 2px; /* Bolder border */
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.radio-text, .priority-label, .identity-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.radio-check {
    display: none; /* Hide heavy checkmark for minimalist feel */
}

.priority-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Specific Priority Colors - High Contrast */
.priority-low input:checked ~ .priority-content {
    border-color: var(--priority-low);
    background: rgba(34, 197, 94, 0.1);
    border-width: 2px;
}
.priority-low .priority-indicator { background: var(--priority-low); }

.priority-medium input:checked ~ .priority-content {
    border-color: var(--priority-medium);
    background: rgba(245, 158, 11, 0.1);
    border-width: 2px;
}
.priority-medium .priority-indicator { background: var(--priority-medium); }

.priority-high input:checked ~ .priority-content {
    border-color: var(--priority-high);
    background: rgba(249, 115, 22, 0.1);
    border-width: 2px;
}
.priority-high .priority-indicator { background: var(--priority-high); }

.priority-urgent input:checked ~ .priority-content {
    border-color: var(--priority-urgent);
    background: rgba(239, 68, 68, 0.1);
    border-width: 2px;
}
.priority-urgent .priority-indicator { background: var(--priority-urgent); }

/* ===== CONDITIONAL SECTION ===== */
.conditional-section {
    margin-top: 24px;
    padding: 24px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
}

/* ===== FILE UPLOAD ===== */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(10, 42, 102, 0.03);
}

.upload-icon {
    color: var(--text-light);
    margin-bottom: 12px;
    transition: var(--transition);
}

.btn-primary:active, .btn-submit:active {
    transform: translateY(0) scale(0.98);
    background: var(--primary-dark);
}

.file-upload-area:hover .upload-icon {
    color: var(--primary);
    transform: translateY(-4px);
}

.upload-text {
    font-size: 15px;
    color: var(--text-mid);
    margin-bottom: 6px;
}

.upload-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-light);
}

.file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    animation: sectionIn 0.3s ease;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dark);
}

.file-icon {
    font-size: 18px;
}

.file-size {
    color: var(--text-light);
    font-size: 12px;
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.file-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===== FORM NAVIGATION ===== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 8px;
}

/* ===== SUCCESS PAGE ===== */
#success-page {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
}

#success-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 165, 76, 0.1) 0%, transparent 70%);
    top: -150px;
    left: -150px;
    animation: floatOrb 8s ease-in-out infinite;
}

.success-container {
    text-align: center;
    padding: 40px 24px;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

/* ===== CHECKMARK ANIMATION ===== */
.success-checkmark {
    margin-bottom: 32px;
}

.checkmark-svg {
    width: 100px;
    height: 100px;
}

.checkmark-circle {
    stroke: var(--secondary);
    stroke-dasharray: 340;
    stroke-dashoffset: 340;
    animation: circleAnim 0.8s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.checkmark-path {
    stroke: var(--secondary);
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkAnim 0.5s 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes circleAnim {
    to { stroke-dashoffset: 0; }
}

@keyframes checkAnim {
    to { stroke-dashoffset: 0; }
}

.success-title {
    color: white;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    margin-bottom: 20px;
    animation: fadeSlideIn 0.7s 0.5s both;
}

.success-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 28px;
    animation: fadeSlideIn 0.7s 0.7s both;
}

.success-ref {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px 32px;
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    animation: fadeSlideIn 0.7s 0.9s both;
}

.ref-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ref-number {
    font-size: 20px;
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 1.5px;
}

.success-footer {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin-bottom: 32px;
    animation: fadeSlideIn 0.7s 1.1s both;
}

#success-page .btn-primary {
    animation: fadeSlideIn 0.7s 1.3s both;
}

/* ===== VALIDATION ERROR ===== */
.field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.error-message {
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

/* ===== TOAST NOTIFICATION ===== */
/* ===== TOAST NOTIFICATION (MINIMAL) ===== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-dark);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== LOADING SPINNER ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner-dark {
    border-color: rgba(30, 64, 175, 0.1);
    border-top-color: var(--primary);
}

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

/* ===== LOOKUP SECTION (MINIMALIST) ===== */
.lookup-section {
    margin-top: 56px;
    animation: fadeSlideIn 0.6s 0.7s both;
}

.lookup-title {
    color: var(--text-mid);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
}

.lookup-input-group {
    display: flex;
    gap: 8px;
    max-width: 440px;
    margin: 0 auto;
}

.lookup-input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-dark);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.lookup-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.lookup-btn {
    padding: 12px 24px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lookup-btn:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
}

/* Lookup Result Card */
.lookup-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    text-align: left;
    margin-top: 24px;
}

.lookup-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.lookup-ref-id {
    color: var(--primary);
    font-size: 17px;
    font-weight: 700;
}

.lookup-status {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    background: white;
    border: 1px solid var(--border);
}

.lookup-card-body {
    padding: 12px 24px;
}

.lookup-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.lookup-row:last-child {
    border-bottom: none;
}

.lookup-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.lookup-value {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
    text-align: right;
}

.lookup-note .lookup-value {
    text-align: left;
    background: var(--bg-light);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    width: 100%;
}

/* ===== COUNCIL REPLY SECTION ===== */
.lookup-council-reply {
    margin: 16px 0 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
    animation: fadeSlideIn 0.5s ease both;
}

.lookup-council-reply.has-reply {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--primary-light);
}

.lookup-council-reply.no-reply {
    background: #fefce8;
    border: 1px dashed #fde68a;
}

.council-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 0;
}

.council-reply-icon {
    font-size: 18px;
}

.council-reply-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.lookup-council-reply.no-reply .council-reply-title {
    color: #92400e;
}

.council-reply-body {
    padding: 10px 16px 14px;
}

.council-reply-text {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.7;
    font-weight: 500;
    white-space: pre-wrap;
    word-break: break-word;
}

.council-reply-waiting {
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
    line-height: 1.6;
}

.home-dashboard-summary {
    width: 100%;
    max-width: 500px;
    margin: 40px auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    animation: fadeSlideIn 0.6s 0.8s both;
}

.home-chart-title {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.home-chart-container {
    height: 180px;
    margin-top: 16px;
}

/* ===== FILE LINKS ===== */
.file-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--border);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.file-link:hover {
    background: var(--bg-light);
    border-color: var(--primary-light);
}

/* ===== TOP NAV ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.9rem;
}

.brand-text {
    font-weight: 700;
    font-family: var(--font-header);
    color: var(--text-dark);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.nav-admin-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-admin-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Adjust page padding for fixed nav */
.page {
    padding-top: 100px;
}

/* ===== SUCCESS STORIES ===== */
.success-stories-section {
    width: 100%;
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.stories-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.stories-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

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

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.story-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.story-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #10b981;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 12px;
    border-bottom-left-radius: 12px;
    letter-spacing: 0.05em;
}

.story-subject {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.story-dept {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.story-note {
    font-size: 0.9rem;
    color: #475569;
    font-style: italic;
    line-height: 1.5;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

/* ===== UPVOTE BUTTON ===== */
.lookup-footer {
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.btn-upvote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--primary-light);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upvote:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-upvote.voted {
    background: #d1fae5;
    color: #065f46;
    border-color: #065f46;
}

.vote-count {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ===== QR CODE ===== */
.qr-container {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    text-align: center;
}

.qr-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

#qr-code {
    margin: 0 auto 1.25rem;
    width: 170px;
    height: 170px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-img {
    width: 100%;
    height: 100%;
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.btn-text-only:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-content h3 {
    margin-bottom: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-buttons button {
    flex: 1;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.admin-header h2 {
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.admin-table-container {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #f1f5f9;
}

.admin-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.admin-ref { 
    font-weight: 700; 
    color: var(--primary);
    font-family: monospace;
    font-size: 1rem;
}

.admin-subject { 
    font-weight: 600;
    max-width: 320px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.admin-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.admin-loading, .admin-error, .admin-empty {
    text-align: center;
    padding: 4rem !important;
    color: var(--text-muted);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 10px;
}

/* Admin Edit Modal Context */
.admin-edit-content {
    max-width: 500px;
}

/* Input icon adjustments */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.input-with-icon .text-input {
    padding-left: 3rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .intro-stats {
        flex-direction: column;
        gap: 24px;
        padding: 24px;
    }
    
    .stat-divider {
        width: 60px;
        height: 1px;
    }
    
    .intro-buttons {
        flex-direction: column;
        padding: 0 40px;
    }
    
    .radio-group, .priority-group, .identity-group {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
