/*
 * Zholoboff Studio — Light Theme & Sidebar Redesign
 * ════════════════════════════════════════════════════
 */

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

:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #f0f0f2;

    /* Liquid Glass (Light) */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-bg-active: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-border-hover: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    --glass-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
    --glass-blur: blur(40px) saturate(200%);
    --glass-blur-sm: blur(20px) saturate(150%);

    /* Text */
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #a1a1a6;
    --text-inverse: #ffffff;

    /* Accents */
    --accent: #000000;
    --accent-hover: #333333;
    --accent-glow: rgba(0, 0, 0, 0.1);

    /* Status */
    --status-new: #ff9f0a;
    --status-confirmed: #007aff;
    --status-completed: #34c759;
    --status-cancelled: #ff3b30;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-pill: 100px;
    --radius-full: 50%;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2.25rem;
    --font-size-4xl: 3rem;
    --font-size-5xl: 4rem;
    --font-size-hero: clamp(3rem, 7vw, 6rem);

    /* Sidebar */
    --sidebar-width: 280px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--accent-hover);
}

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

/* ── Liquid Glass Components ────────────────────────── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    pointer-events: none;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-lg);
    transform: translateY(-2px);
}

/* ── Layout Framework ───────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    padding: var(--space-xl);
    overflow-y: auto;
}

.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
}

/* Mobile Sidebar toggle */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    z-index: 2000;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    box-shadow: var(--glass-shadow-lg);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-sidebar-toggle svg {
    width: 28px;
    height: 28px;
}

/* ── Sidebar Styling ────────────────────────────────── */
.sidebar-logo {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    text-decoration: none;
    margin-bottom: var(--space-3xl);
}

.sidebar-logo-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--accent);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.sidebar-logo-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: all var(--duration-fast);
}

.sidebar-nav a svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--glass-bg);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.sidebar-nav a:hover svg,
.sidebar-nav a.active svg {
    opacity: 1;
}

.sidebar-footer {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-inverse);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    color: var(--text-inverse);
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-sm);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
}

.btn-glass:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--accent);
}

.btn-sm {
    padding: 10px 20px;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 18px 40px;
    font-size: var(--font-size-base);
}

.btn-full {
    width: 100%;
}

/* ── Forms ──────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    transition: all var(--duration-fast);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

/* ── Alerts & Badges ────────────────────────────────── */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid;
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.2);
    color: #d70015;
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.2);
    color: #248a3d;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-new {
    background: rgba(255, 159, 10, 0.1);
    color: #d66d00;
}

.badge-new::before {
    background: #d66d00;
}

.badge-confirmed {
    background: rgba(0, 122, 255, 0.1);
    color: #0040dd;
}

.badge-confirmed::before {
    background: #0040dd;
}

.badge-completed {
    background: rgba(52, 199, 89, 0.1);
    color: #248a3d;
}

.badge-completed::before {
    background: #248a3d;
}

.badge-cancelled {
    background: rgba(255, 59, 48, 0.1);
    color: #d70015;
}

.badge-cancelled::before {
    background: #d70015;
}

/* ── Editorial / Asymmetric Hero ───────────────────── */
.hero-editorial {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-4xl) var(--space-xl);
    position: relative;
    overflow: hidden;
}

.hero-editorial::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, transparent 60%);
    filter: blur(100px);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-title {
    font-size: var(--font-size-hero);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: var(--space-2xl);
    line-height: 1.5;
    font-weight: 400;
}

/* ── Asymmetric Masonry Portfolio ───────────────────── */
.portfolio-masonry {
    column-count: 2;
    column-gap: var(--space-lg);
    padding: var(--space-xl);
}

@media (min-width: 1200px) {
    .portfolio-masonry {
        column-count: 3;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.masonry-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--glass-shadow-lg);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
}

.masonry-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 40%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: var(--space-lg);
    transition: opacity var(--duration-normal);
}

.masonry-item-overlay .title {
    color: white;
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.masonry-item:hover .masonry-item-overlay {
    opacity: 1;
}

/* ── Overlapping Services ───────────────────────────── */
.services-overlap {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: var(--space-2xl) var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: transform var(--duration-normal) var(--ease-spring);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-xl);
    align-items: center;
}

.service-card:not(:first-child) {
    margin-top: -30px;
}

.service-card:hover {
    transform: translateY(-16px);
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.service-icon-large {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.service-info h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.service-info p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.service-price-tag {
    text-align: right;
}

.service-price-tag .price {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--accent);
}

/* ── Editorial About ────────────────────────────────── */
.editorial-about {
    padding: var(--space-4xl) var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.editorial-text h2 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.03em;
}

.editorial-text p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.editorial-images {
    position: relative;
    height: 600px;
}

.ed-img {
    position: absolute;
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow-lg);
    overflow: hidden;
}

.ed-img-1 {
    width: 70%;
    height: 70%;
    top: 0;
    left: 0;
    z-index: 2;
}

.ed-img-2 {
    width: 50%;
    height: 60%;
    bottom: 0;
    right: 0;
    z-index: 1;
}

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

/* ── Auth Split Screen ──────────────────────────────── */
.auth-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.auth-split-image {
    flex: 1;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    display: none;
}

@media (min-width: 900px) {
    .auth-split-image {
        display: block;
    }
}

.auth-split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-split-form {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-4xl);
    background: var(--bg-primary);
}

/* ── Modal & Lightbox────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal);
}

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

.modal {
    background: #ffffff;
    border-radius: var(--radius-2xl);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    padding: var(--space-xl);
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: all var(--duration-spring);
}

.modal-backdrop.active .modal {
    transform: translateY(0) scale(1);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

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

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-lg);
}

/* ── Cabinet & Admin General ────────────────────────── */
.admin-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.page-header {
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Admin Table ────────────────────────────────────── */
.table-wrapper {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    overflow-x: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

.admin-table th {
    text-align: left;
    padding: 16px 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--bg-primary);
}

.admin-table td {
    padding: 20px 24px;
    font-size: 15px;
    border-bottom: 1px solid var(--glass-border);
    background: #ffffff;
}

.admin-table tr:hover td {
    background: var(--bg-secondary);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .mobile-sidebar-toggle {
        display: flex;
    }

    .editorial-about {
        grid-template-columns: 1fr;
    }

    .editorial-images {
        height: 400px;
    }

    .service-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-md);
    }

    .service-icon-large {
        margin: 0 auto;
    }

    .service-card:not(:first-child) {
        margin-top: -10px;
    }

    .service-price-tag {
        text-align: center;
    }
}