/* ============================================
   Global Design System
   Apple-inspired photography site
   Light, refined, sophisticated
   ============================================ */

:root {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8ed;
    --bg-card: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.35);
    --bg-input: #f5f5f7;

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --text-inverse: #ffffff;

    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-active: #006edb;
    --accent-light: rgba(0, 113, 227, 0.06);
    --accent-subtle: rgba(0, 113, 227, 0.1);
    --accent-glow: rgba(0, 113, 227, 0.15);

    --border: rgba(0, 0, 0, 0.06);
    --border-strong: rgba(0, 0, 0, 0.1);
    --border-focus: rgba(0, 113, 227, 0.4);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);

    --success: #34c759;
    --success-light: rgba(52, 199, 89, 0.08);
    --warning: #ff9500;
    --warning-light: rgba(255, 149, 0, 0.08);
    --danger: #ff3b30;
    --danger-light: rgba(255, 59, 48, 0.08);
    --info: #5ac8fa;

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Noto Sans SC", sans-serif;
    --font-mono: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;

    --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-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

    --duration-fast: 180ms;
    --duration-normal: 320ms;
    --duration-slow: 500ms;
    --duration-slower: 700ms;

    --nav-height: 64px;
    --sidebar-width: 260px;
    --max-width: 1200px;
    --content-max: 800px;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

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

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--accent);
    color: white;
}

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

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

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

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

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(200%) blur(24px);
    -webkit-backdrop-filter: saturate(200%) blur(24px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    transition: background var(--duration-normal) var(--ease-smooth),
                box-shadow var(--duration-normal) var(--ease-smooth),
                border-color var(--duration-normal) var(--ease-smooth);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-logo img {
    height: 30px;
    width: 30px;
    object-fit: contain;
    border-radius: 7px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.nav-links a {
    padding: 6px 14px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-smooth);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav-links a.active {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-user-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.nav-user-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav-user-btn.primary {
    background: var(--accent);
    color: white;
}

.nav-user-btn.primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

/* Unread badge */
.nav-badge {
    position: relative;
}

.nav-badge::after {
    content: attr(data-count);
    position: absolute;
    top: 0;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(50%, -50%);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.nav-badge[data-count]:not([data-count="0"])::after {
    opacity: 1;
}

/* Mobile menu */
.nav-mobile-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.nav-mobile-toggle svg {
    width: 20px;
    height: 20px;
}

.nav-mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 999;
    padding: var(--space-lg);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--duration-normal) var(--ease-out-expo),
                transform var(--duration-normal) var(--ease-out-expo);
}

.nav-mobile-menu.open {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.nav-mobile-menu a {
    display: block;
    padding: var(--space-md) 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

/* ============================================
   Page Layout
   ============================================ */
.page {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
}

.page-header {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.page-header p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 10s var(--ease-smooth);
    will-change: transform;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(245, 245, 247, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.hero-content h1 {
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.02;
    color: #fff;
    margin-bottom: var(--space-lg);
}

.hero-content p {
    font-size: clamp(1.0625rem, 2.5vw, 1.375rem);
    color: rgba(255,255,255,0.85);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.6);
}

.hero-content .btn.btn-primary {
    background: #fff;
    color: #1d1d1f;
    border-color: #fff;
}

.hero-content .btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

.hero-content .btn.btn-primary:hover {
    background: rgba(255,255,255,0.9);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--ease-out-expo),
                box-shadow var(--duration-normal) var(--ease-out-expo);
}

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

.card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

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

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 22px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-smooth);
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    background: var(--accent-active);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--border-strong);
}

.btn-ghost {
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 1px 3px rgba(255, 59, 48, 0.2);
}

.btn-danger:hover {
    background: #e0342b;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 0.9375rem;
}

.btn-block {
    width: 100%;
}

.auth-submit-btn {
    display: block;
    width: 140px;
    margin: 12px auto 0;
    padding: 11px 0;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
}

/* Auth Modal */
.auth-modal {
    max-width: 380px !important;
}

.auth-modal .modal-header {
    padding: 20px 28px 0;
    border-bottom: none;
}

.auth-modal .modal-header h2 {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.auth-modal .modal-body {
    padding: 8px 28px 28px;
}

.auth-modal .form-group {
    margin-bottom: 14px;
}

.auth-modal .form-label {
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.auth-modal .form-input {
    padding: 11px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    font-size: 0.875rem;
}

.auth-modal .form-input:focus {
    background: var(--bg-secondary);
}

.auth-modal .auth-submit-btn {
    margin-top: 16px;
    padding: 12px 0;
}

.auth-modal .modal-footer {
    padding: 0 28px 24px;
    border-top: none;
    justify-content: center;
}

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

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    background: var(--bg-secondary);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236e6e73' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-strong);
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    appearance: none;
}

.form-checkbox input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-out-expo),
                visibility var(--duration-normal);
}

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

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.96) translateY(12px);
    transition: transform var(--duration-normal) var(--ease-out-expo);
    border: 1px solid var(--border);
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-tertiary);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border);
}

/* ============================================
   Badge / Tag
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.badge-pending {
    background: var(--warning-light);
    color: #9a6700;
}

.badge-reviewing {
    background: var(--accent-light);
    color: var(--accent);
}

.badge-approved {
    background: var(--success-light);
    color: #1a7f37;
}

.badge-rejected {
    background: var(--danger-light);
    color: #cf222e;
}

.badge-closed {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-tertiary);
}

.badge-active {
    background: var(--accent-light);
    color: var(--accent);
}

/* ============================================
   Toast
   ============================================ */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + var(--space-md));
    right: var(--space-xl);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transform: translateX(120%);
    transition: transform var(--duration-normal) var(--ease-out-expo);
    max-width: 360px;
    border: 1px solid var(--border);
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--info); }

/* ============================================
   Loading
   ============================================ */
.loading-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0ms; }
.stagger-2 { transition-delay: 60ms; }
.stagger-3 { transition-delay: 120ms; }
.stagger-4 { transition-delay: 180ms; }
.stagger-5 { transition-delay: 240ms; }

/* ============================================
   Chat / Messages
   ============================================ */
.chat-container {
    display: flex;
    height: calc(100vh - var(--nav-height));
    overflow: hidden;
}

.chat-sidebar {
    width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.chat-sidebar-header h2 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-lg);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-smooth);
}

.chat-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.chat-item.active {
    background: var(--accent-light);
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

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

.chat-name {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.chat-preview {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.chat-message {
    max-width: 70%;
    animation: fadeInUp var(--duration-normal) var(--ease-out-expo);
}

.chat-message.sent {
    align-self: flex-end;
}

.chat-message.received {
    align-self: flex-start;
}

.chat-bubble {
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-message.sent .chat-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 6px;
}

.chat-message.received .chat-bubble {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 6px;
}

.chat-message-time {
    font-size: 0.625rem;
    color: var(--text-tertiary);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-message.sent .chat-message-time {
    text-align: right;
}

.chat-input-area {
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--space-sm);
}

.chat-input {
    flex: 1;
    padding: 10px 18px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    border: 1px solid transparent;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.chat-input:focus {
    background: var(--bg-secondary);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-smooth);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.chat-send-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

/* ============================================
   Activities
   ============================================ */
.activity-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.activity-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.activity-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.activity-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

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

.activity-status {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
}

.activity-body {
    padding: var(--space-lg);
}

.activity-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.activity-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.activity-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   Works Gallery
   ============================================ */
.works-grid {
    columns: 3;
    column-gap: var(--space-md);
}

.work-item {
    break-inside: avoid;
    margin-bottom: var(--space-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.work-item:hover {
    transform: scale(1.02);
}

.work-item img {
    width: 100%;
    display: block;
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

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

.work-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.55));
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-smooth);
    display: flex;
    align-items: flex-end;
    padding: var(--space-lg);
}

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

.work-item-title {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width var(--duration-slow) var(--ease-out-expo);
}

.progress-steps-container {
    margin: var(--space-md) 0;
    width: 100%;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: var(--space-lg) 0;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    transform: translateY(-50%);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    z-index: 1;
}

.progress-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.progress-step.active .progress-step-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.progress-step.done .progress-step-dot {
    background: var(--success);
    border-color: var(--success);
}

.progress-step-label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.progress-step.active .progress-step-label {
    color: var(--accent);
    font-weight: 500;
}

.progress-step.done .progress-step-label {
    color: var(--success);
}

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

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.admin-sidebar-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
}

.admin-sidebar-header h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.admin-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-smooth);
    margin-bottom: 2px;
}

.admin-nav-item:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.admin-nav-item.active {
    color: var(--accent);
    background: var(--accent-light);
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.admin-header h1 {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ============================================
   Table
   ============================================ */
.table-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

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

th, td {
    padding: 12px var(--space-lg);
    text-align: left;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(0, 0, 0, 0.015);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.8125rem;
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
}

.tab {
    padding: 10px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--duration-fast) var(--ease-smooth);
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ============================================
   Detail page
   ============================================ */
.detail-body {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.detail-body p {
    margin-bottom: var(--space-md);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   Registration section
   ============================================ */
.reg-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
}

.reg-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .works-grid {
        columns: 2;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    .nav-links {
        display: none;
    }

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

    .page-content {
        padding: var(--space-lg) var(--space-md);
    }

    .page-header {
        padding: var(--space-2xl) var(--space-md) var(--space-xl);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .works-grid {
        columns: 1;
    }

    .chat-container {
        flex-direction: column;
    }

    .chat-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .chat-message {
        max-width: 85%;
    }

    .admin-sidebar {
        transform: translateX(-100%);
    }

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

    .admin-main {
        margin-left: 0;
    }

    .modal {
        max-width: 100%;
        margin: var(--space-md);
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .hero-content h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

@media (max-width: 480px) {
    .chat-sidebar {
        max-height: 160px;
    }

    .chat-input-area {
        padding: var(--space-sm) var(--space-md);
    }

    .chat-messages {
        padding: var(--space-md);
    }
}

/* ============================================
   Utility
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.75rem; }
.text-xs { font-size: 0.6875rem; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-tertiary); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.hidden { display: none !important; }
