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

:root {
    --primary: #2ea3f2;
    --primary-dark: #1a8fd8;
    --primary-glow: rgba(46,163,242,0.2);
    --accent: #3b82f6;
    --dark: #1e293b;
    --darker: #0f172a;
    --dark-card: #1e293b;
    --text: #1e293b;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --white: #fff;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --shadow-glow: 0 8px 30px rgba(46,163,242,0.15);
    --radius: 16px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

img { max-width: 100%; height: auto; display: block; }

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(46,163,242,0.15); }
}

.js-ready .animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.js-ready .animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}
.btn:hover::before { left: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(46,163,242,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46,163,242,0.4);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
    backdrop-filter: blur(10px);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; border-color: #e74c3c; }
.btn-danger:hover { background: linear-gradient(135deg, #c0392b, #a93226); color: #fff; }

/* === HEADER === */
.site-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 10px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 4px;
}

.main-nav a {
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; width: 0; height: 2px;
    background: var(--primary);
    transition: all var(--transition);
    transform: translateX(-50%);
}
.main-nav a:hover::after { width: 60%; }
.main-nav a:hover {
    color: var(--dark);
    background: rgba(46,163,242,0.06);
}
.main-nav a.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.main-nav a.active::after { width: 0; }

.main-nav a.nav-contact-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 50px;
    margin-left: 8px;
}
.main-nav a.nav-contact-btn::after { display: none; }
.main-nav a.nav-contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(46,163,242,0.3);
    color: #fff;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: all var(--transition);
    border-radius: 2px;
}

/* === HERO === */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    text-align: center;
    padding: 120px 20px 100px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(46,163,242,0.2) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(59,130,246,0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(46,163,242,0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 100px,
        rgba(255,255,255,0.01) 100px,
        rgba(255,255,255,0.01) 200px
    );
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary) 50%, var(--accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite, fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 22px;
    color: var(--text-muted);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s backwards;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
}

.hero-contact {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s backwards;
}

/* Decorative line */
.hero-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 0 auto 30px;
    border-radius: 3px;
    animation: fadeIn 1s ease 0.3s backwards;
}

/* === HOME CARDS === */
.home-cards {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 40px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    letter-spacing: -1px;
}
.section-title p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}
.section-title .line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 16px auto 0;
    border-radius: 3px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 45px 35px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    color: var(--text);
    display: block;
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform var(--transition);
    transform-origin: left;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(46,163,242,0.15);
    color: var(--text);
}

.card-icon {
    font-size: 56px;
    margin-bottom: 24px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.card h3 {
    font-size: 22px;
    margin-bottom: 14px;
    color: var(--dark);
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.card .card-arrow {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all var(--transition);
}
.card:hover .card-arrow { transform: translateX(5px); color: var(--accent); }

/* === HOME ABOUT === */
.home-about {
    padding: 80px 0 100px;
    position: relative;
}
.home-about::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(46,163,242,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.about-with-photo {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.about-photo {
    flex-shrink: 0;
}

.about-photo img {
    width: 280px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.about-content {
    text-align: left;
    position: relative;
}

.about-content h2 {
    font-size: 36px;
    margin-bottom: 16px;
    color: var(--dark);
    font-weight: 800;
}

.about-content p {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 24px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .about-with-photo {
        flex-direction: column;
        text-align: center;
    }
    .about-content {
        text-align: center;
    }
    .about-photo img {
        width: 220px;
    }
}

/* === PAGE HERO === */
.page-hero {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(46,163,242,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease;
}

.page-hero .hero-line {
    margin-top: 20px;
}

.page-hero-fitnes::before {
    background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(46,163,242,0.18) 0%, transparent 60%);
}
.page-hero-film::before {
    background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(155,89,182,0.15) 0%, transparent 60%);
}
.page-hero-travel::before {
    background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(243,156,18,0.12) 0%, transparent 60%);
}

/* === PAGE CONTENT === */
.page-content {
    padding: 60px 0 100px;
}

.content-body {
    max-width: 850px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 55px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.06);
    animation: fadeInUp 0.8s ease;
}

.content-body h2 {
    font-size: 34px;
    color: var(--dark);
    margin-bottom: 24px;
    font-weight: 800;
}

.content-body h3 {
    font-size: 22px;
    color: var(--dark);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
}

.content-body p {
    margin-bottom: 18px;
    color: var(--text-muted);
    line-height: 1.8;
}

.content-body strong { color: var(--dark); }

.content-body ul {
    margin-bottom: 18px;
    padding-left: 0;
    list-style: none;
}

.content-body li {
    margin-bottom: 8px;
    color: var(--text-muted);
    padding-left: 24px;
    position: relative;
}
.content-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
}

.content-body table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f6;
}

.content-body table td:first-child {
    font-weight: 700;
    color: var(--dark);
    width: 40%;
}

.content-body .info-box {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 28px;
    margin: 24px 0;
    border: 1px solid rgba(46,163,242,0.12);
    border-left: 4px solid var(--primary);
}

.content-body .info-box h3 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    color: var(--primary);
}

/* Casting section */
.content-body .casting-section {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 28px;
    margin: 24px 0;
    border: 1px solid rgba(46,163,242,0.12);
    border-left: 4px solid var(--primary);
}

.content-body .casting-section h3 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    color: var(--primary);
    margin-bottom: 20px;
}

.casting-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.casting-info {
    flex: 1;
}

.casting-info table {
    width: 100%;
}

/* Casting carousel */
.casting-carousel {
    position: relative;
    width: 320px;
    min-width: 320px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    background: #e8f0fa;
}

.casting-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.casting-carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.casting-carousel-slide img {
    width: 100%;
    height: 480px;
    object-fit: contain;
    display: block;
}

.casting-carousel-prev,
.casting-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
}

.casting-carousel-prev { left: 10px; }
.casting-carousel-next { right: 10px; }

.casting-carousel-prev:hover,
.casting-carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.casting-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.casting-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
    padding: 0;
}

.casting-carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .casting-layout {
        flex-direction: column;
    }
    .casting-carousel {
        width: 100%;
        min-width: unset;
    }
    .casting-carousel-slide img {
        height: 350px;
    }
}

.content-body .highlight-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-align: center;
    padding: 35px;
    border-radius: var(--radius);
    margin: 35px 0;
    box-shadow: 0 8px 30px rgba(46,163,242,0.3);
    animation: glowPulse 3s ease-in-out infinite;
}

.content-body .highlight-box h3 {
    color: var(--white);
    margin: 0;
    border-bottom: none;
    font-size: 20px;
    letter-spacing: 1px;
}

.content-body .cta-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: var(--white);
    text-align: center;
    padding: 50px;
    border-radius: var(--radius);
    margin: 45px 0 0;
    border: none;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(46,163,242,0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.content-body .cta-box h3 {
    color: var(--white);
    margin: 0;
    border-bottom: none;
    font-size: 26px;
    position: relative;
    z-index: 1;
}

/* === CONTENT INLINE IMAGES === */
.content-img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.content-img-wide {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.content-img-side {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 300px;
    min-width: 300px;
    height: 380px;
    object-fit: cover;
}

.content-with-image {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin: 30px 0;
}

.content-with-image .content-text {
    flex: 1;
}

.content-with-image-left {
    flex-direction: row-reverse;
}

.content-gallery {
    display: grid;
    gap: 16px;
    margin: 30px 0;
}

.content-gallery-2 { grid-template-columns: repeat(2, 1fr); }
.content-gallery-3 { grid-template-columns: repeat(3, 1fr); }
.content-gallery-4 { grid-template-columns: repeat(4, 1fr); }

.content-gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    aspect-ratio: 4/3;
}

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

.content-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.content-gallery-item:hover img {
    transform: scale(1.05);
}

/* === PROJECTS GALLERY (Natáčení) === */
.projects-gallery {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-6px) rotate(-1deg);
    box-shadow: var(--shadow-lg);
}

.project-card-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f1f5f9;
}

.project-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition);
}

.project-card:hover .project-card-img img {
    transform: scale(1.05);
}

.project-card-caption {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .project-card-caption {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* === LIGHTBOX === */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(10px);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s, transform 0.3s;
}

.lightbox-img.lightbox-img-loaded {
    opacity: 1;
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10001;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 12px; right: 12px; font-size: 32px; }
}

/* === HOME GALLERY === */
.home-gallery {
    padding: 0 0 100px;
}

/* === GALLERY === */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-large {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid rgba(0,0,0,0.06);
}

.gallery-item:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-caption {
    padding: 12px 16px;
    background: var(--bg-card);
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* === FOOTER === */
.site-footer {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
    position: relative;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-contact h3 {
    color: var(--white);
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 700;
}

.footer-contact p {
    margin-bottom: 6px;
}

.footer-contact a {
    color: var(--primary);
    transition: all var(--transition);
}
.footer-contact a:hover {
    color: var(--accent);
    text-shadow: 0 0 10px var(--primary-glow);
}

.footer-copy {
    text-align: right;
    font-size: 14px;
}

.footer-copy a {
    color: var(--primary);
    font-size: 13px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-top: 1px solid rgba(0,0,0,0.06);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }
    .main-nav.open { display: flex; }

    .cards-grid { grid-template-columns: 1fr; }

    .hero { padding: 80px 20px 60px; }
    .hero h1 { font-size: 40px; }
    .hero-subtitle { font-size: 16px; letter-spacing: 1px; }

    .page-hero h1 { font-size: 32px; }
    .page-hero { padding: 60px 20px; }

    .content-body { padding: 30px 20px; }
    .content-body h2 { font-size: 28px; }
    .content-body h3 { font-size: 19px; }

    .content-with-image {
        flex-direction: column;
    }
    .content-with-image-left {
        flex-direction: column;
    }
    .content-img-side {
        width: 100%;
        min-width: unset;
        height: 300px;
    }
    .content-gallery-4 { grid-template-columns: repeat(2, 1fr); }

    .section-title h2 { font-size: 30px; }

    .gallery { grid-template-columns: 1fr 1fr; }
    .gallery-large { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; }
    .footer-copy { text-align: left; }
}

@media (max-width: 480px) {
    .gallery { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .content-gallery-3 { grid-template-columns: 1fr; }
    .content-gallery-4 { grid-template-columns: 1fr; }
    .content-gallery-2 { grid-template-columns: 1fr; }
    .content-img-side { height: 250px; }
}

/* === ADMIN STYLES === */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-sidebar-header h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
}

.admin-sidebar-header h2 a {
    color: #fff;
    text-decoration: none;
}

.admin-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.admin-nav {
    flex: 1;
    padding: 12px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.admin-nav-item:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.04);
}

.admin-nav-item.active {
    color: #fff;
    background: rgba(46,163,242,0.1);
    border-left-color: var(--primary);
}

.admin-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.admin-nav-item.active .admin-nav-icon,
.admin-nav-item:hover .admin-nav-icon {
    opacity: 1;
}

.admin-nav-badge {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    line-height: 1.4;
}

.admin-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 8px 20px;
}

.admin-sidebar-footer {
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Mobile admin bar */
.admin-mobile-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 99;
    background: #1e293b;
    padding: 0 16px;
    height: 56px;
    align-items: center;
    gap: 12px;
}

.admin-mobile-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-mobile-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.admin-mobile-toggle svg {
    width: 24px;
    height: 24px;
}

.admin-mobile-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.admin-content {
    flex: 1;
    padding: 30px;
    background: var(--bg);
    min-width: 0;
}

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

.admin-header h1 {
    font-size: 28px;
    color: var(--dark);
}

.admin-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    border: 1px solid rgba(0,0,0,0.06);
}

.admin-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--dark);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition);
    background: #fff;
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,163,242,0.1);
}

.form-group textarea {
    min-height: 300px;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* Flash messages */
.flash {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
}
.flash-success { background: rgba(40,167,69,0.15); color: #4caf50; border: 1px solid rgba(40,167,69,0.3); }
.flash-error { background: rgba(231,76,60,0.15); color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }

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

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef2f6;
}

.admin-table th {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.admin-table td { font-size: 14px; color: var(--text); }
.admin-table td:first-child { color: var(--dark); }
.admin-table code { color: var(--primary); background: #f0f7ff; padding: 2px 8px; border-radius: 4px; }

.admin-table .actions { display: flex; gap: 8px; }

/* Gallery admin */
.gallery-admin {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-admin-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.06);
}

.gallery-admin-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.gallery-admin-item .delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(231,76,60,0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.gallery-admin-item .delete-btn:hover { transform: scale(1.1); background: #e74c3c; }

/* Gallery admin grid (new) */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.gallery-admin-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s, opacity 0.2s;
}

.gallery-admin-card.dragging {
    opacity: 0.4;
    box-shadow: var(--shadow-lg);
}

.gallery-admin-card-img {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f1f5f9;
}

.gallery-admin-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-admin-card-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 6px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-admin-card:hover .gallery-admin-card-actions {
    opacity: 1;
}

.drag-handle {
    color: #fff;
    cursor: grab;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    line-height: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.gallery-admin-delete {
    background: rgba(231,76,60,0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.gallery-admin-delete:hover {
    background: #e74c3c;
}

.gallery-admin-caption-form {
    display: flex;
    border-top: 1px solid #e2e8f0;
}

.gallery-caption-input {
    flex: 1;
    border: none;
    padding: 8px 10px;
    font-size: 13px;
    background: transparent;
    color: var(--text);
    outline: none;
    min-width: 0;
}

.gallery-caption-input:focus {
    background: #f8fafc;
}

.gallery-caption-save {
    border: none;
    background: none;
    color: var(--primary);
    cursor: pointer;
    padding: 8px 10px;
    font-size: 16px;
    font-weight: bold;
    transition: color 0.2s, background 0.2s;
    border-left: 1px solid #e2e8f0;
}

.gallery-caption-save:hover {
    background: var(--primary);
    color: #fff;
}

/* Hidden images in admin */
.gallery-admin-hidden {
    opacity: 0.5;
    position: relative;
}

.gallery-admin-hidden .gallery-admin-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(0,0,0,0.04) 8px,
        rgba(0,0,0,0.04) 16px
    );
    pointer-events: none;
}

.gallery-hidden-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.gallery-admin-toggle {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.gallery-admin-toggle:hover {
    background: #fff;
}

.gallery-select-cb {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.gallery-selectable {
    cursor: pointer;
    transition: outline 0.2s;
}

.gallery-selectable:has(.gallery-select-cb:checked) {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
}

/* Album list in admin */
.albums-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.album-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: box-shadow 0.2s, opacity 0.2s;
    cursor: grab;
}

.album-list-item:hover {
    box-shadow: var(--shadow);
}

.album-list-item.dragging {
    opacity: 0.4;
}

.album-list-hidden {
    opacity: 0.6;
    border-style: dashed;
}

.album-list-cover {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.album-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-list-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
}

.album-list-info {
    flex: 1;
    min-width: 0;
}

.album-list-info h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--text);
}

.album-list-info p {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.album-list-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.album-list-actions {
    flex-shrink: 0;
}

/* Frontend album grid */
.albums-grid-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.album-header {
    text-align: center;
    margin-bottom: 10px;
}

.album-header h2 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 8px;
}

.album-header p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 12px;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.album-tile {
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.album-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.album-tile-img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f1f5f9;
}

.album-tile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.album-tile:hover .album-tile-img img {
    transform: scale(1.08);
}

.album-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity var(--transition);
}

.album-tile:hover .album-tile-overlay {
    opacity: 1;
}

.album-tile-count {
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.album-tile-title {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

/* Album lightbox */
.album-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(10px);
}

.album-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.album-lightbox-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    z-index: 10001;
}

.album-lightbox-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.album-lightbox-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
}

.album-lightbox-close:hover {
    background: rgba(255,255,255,0.15);
}

.album-lightbox-prev,
.album-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10001;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
}

.album-lightbox-prev { left: 20px; }
.album-lightbox-next { right: 20px; }

.album-lightbox-prev:hover,
.album-lightbox-next:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-50%) scale(1.1);
}

.album-lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}

.album-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s, transform 0.3s;
}

.album-lightbox-img.album-lightbox-img-loaded {
    opacity: 1;
    transform: scale(1);
}

.album-lightbox-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    z-index: 10001;
}

.album-lightbox-caption {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.album-lightbox-counter {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .albums-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .album-tile-title { font-size: 13px; padding: 10px; }
    .album-lightbox-prev,
    .album-lightbox-next { width: 40px; height: 40px; font-size: 22px; }
    .album-lightbox-prev { left: 8px; }
    .album-lightbox-next { right: 8px; }
    .album-lightbox-title { font-size: 15px; }
}

@media (max-width: 480px) {
    .albums-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .album-tile-title { font-size: 12px; padding: 8px; }
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    position: relative;
}
.login-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center top, rgba(46,163,242,0.12) 0%, transparent 60%);
}

.login-box {
    background: #fff;
    padding: 45px;
    border-radius: var(--radius);
    width: 420px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.login-box h1 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 26px;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 14px;
}

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all var(--transition);
}
.stat-card:hover {
    border-color: rgba(46,163,242,0.2);
    box-shadow: var(--shadow-glow);
}

.stat-card .stat-number {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .admin-mobile-bar { display: flex; }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }
    .admin-sidebar-close { display: block; }
    body.admin-sidebar-open .admin-sidebar { transform: translateX(0); }
    body.admin-sidebar-open .admin-sidebar-overlay { display: block; }
    .admin-content { padding: 20px 16px; }
    .admin-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .admin-header h1 { font-size: 22px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .gallery-admin { grid-template-columns: repeat(2, 1fr); }
    .gallery-admin-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === CTA BANNER === */
.cta-banner {
    padding: 60px 0;
    text-align: center;
}

.cta-banner-btn {
    display: inline-block;
    padding: 22px 50px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(46,163,242,0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cta-banner-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 40px rgba(46,163,242,0.45);
}

.cta-banner-btn:active {
    transform: translateY(0) scale(0.98);
}

/* === CONTACT MODAL === */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px;
    width: 500px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.contact-modal-overlay.active .contact-modal {
    transform: translateY(0);
}

.contact-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.contact-modal-close:hover {
    color: var(--text);
}

.contact-modal h2 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 6px;
}

.contact-modal > p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.contact-form-group {
    margin-bottom: 18px;
}

.contact-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.contact-form-group input,
.contact-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.2s;
    background: #f8fafc;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.contact-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 5px;
}

.contact-success {
    background: #ecfdf5;
    color: #065f46;
    padding: 20px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #a7f3d0;
}

.contact-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
}

.contact-photo-upload {
    margin-top: 4px;
}

.contact-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-size: 14px;
    background: #f8fafc;
}

.contact-photo-placeholder:hover {
    border-color: var(--primary);
    background: rgba(46,163,242,0.04);
    color: var(--primary);
}

.contact-photo-preview {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.contact-photo-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.contact-photo-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.contact-photo-remove:hover {
    background: rgba(239,68,68,0.9);
}

.contact-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.contact-photos-grid .contact-photo-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.contact-photos-grid .contact-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .cta-banner-btn {
        padding: 18px 30px;
        font-size: 16px;
    }
    .contact-modal {
        padding: 25px;
    }
}

/* === DARK MODE === */
body.admin-dark-mode {
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --dark: #f1f5f9;
    --white: #fff;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
    --shadow-glow: 0 8px 30px rgba(46,163,242,0.2);
}

body.admin-dark-mode .admin-content {
    background: var(--bg);
}

body.admin-dark-mode .admin-card {
    border-color: rgba(255,255,255,0.06);
}

body.admin-dark-mode .form-group input,
body.admin-dark-mode .form-group textarea,
body.admin-dark-mode .form-group select {
    background: #0f172a;
    border-color: #334155;
    color: var(--text);
}

body.admin-dark-mode .form-group input:focus,
body.admin-dark-mode .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,163,242,0.15);
}

body.admin-dark-mode .admin-table th { color: #94a3b8; }
body.admin-dark-mode .admin-table td { border-bottom-color: #334155; }
body.admin-dark-mode .admin-table code { background: #334155; color: var(--primary); }

body.admin-dark-mode .gallery-admin-card {
    background: #1e293b;
    border-color: #334155;
}

body.admin-dark-mode .gallery-admin-card-img { background: #0f172a; }
body.admin-dark-mode .gallery-admin-caption-form { border-top-color: #334155; }
body.admin-dark-mode .gallery-caption-input { color: #e2e8f0; }
body.admin-dark-mode .gallery-caption-input:focus { background: #0f172a; }
body.admin-dark-mode .gallery-caption-save { border-left-color: #334155; }

body.admin-dark-mode .album-list-item {
    background: #1e293b;
    border-color: #334155;
}

body.admin-dark-mode .flash-success { background: rgba(40,167,69,0.2); color: #6ee7b7; border-color: rgba(40,167,69,0.3); }
body.admin-dark-mode .flash-error { background: rgba(231,76,60,0.2); color: #fca5a5; border-color: rgba(231,76,60,0.3); }

/* === FLASH AUTO-DISMISS === */
.flash {
    position: relative;
    overflow: hidden;
}

.flash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: flashProgress 4s linear forwards;
}

@keyframes flashProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.flash-dismiss {
    animation: flashFadeOut 0.4s ease forwards;
}

@keyframes flashFadeOut {
    to { opacity: 0; transform: translateY(-10px); margin-bottom: -60px; }
}

/* === DROPZONE === */
.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    background: #f8fafc;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(46,163,242,0.04);
    color: var(--primary);
}

.upload-dropzone svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    opacity: 0.5;
}

.upload-dropzone.dragover svg { opacity: 1; }

.upload-dropzone-text {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-dropzone-hint {
    font-size: 13px;
    opacity: 0.7;
}

.upload-dropzone-files {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

body.admin-dark-mode .upload-dropzone {
    background: #0f172a;
    border-color: #334155;
}

body.admin-dark-mode .upload-dropzone:hover,
body.admin-dark-mode .upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(46,163,242,0.08);
}

/* === FILTER INPUT === */
.gallery-filter-wrap {
    position: relative;
    max-width: 280px;
}

.gallery-filter-wrap input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s;
}

.gallery-filter-wrap input:focus {
    outline: none;
    border-color: var(--primary);
}

.gallery-filter-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

body.admin-dark-mode .gallery-filter-wrap input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

/* === SELECT ALL CHECKBOX === */
.select-all-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.select-all-wrap input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* === CTRL+S TOAST === */
.save-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 1.5s forwards;
}

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

@keyframes toastOut {
    to { opacity: 0; transform: translateY(20px); }
}

/* === IMAGE HOVER ZOOM === */
.gallery-admin-card-img img {
    transition: transform 0.3s ease;
}

.gallery-admin-card:hover .gallery-admin-card-img img {
    transform: scale(1.08);
}

/* === ADMIN LIGHTBOX === */
.admin-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}

.admin-lightbox-overlay.active { opacity: 1; }

.admin-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.admin-lightbox-overlay.active .admin-lightbox-img {
    transform: scale(1);
}

.admin-lightbox-x {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-lightbox-x:hover { background: rgba(255,255,255,0.25); }

/* === IMAGE PREVIEW BUTTON === */
.gallery-admin-preview {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.gallery-admin-card:hover .gallery-admin-preview { opacity: 1; }
.gallery-admin-preview:hover { background: rgba(0,0,0,0.7); }

/* === KEYBOARD SHORTCUTS PANEL === */
.shortcuts-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}

.shortcuts-overlay.active { opacity: 1; }

.shortcuts-panel {
    background: var(--bg-card, #fff);
    border-radius: 16px;
    padding: 30px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.shortcuts-overlay.active .shortcuts-panel { transform: translateY(0); }

.shortcuts-panel h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--dark, #1e293b);
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
}

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

.shortcut-keys {
    display: flex;
    gap: 4px;
}

.shortcut-key {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
    color: var(--text, #1e293b);
}

body.admin-dark-mode .shortcut-key {
    background: #334155;
    border-color: #475569;
}

body.admin-dark-mode .shortcuts-panel {
    background: #1e293b;
}

body.admin-dark-mode .shortcut-row {
    border-bottom-color: rgba(255,255,255,0.06);
}

/* === LOADING SPINNER ON BUTTONS === */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}

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

/* === RELATIVE TIME TOOLTIP === */
.time-relative {
    cursor: help;
    border-bottom: 1px dotted var(--text-muted);
}

/* === CHAR COUNTER === */
.char-counter {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

.char-counter.warn { color: #f59e0b; }
.char-counter.over { color: #ef4444; font-weight: 600; }

/* === DASHBOARD WIDGETS === */
/* --- Dashboard Welcome --- */
.dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    border-radius: var(--radius);
    color: #fff;
    box-shadow: 0 8px 30px rgba(46,163,242,0.25);
}
.dash-welcome-greeting { font-size: 14px; opacity: 0.85; font-weight: 500; }
.dash-welcome-name { font-size: 28px; font-weight: 800; margin: 2px 0 6px; }
.dash-welcome-sub { font-size: 14px; opacity: 0.75; }
.dash-welcome-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,0.2); border: 3px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800; color: #fff; text-decoration: none;
    transition: all 0.2s; flex-shrink: 0;
}
.dash-welcome-avatar:hover { background: rgba(255,255,255,0.3); transform: scale(1.05); color: #fff; }
.dash-welcome-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* --- Dashboard Stats --- */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.dash-stat-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none; color: var(--text);
    transition: all 0.25s;
}
.dash-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: rgba(46,163,242,0.2); color: var(--text); }
.dash-stat-card-alert { border-color: rgba(239,68,68,0.3); }
.dash-stat-card-alert:hover { box-shadow: 0 8px 30px rgba(239,68,68,0.15); }
.dash-stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dash-stat-icon svg { width: 24px; height: 24px; fill: #fff; }
.dash-stat-icon-pages { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.dash-stat-icon-images { background: linear-gradient(135deg, #f59e0b, #d97706); }
.dash-stat-icon-albums { background: linear-gradient(135deg, #10b981, #059669); }
.dash-stat-icon-messages { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.dash-stat-number { font-size: 26px; font-weight: 800; line-height: 1; }
.dash-stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-top: 2px; }
.dash-stat-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: #ef4444; color: #fff; font-size: 12px; font-weight: 700;
    min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px;
    margin-left: 6px; vertical-align: middle;
}

/* --- Dashboard Grid --- */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
.dash-col-main { display: flex; flex-direction: column; gap: 24px; }
.dash-col-main .admin-card { margin-bottom: 0; }
.dash-col-side { display: flex; flex-direction: column; gap: 24px; }
.dash-col-side .admin-card { margin-bottom: 0; }

.dash-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dash-card-header h3 { margin-bottom: 0; }
.dash-card-link { font-size: 13px; font-weight: 600; color: var(--primary); }

/* --- Dashboard Actions --- */
.dash-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.dash-action {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 18px 12px; border-radius: 12px;
    text-decoration: none; color: var(--text);
    font-size: 13px; font-weight: 600;
    transition: all 0.2s; text-align: center;
    background: var(--bg);
}
.dash-action:hover { background: rgba(46,163,242,0.06); transform: translateY(-2px); color: var(--text); }
.dash-action-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.dash-action-icon svg { width: 22px; height: 22px; fill: #fff; }
body.admin-dark-mode .dash-action { background: #0f172a; }

/* --- Dashboard Messages --- */
.dash-messages { display: flex; flex-direction: column; gap: 2px; }
.dash-msg {
    display: flex; gap: 12px; padding: 12px; border-radius: 10px;
    text-decoration: none; color: var(--text); transition: background 0.15s;
}
.dash-msg:hover { background: var(--bg); color: var(--text); }
.dash-msg-unread { background: rgba(46,163,242,0.04); }
.dash-msg-unread:hover { background: rgba(46,163,242,0.08); }
.dash-msg-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
}
.dash-msg-body { flex: 1; min-width: 0; }
.dash-msg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dash-msg-name { font-size: 13px; font-weight: 700; }
.dash-msg-unread .dash-msg-name { color: var(--primary); }
.dash-msg-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.dash-msg-text {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-msg-type {
    display: inline-block; font-size: 10px; font-weight: 600;
    background: var(--bg); padding: 1px 6px; border-radius: 4px;
    color: var(--text-muted); margin-top: 3px;
}
.dash-empty {
    text-align: center; padding: 30px 20px; color: var(--text-muted);
}
.dash-empty svg { opacity: 0.3; margin-bottom: 8px; }
.dash-empty p { font-size: 14px; }

/* --- Dashboard Badges --- */
.dash-badge {
    display: inline-block; font-size: 11px; font-weight: 700;
    padding: 2px 10px; border-radius: 20px;
}
.dash-badge-visible { background: #dcfce7; color: #16a34a; }
.dash-badge-hidden { background: #fef3c7; color: #d97706; }
body.admin-dark-mode .dash-badge-visible { background: rgba(22,163,106,0.15); }
body.admin-dark-mode .dash-badge-hidden { background: rgba(217,119,6,0.15); }

/* --- Dashboard Info List --- */
.dash-info-list { display: flex; flex-direction: column; }
.dash-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 13px;
}
.dash-info-row:last-child { border-bottom: none; }
.dash-info-row span:first-child { color: var(--text-muted); font-weight: 500; }
.dash-info-row span:last-child { font-weight: 600; }

/* --- Dark mode overrides --- */
body.admin-dark-mode .dash-welcome { background: linear-gradient(135deg, #1e40af, #1e3a5f); }
body.admin-dark-mode .dash-stat-card { background: var(--dark-card); border-color: #334155; }
body.admin-dark-mode .dash-msg:hover { background: #0f172a; }
body.admin-dark-mode .dash-msg-unread { background: rgba(46,163,242,0.08); }
body.admin-dark-mode .dash-info-row { border-color: #334155; }
body.admin-dark-mode .dash-msg-type { background: #1e293b; }

@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-actions { grid-template-columns: repeat(2, 1fr); }
    .dash-welcome { flex-direction: column; text-align: center; gap: 16px; padding: 24px 20px; }
    .dash-welcome-name { font-size: 22px; }
}

/* === MESSAGE SYSTEM === */

/* Filter tabs */
.msg-filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

.msg-filter-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.msg-filter-tab:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.msg-filter-tab.active { background: var(--primary); color: #fff; }
.msg-filter-tab.active .msg-filter-count { background: rgba(255,255,255,0.25); color: #fff; }
.msg-filter-tab.active .msg-status-dot { background: #fff !important; }

.msg-filter-count {
    background: rgba(0,0,0,0.06);
    color: var(--text-muted);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}

/* Status dot */
.msg-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Message list */
.msg-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
}

.msg-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.15s;
}

.msg-list-item:last-child { border-bottom: none; }
.msg-list-item:hover { background: rgba(0,0,0,0.02); }

.msg-list-item.msg-unread {
    background: rgba(59,130,246,0.03);
    border-left: 3px solid var(--primary);
}

.msg-list-item.msg-spam { opacity: 0.5; }

.msg-list-item .msg-select-cb {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.msg-list-status {
    margin-top: 6px;
    flex-shrink: 0;
}

.msg-list-content {
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    display: block;
}

.msg-list-content:hover { color: inherit; }

.msg-list-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.msg-list-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
}

.msg-unread .msg-list-name { color: var(--primary); }

.msg-list-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.msg-list-email {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.msg-list-preview {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.msg-list-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.msg-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msg-badge-new { background: var(--primary); color: #fff; }
.msg-badge-replied { background: rgba(16,185,129,0.12); color: #10b981; }
.msg-badge-photo { background: rgba(245,158,11,0.12); color: #f59e0b; }
.msg-badge-note { background: rgba(139,92,246,0.12); color: #8b5cf6; }

/* Bulk actions bar */
.msg-bulk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

/* Detail view */
.msg-detail-card { position: relative; }

.msg-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.msg-detail-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
}

.msg-detail-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.msg-detail-meta a { color: var(--primary); }

.msg-status-badge {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.msg-detail-body {
    padding: 20px;
    background: var(--bg);
    border-radius: 10px;
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: 15px;
    color: var(--text);
}

.msg-detail-photos {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.msg-detail-photos img {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.msg-detail-photos img:hover { transform: scale(1.05); }

/* Conversation thread */
.msg-thread {
    margin-bottom: 20px;
}

.msg-reply {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.06);
    border-left: 4px solid #10b981;
}

.msg-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.msg-reply-header strong {
    font-size: 14px;
    color: #10b981;
}

.msg-reply-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.msg-reply-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}

/* Status options */
.msg-status-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.msg-status-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: background 0.15s;
}

.msg-status-option:hover { background: rgba(0,0,0,0.04); }
.msg-status-option.active { background: rgba(46,163,242,0.08); }
.msg-status-option input[type="radio"] { display: none; }

.msg-status-option .msg-status-dot {
    width: 10px;
    height: 10px;
}

/* Contact info sidebar */
.msg-contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    word-break: break-all;
}

.msg-contact-row svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.msg-contact-row a { color: var(--primary); }

/* Dark mode overrides for messages */
body.admin-dark-mode .msg-filter-tabs { border-color: rgba(255,255,255,0.06); }
body.admin-dark-mode .msg-filter-tab:hover { background: rgba(255,255,255,0.06); }
body.admin-dark-mode .msg-filter-count { background: rgba(255,255,255,0.08); }
body.admin-dark-mode .msg-list { border-color: rgba(255,255,255,0.06); }
body.admin-dark-mode .msg-list-item { border-bottom-color: rgba(255,255,255,0.04); }
body.admin-dark-mode .msg-list-item:hover { background: rgba(255,255,255,0.02); }
body.admin-dark-mode .msg-list-item.msg-unread { background: rgba(59,130,246,0.06); }
body.admin-dark-mode .msg-reply { border-color: rgba(255,255,255,0.06); }
body.admin-dark-mode .msg-bulk-bar { border-color: rgba(255,255,255,0.06); }
body.admin-dark-mode .msg-status-option:hover { background: rgba(255,255,255,0.06); }
body.admin-dark-mode .msg-status-option.active { background: rgba(46,163,242,0.15); }

.msg-detail-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

/* Responsive message detail */
@media (max-width: 900px) {
    .msg-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .msg-list-item { padding: 12px 14px; }
    .msg-detail-name { font-size: 18px; }
    .msg-filter-tabs { gap: 2px; padding: 4px; }
    .msg-filter-tab { padding: 6px 10px; font-size: 12px; }
}

/* === PAGE LIST (admin) === */
.page-list { display: flex; flex-direction: column; gap: 8px; }
.page-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    transition: box-shadow 0.2s, opacity 0.2s, border-color 0.2s;
    cursor: grab;
}
.page-list-item:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(46,163,242,0.1); }
.page-list-item.dragging { opacity: 0.4; }
.page-list-item.page-hidden { opacity: 0.55; }
.page-list-handle {
    font-size: 18px;
    color: var(--text-muted);
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}
.page-list-info { flex: 1; min-width: 0; }
.page-list-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.page-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    line-height: 1.4;
}
.page-badge-system { background: #dbeafe; color: #1e40af; }
.page-badge-custom { background: #dcfce7; color: #166534; }
.page-badge-hidden { background: #fef3c7; color: #92400e; }
.page-list-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.page-list-meta code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    background: rgba(0,0,0,0.05);
    padding: 1px 6px;
    border-radius: 4px;
}
.page-list-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .page-list-item { flex-wrap: wrap; padding: 12px 14px; }
    .page-list-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
}

/* === COOKIE CONSENT BANNER === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: var(--darker, #0f172a);
    color: #fff;
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-banner-text { flex: 1; min-width: 260px; }
.cookie-banner-text p { margin: 0; font-size: 14px; line-height: 1.5; color: #cbd5e1; }
.cookie-banner-text strong { color: #fff; }
.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.cookie-banner-link { color: var(--primary); font-size: 13px; white-space: nowrap; }
.cookie-banner-accept {
    padding: 10px 28px !important;
    font-size: 14px !important;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cookie-banner { padding: 14px 16px; }
    .cookie-banner-inner { flex-direction: column; text-align: center; }
    .cookie-banner-actions { width: 100%; justify-content: center; }
}

/* === GDPR CONSENT CHECKBOX === */
.contact-gdpr {
    margin-top: 4px;
}
.contact-gdpr label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    cursor: pointer;
}
.contact-gdpr input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary);
}
.contact-gdpr a { color: var(--primary); text-decoration: underline; }

/* === ADMIN PROFILE === */
.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}
.profile-card {
    text-align: center;
    padding: 32px 24px;
    position: sticky;
    top: 24px;
}
.profile-avatar-wrapper { margin: 0 auto 16px; }
.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin: 0 auto;
}
.profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    margin: 0 auto;
}
.profile-name { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.profile-username { color: var(--text-muted); font-size: 14px; margin: 0 0 4px; }
.profile-email { color: var(--text-muted); font-size: 13px; margin: 0 0 8px; }
.profile-meta { color: var(--text-muted); font-size: 12px; margin: 8px 0 0; }

.profile-forms { display: flex; flex-direction: column; gap: 24px; }
.profile-forms .admin-card { padding: 28px; }

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-glow);
}
.profile-section-title svg { color: var(--primary); flex-shrink: 0; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.avatar-upload { display: flex; flex-direction: column; gap: 8px; }
.avatar-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar-preview img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-glow);
}
.avatar-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ef4444;
    cursor: pointer;
}
.avatar-remove input { width: 14px; height: 14px; accent-color: #ef4444; }

@media (max-width: 768px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-card { position: static; }
    .form-row { grid-template-columns: 1fr; }
}

/* === ANALYTICS === */
.analytics-period { display: flex; gap: 6px; flex-wrap: wrap; }
.analytics-chart-wrap { position: relative; width: 100%; overflow: hidden; }
.analytics-chart-wrap canvas { width: 100%; }

.analytics-bar {
    height: 4px; border-radius: 2px; margin-top: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width 0.3s;
}

.analytics-hourly {
    display: flex; gap: 2px; align-items: flex-end; height: 100px; padding-top: 10px;
}
.analytics-hourly-bar {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%;
    position: relative;
}
.analytics-hourly-fill {
    width: 100%; border-radius: 3px 3px 0 0; min-height: 2px;
    background: linear-gradient(to top, var(--primary), var(--primary-dark));
    transition: height 0.3s;
}
.analytics-hourly-bar span {
    font-size: 10px; color: var(--text-muted); margin-top: 4px;
}

.analytics-devices { display: flex; flex-direction: column; gap: 12px; }
.analytics-device-row { display: flex; align-items: center; gap: 10px; }
.analytics-device-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; min-width: 80px; }
.analytics-device-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.analytics-device-bar-wrap { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.analytics-device-bar { height: 100%; border-radius: 4px; transition: width 0.4s; }
.analytics-device-pct { font-size: 13px; font-weight: 700; min-width: 36px; text-align: right; }

/* Dashboard mini chart */
.dash-minichart { display: flex; align-items: flex-end; gap: 2px; height: 50px; }
.dash-minichart-bar {
    flex: 1; border-radius: 2px 2px 0 0; min-height: 2px;
    background: rgba(46,163,242,0.6); transition: height 0.3s;
}
body.admin-dark-mode .analytics-device-bar-wrap { background: #0f172a; }
