/* 
  Smart Campus Response System - GDC Dharamshala
  Theme: Deep Blue, Gold, White, Glassmorphism 
*/

:root {
    /* Colors */
    --deep-blue: #0b132b;
    --navy-blue: #1c2541;
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --blue-glow: rgba(58, 134, 255, 0.4);
    --white: #ffffff;
    --off-white: #f8f9fa;
    --text-muted: #adb5bd;

    /* Status Colors */
    --green: #2ea043;
    --red: #f85149;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--deep-blue);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Storytelling Background --- */
.storyboard-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: #0d1117;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1), transform 10s linear;
    z-index: 1;
}

.bg-layer.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1.05);
    /* Subtle Ken Burns continuous zoom */
}

.bg-overlay {
    position: absolute;

    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(13, 17, 23, 0.3) 0%, rgba(137, 108, 59, 0.9) 100%);
    z-index: 3;
}

/* Hide legacy particles if active */
#particles-js {
    display: none;
}

/* Global Utility Classes */
.text-center {
    text-align: center;
}

.text-gold {
    color: var(--gold) !important;
}

.text-blue {
    color: #3a86ff !important;
}

.text-green {
    color: var(--green) !important;
}

.text-red {
    color: var(--red) !important;
}

.z-index-2 {
    position: relative;
    z-index: 2;
}

.op-50 {
    opacity: 0.5;
}

/* Buttons & Glassmorphism */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn i {
    margin-right: 8px;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-glow:hover {
    box-shadow: 0 0 20px var(--blue-glow);
}

.btn-gold {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-gold.btn-glow:hover {
    box-shadow: 0 0 20px var(--gold-glow);
    background: rgba(212, 175, 55, 0.1);
}

.glass-panel {
    background: rgba(28, 37, 65, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

/* --- Elegant Form Elements --- */
.elegant-input,
.elegant-select,
.elegant-textarea {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    color: white !important;
    font-size: 1rem !important;
    transition: all 0.3s ease;
    width: 100%;
}

.elegant-select option {
    color: #000 !important;
    background: #fff !important;
}

.elegant-input:focus,
.elegant-select:focus,
.elegant-textarea:focus {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2) !important;
    outline: none;
    transform: translateY(-1px);
}

.file-upload-zone {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-upload-zone:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

.file-upload-zone i {
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.8;
}

.file-upload-zone span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-upload-zone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.btn-submit-premium {
    width: 100%;
    padding: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #d4af37 0%, #a67c00 100%);
    border: none;
    color: #000;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-submit-premium:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4);
    filter: brightness(1.1);
}

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

/* Student Dashboard Specifics */
.student-dashboard-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    background: url('../images/dashboard/student_hero.png') center/cover no-repeat;
    animation: kenBurns 40s infinite alternate linear;
}

.student-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(11, 19, 43, 0.4) 0%, rgba(11, 19, 43, 0.9) 100%);
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
}

.student-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.student-card:hover {
    border-color: var(--gold-glow);
    background: rgba(255, 255, 255, 0.05);
}

/* Section Layouts */
.fullscreen-section {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
}

.section-title {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

/* --- Section 1: Welcome --- */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.college-header {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    z-index: 100;
    text-align: left;
}

@media (max-width: 768px) {
    .college-header {
        top: 1rem;
        left: 1rem;
        gap: 10px;
    }
}

.college-logo {
    width: 65px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    border: 2px solid var(--gold);
    padding: 3px;
    flex-shrink: 0;
    /* Blend mode helps if logo has white background */
    mix-blend-mode: lighten;
}

.college-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.2;
}

.college-header .established {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .college-header h2 {
        font-size: 1rem;
    }

    .college-header .established {
        font-size: 0.75rem;
    }
}

.main-title {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    font-family: var(--font-serif);
}

@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
}

.tagline {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.portal-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-bounce {
    font-size: 1.5rem;
    margin-top: 1rem;
    color: var(--gold);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(10px);
    }

    60% {
        transform: translateY(5px);
    }
}

/* Base Pre-animation styling for Sec 1 */
.gsap-fade-up {
    opacity: 0;
    transform: translateY(30px);
}

/* --- Section 2: The Problem --- */
.ambient-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 80% 20%, rgba(28, 37, 65, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(28, 37, 65, 0.8) 0%, transparent 50%);
    z-index: 0;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.problem-card {
    padding: 2rem;
    text-align: center;
    opacity: 0;
    /* GSAP reveals this */
    transform: translateY(20px);
}

.problem-card i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.problem-card:hover i {
    color: var(--gold);
}

.problem-card p {
    font-size: 1.1rem;
    font-weight: 500;
}

.problem-statement {
    font-size: 1.8rem;
    font-style: italic;
    font-family: var(--font-serif);
    color: var(--gold);
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    /* GSAP reveal */
}

/* --- Section 3: Introducing Solution --- */
.interface-illustration {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    /* GSAP */
}

.interface-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.interface-header .dots {
    display: flex;
    gap: 6px;
    margin-right: 15px;
}

.interface-header .dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.interface-header .dots span:nth-child(1) {
    background: #f85149;
}

.interface-header .dots span:nth-child(2) {
    background: #d4af37;
}

.interface-header .dots span:nth-child(3) {
    background: #2ea043;
}

.interface-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sol-step {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 2rem;
    border-radius: 8px;
    width: 100%;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    opacity: 0;
    /* GSAP */
}

.sol-step i {
    font-size: 1.2rem;
}

.connector {
    color: var(--gold);
    font-size: 1.5rem;
    opacity: 0;
    /* GSAP */
}

/* --- Section 4: Workflow Animation --- */
.workflow-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 1000px;
    margin: 5rem auto;
    padding: 0 2rem;
}

.workflow-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 0;
}

/* Glowing pseudo element animated by GSAP */
.workflow-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    /* GSAP animates this width */
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    z-index: 1;
}

.wf-node {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 120px;
    opacity: 0;
    transform: scale(0.8);
}

.wf-icon {
    width: 70px;
    height: 70px;
    background: var(--navy-blue);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.wf-node.active .wf-icon {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    color: var(--gold);
}

.wf-icon.border-gold {
    border-color: var(--gold);
}

.wf-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .workflow-container {
        flex-direction: column;
        gap: 3rem;
    }

    .workflow-line {
        top: 10%;
        bottom: 10%;
        left: 50%;
        right: auto;
        width: 3px;
        height: 80%;
        transform: translateX(-50%);
    }

    .workflow-line::after {
        width: 100%;
        height: 0%;
        /* GSAP will need logic to animate height instead */
    }
}

/* --- Section 5: Analytics --- */
.analytics-split {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.analytics-text {
    flex: 1;
}

.analytics-statement {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0;
}

.chart-container {
    flex: 1.5;
    padding: 2rem;
    opacity: 0;
    transform: translateX(50px);
}

@media (max-width: 900px) {
    .analytics-split {
        flex-direction: column;
    }

    .chart-container {
        width: 100%;
    }
}

/* --- Section 6: Principal Dashboard --- */
.dashboard-mockup {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    opacity: 0;
    transform: translateY(40px);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.live-indicator {
    background: rgba(248, 81, 73, 0.2);
    color: var(--red);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

.dash-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.dash-card:hover {
    border-color: var(--glass-border);
    transform: translateY(-5px);
}

.dash-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.dash-card h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.dash-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-serif);
}

.alert-card {
    border-color: rgba(248, 81, 73, 0.3);
    background: rgba(248, 81, 73, 0.05);
}



/* --- Section 7: Final CTA --- */
.final-statement {
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 3rem;
    opacity: 0;
    transform: scale(0.9);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
}

@media (max-width: 768px) {
    .final-statement {
        font-size: 2.5rem;
    }
}

/* --- Slider / Carousel --- */
.slider-frame {
    width: 100%;
    max-width: 900px;
    height: 450px;
    /* Increased slightly */
    margin: 2.5rem auto;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    touch-action: pan-y;
}

.slider-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 2;
}

.slider-caption {
    position: absolute;
    bottom: 60px;
    left: 40px;
    right: 40px;
    z-index: 25;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slider-slide.active .slider-caption {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.slider-caption h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--gold);
}

.slider-caption p {
    font-size: 1rem;
    opacity: 0.9;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.slider-slide.active {
    opacity: 1;
    z-index: 10;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transform: scale(1.05);
    transition: transform 8s linear;
}

.slider-slide.active img {
    transform: scale(1);
}

.slider-nav {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 30;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-dot.active {
    background: var(--gold);
    width: 25px;
    /* Pill shape active dot */
    border-radius: 5px;
    box-shadow: 0 0 10px var(--gold-glow);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.slider-arrow:hover {
    background: var(--gold);
    color: var(--deep-blue);
    border-color: var(--gold);
    transform: translateY(-50%) scale(1.1);
}

.arrow-prev {
    left: 20px;
}

.arrow-next {
    right: 20px;
}

.dynamic-gallery {
    opacity: 0;
    transform: translateY(30px);
}

/* --- Admin Dashboard Enhancements --- */
#admin-bg-container {
    background: radial-gradient(circle at center, #0b132b 0%, #000000 100%);
}

.fog-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/fog.png');
    /* Placeholder or CSS gradient */
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
    animation: fog-drift 60s linear infinite;
}

@keyframes fog-drift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 1000px 0;
    }
}

.toast {
    animation: slide-in-right 0.3s ease forwards;
    transition: opacity 0.5s;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.glow-success {
    animation: glow-success 1.5s ease-in-out;
}

@keyframes glow-success {
    0%, 100% { box-shadow: 0 0 0px rgba(16, 185, 129, 0); }
    50% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.6); }
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-resolved {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Media Enhancement Styles
   ───────────────────────────────────────────────────────────────────────────── */

.media-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.complaint-img {
    width: 100%;
    display: block;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.complaint-img.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2);
    z-index: 10001;
    max-height: 90vh;
    width: auto;
    max-width: 90vw;
    object-fit: contain;
    cursor: zoom-out;
}

.zoom-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-size: 0.75rem;
    text-align: center;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

.media-wrapper:hover .img-overlay {
    opacity: 1;
}

.complaint-video {
    width: 100%;
    display: block;
    max-height: 400px;
    background: #000;
}

.btn-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0;
}

.media-wrapper:hover .btn-fullscreen {
    opacity: 1;
    transform: scale(1.1);
}

.media-fallback {
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.media-fallback i {
    font-size: 1.5rem;
    color: #daa520;
    opacity: 0.5;
}

.media-fallback.error {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.media-fallback.error i {
    color: #ef4444;
}

.media-wrapper.hovered .img-overlay {
    opacity: 1;
}

.loading-skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-skeleton::after {
    content: 'Loading Media...';
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    font-weight: 600;
}

.loading-skeleton video,
.loading-skeleton img {
    opacity: 0;
}

/* === Dynamic Gallery / Slider Styles === */
.dynamic-gallery {
    margin: 4rem auto;
    max-width: 1000px;
    width: 95%;
    opacity: 0;
    transform: translateY(30px);
}

.slider-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.slider-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.slider-slide.active {
    opacity: 1;
    visibility: visible;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 2rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
}

.slider-caption h3 {
    color: var(--gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.slider-caption p {
    font-size: 1.4rem;
    font-family: var(--font-serif);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Navigation Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.slider-arrow:hover {
    background: var(--gold);
    color: black;
    transform: translateY(-50%) scale(1.15);
}

.arrow-prev {
    left: 1.5rem;
}

.arrow-next {
    right: 1.5rem;
}

.slider-nav {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

.slider-dot.active {
    background: var(--gold);
    transform: scale(1.4);
    box-shadow: 0 0 10px var(--gold);
}

/* Mobile Quick Fix */
@media (max-width: 768px) {
    .slider-frame {
        aspect-ratio: 16 / 9;
    }

    .slider-caption p {
        font-size: 1rem;
    }

    .slider-arrow {
        width: 35px;
        height: 35px;
    }
}



/* Featured Toggle Switch */
.featured-toggle {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.featured-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: '';
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--gold);
}

input:checked+.toggle-slider:before {
    transform: translateX(14px);
}


/* Gallery Drag & Drop Styling */
.gallery-item {
    cursor: grab !important;
}

.gallery-item:active {
    cursor: grabbing !important;
}

.sortable-chosen {
    scale: 1.05;
    box-shadow: 0 0 25px var(--gold-glow);
    border: 2px solid var(--gold) !important;
    z-index: 100;
    transition: scale 0.2s ease;
}

.sortable-ghost {
    opacity: 0.3;
    background: var(--gold-glow) !important;
}


/* =========================================================================
   DASHBOARD SAAS OVERHAUL STYLES
   ========================================================================= */
.dashboard-root {
    display: flex;
    height: 100vh;
    background: #0b132b;
    color: #ffffff;
    overflow: hidden;
    margin: 0;
}

.sidebar {
    width: 260px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(2, 6, 23, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand img {
    width: 32px;
    height: 32px;
    border: 1px solid var(--gold);
    border-radius: 50%;
}

.sidebar-brand span {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0.75rem;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    padding: 12px 16px;
    margin-bottom: 6px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #adb5bd;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(5px);
}

.nav-item.active {
    background: var(--gold);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gold);
    color: #000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details span {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-details small {
    font-size: 0.7rem;
    opacity: 0.6;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.logout-btn:hover {
    background: #ef4444;
    color: #fff;
}

.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
}

.main-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(11, 19, 43, 0.8);
    backdrop-filter: blur(10px);
    z-index: 900;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-left h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.header-left p {
    margin: 0;
    font-size: 0.85rem;
    color: #adb5bd;
}

.search-bar {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 300px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    font-size: 0.85rem;
}

.search-bar input:focus {
    outline: none;
}

.notifications-bell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bell-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #0b132b;
}

.tab-viewport {
    padding: 2rem;
}

.admin-tab-content {
    display: none;
    animation: slideUpFade 0.4s ease-out forwards;
}

.admin-tab-content.active {
    display: block;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(2, 6, 23, 0.5));
    border-left: 4px solid var(--gold);
}

.welcome-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.welcome-text p {
    margin: 0;
    opacity: 0.7;
}

.welcome-card img {
    width: 120px;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}
/* --- ?? REAL-TIME ANALYTICS SUITE --- */
.analytics-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.chart-container {
    padding: 1.5rem;
    position: relative;
    min-height: 300px;
}

.chart-container h4 {
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #adb5bd;
}

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

.chart-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.primary { background: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }

.side-charts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-charts .chart-container {
    flex: 1;
    min-height: 220px;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 1100px) {
    .analytics-row {
        grid-template-columns: 1fr;
    }
}

/* --- UI POLISH: TOAST NOTIFICATIONS --- */
.glowing-toast {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--gold);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 15px rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.4s ease-out forwards, fadeOut 0.4s ease-in 4.6s forwards;
    transform: translateX(110%);
    position: relative;
    overflow: hidden;
}

.glowing-toast::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shineToast 2s infinite;
}

@keyframes slideInRight {
    to { transform: translateX(0); }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateX(110%); }
}
@keyframes shineToast {
    100% { left: 200%; }
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

/* --- UI POLISH: SKELETON LOADERS --- */
.skeleton-row {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: placeholderShimmer 1.5s infinite linear;
    border-radius: 4px;
    height: 20px;
    width: 100%;
    display: inline-block;
}

@keyframes placeholderShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- ACTIVITY FEED --- */
.activity-feed-container {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 10px;
}
.activity-feed-container::-webkit-scrollbar {
    width: 4px;
}
.activity-feed-container::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.feed-item {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: feedSlideDown 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes feedSlideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.feed-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.feed-icon.new { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.feed-icon.resolved { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.feed-icon.assigned { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.feed-icon.emergency { background: rgba(239, 68, 68, 0.2); color: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }

.feed-content {
    flex: 1;
}
.feed-content p {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
}
.feed-content small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* SMART AI GLOW */
.ai-glowing-row {
    position: relative;
    box-shadow: inset 4px 0 0 var(--gold), inset 0 0 20px rgba(255, 215, 0, 0.1) !important;
}
.ai-badge {
    background: linear-gradient(45deg, var(--gold), #ff8c00);
    color: #000;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 6px;
    display: inline-block;
    animation: aiPulse 2s infinite;
}
@keyframes aiPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* SMART PRIORITY INDICATOR ON CARDS */
.smart-priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.1);
}
.spi-high { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: #ef4444; }
.spi-medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border-color: #f59e0b; }
.spi-low { background: rgba(16, 185, 129, 0.15); color: #10b981; border-color: #10b981; }

