/* ============================================
   Global Design System
   Apple-inspired, photography-focused, light theme
   ============================================ */

:root {
    /* Colors - Soft, not blown out */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f5f7;
    --bg-card: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --bg-input: #f5f5f7;
    
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --text-inverse: #ffffff;
    
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-light: rgba(0, 113, 227, 0.08);
    --accent-subtle: rgba(0, 113, 227, 0.12);
    
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
    
    --success: #34c759;
    --warning: #ff9500;
    --danger: #ff3b30;
    --info: #5ac8fa;
    
    /* Typography */
    --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;
    
    /* 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: 20px;
    --radius-full: 9999px;
    
    /* Transitions - Non-linear (cubic-bezier curves) */
    --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: 200ms;
    --duration-normal: 350ms;
    --duration-slow: 500ms;
    --duration-slower: 700ms;
    
    /* Layout */
    --nav-height: 64px;
    --sidebar-width: 260px;
    --max-width: 1200px;
    --content-max: 800px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::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.6;
    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.15);
    border-radius: 3px;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    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);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.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: var(--space-sm);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-logo img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.nav-links a {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-smooth);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    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: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.nav-user-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

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

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

/* 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.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: var(--space-lg);
    opacity: 0;
    transform: translateY(-10px);
    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.02em;
    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: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ============================================
   Hero Section (for index)
   ============================================ */
.hero {
    position: relative;
    min-height: 85vh;
    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 8s var(--ease-smooth);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.8) 100%);
}

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

.hero-content h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.hero-content p {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

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

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

.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.04);
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

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

/* Grid layouts */
.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 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-smooth);
    white-space: nowrap;
    user-select: none;
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-strong);
}

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

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #e0342b;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

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

/* Auth Modal - Compact & Clean */
.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.8125rem;
    margin-bottom: 6px;
}

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

.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.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    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(--accent);
    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.875rem;
    color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-strong);
    border-radius: 4px;
    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(4px);
    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-xl);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.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.125rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    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: var(--bg-tertiary);
    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.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-pending {
    background: #fef3cd;
    color: #856404;
}

.badge-reviewing {
    background: #cce5ff;
    color: #004085;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
}

.badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

.badge-closed {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

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

/* ============================================
   Toast / Notification
   ============================================ */
.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: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    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: 24px;
    height: 24px;
    border: 2.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s 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);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    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.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    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: 80ms; }
.stagger-3 { transition-delay: 160ms; }
.stagger-4 { transition-delay: 240ms; }
.stagger-5 { transition-delay: 320ms; }

/* ============================================
   Messages / Chat
   ============================================ */
.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.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

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

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

.chat-item:hover {
    background: var(--bg-tertiary);
}

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

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

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

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

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

.chat-time {
    font-size: 0.75rem;
    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: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    line-height: 1.5;
    word-break: break-word;
}

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

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

.chat-message-time {
    font-size: 0.6875rem;
    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 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    border: 1px solid transparent;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.chat-input:focus {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    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;
}

.chat-send-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

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

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

.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.04);
}

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

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

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

.activity-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.activity-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* ============================================
   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-md);
    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.6));
    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.9375rem;
}

/* ============================================
   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 {
    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.75rem;
    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: 1rem;
    font-weight: 600;
}

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

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

.admin-nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.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.5rem;
    font-weight: 600;
}

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

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

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

th {
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

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

tr:hover td {
    background: var(--bg-tertiary);
}

/* ============================================
   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.4;
}

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

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

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

.tab {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    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);
}

/* ============================================
   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 classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.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; }
