/* ===== CSS Variables - Warm Stone ===== */
:root {
    /* Surfaces */
    --canvas:       #fafaf8;
    --canvas-soft:  #f4f3f0;
    --canvas-soft-2:#ece9e4;

    /* Text */
    --text:          #1a1a1a;
    --text-secondary:#4a4845;
    --text-muted:    #8a8680;
    --on-primary:    #ffffff;

    /* Brand */
    --primary:       #1a1a1a;

    /* Borders */
    --hairline:      #e5e3de;
    --hairline-strong:#b0ada6;

    /* Semantic */
    --link:    #0070f3;
    --success: #0070f3;
    --danger:  #ee0000;
    --warning: #f5a623;

    /* Brand gradient stops */
    --grad-1: #007cf0;
    --grad-2: #00dfd8;
    --grad-3: #7928ca;
    --grad-4: #ff0080;
    --grad-5: #ff4d4d;

    /* Radius */
    --radius-xs:   4px;
    --radius-sm:   6px;
    --radius:      8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-pill: 100px;
    --radius-full: 9999px;

    /* Shadows (Vercel stacked) */
    --shadow-sm: inset 0 0 0 1px rgba(0,0,0,0.08), 0 1px 1px rgba(0,0,0,0.02), 0 2px 2px rgba(0,0,0,0.04);
    --shadow-md: inset 0 0 0 1px rgba(0,0,0,0.08), 0 2px 2px rgba(0,0,0,0.04), 0 8px 8px -8px rgba(0,0,0,0.06);
    --shadow-lg: inset 0 0 0 1px rgba(0,0,0,0.08), 0 2px 2px rgba(0,0,0,0.04), 0 8px 16px -4px rgba(0,0,0,0.06);
    --shadow-xl: inset 0 0 0 1px rgba(0,0,0,0.08), 0 1px 1px rgba(0,0,0,0.02), 0 8px 16px -4px rgba(0,0,0,0.06), 0 24px 32px -8px rgba(0,0,0,0.08);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--canvas-soft);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--hairline);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.04);
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; display: flex; }
.logo-icon svg, .logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.logo-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.logo-text span { font-size: 10px; color: var(--text-muted); letter-spacing: 1.5px; font-weight: 500; }
.admin-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 12px; height: 28px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    color: var(--text);
    background: var(--canvas);
    border: 1px solid var(--hairline);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-btn:hover {
    border-color: var(--hairline-strong);
    box-shadow: var(--shadow-sm);
}

/* ===== Hero Section ===== */
.hero {
    position: relative; width: 100%;
    min-height: 62vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: var(--canvas-soft);
    padding: 100px 24px 72px;
}
.hero-animated-bg {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.gradient-sphere {
    position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.28;
    animation: drift 14s infinite alternate ease-in-out;
}
.sphere-1 { width: 560px; height: 560px; background: var(--grad-1); top: -160px; left: -60px; animation-duration: 16s; }
.sphere-2 { width: 440px; height: 440px; background: var(--grad-3); bottom: -100px; right: -60px; animation-duration: 19s; }
.sphere-3 { width: 360px; height: 360px; background: var(--grad-4); top: 30%; left: 58%; animation-duration: 22s; }
@keyframes drift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(36px, 28px); }
}
.hero-overlay-noise { display: none; }

/* 히어로 콘텐츠 통합 레이아웃 */
.hero-main-content {
    position: relative; z-index: 2; text-align: center;
    max-width: 680px; width: 100%;
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}
.hero-badge {
    display: inline-block; padding: 4px 12px; border-radius: var(--radius-full);
    background: var(--canvas); border: 1px solid var(--hairline);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; font-weight: 400; letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.hero-title {
    font-size: 48px; font-weight: 600; line-height: 1.18; margin-bottom: 18px;
    color: var(--text); letter-spacing: -2px;
}
.text-gradient {
    background: linear-gradient(135deg, var(--grad-1) 0%, var(--grad-3) 55%, var(--grad-4) 100%);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 17px; color: var(--text-secondary); line-height: 1.7;
    max-width: 520px; margin: 0 auto 36px; font-weight: 400;
}

/* 히어로 하단 액션 (CTA + 스탯) */
.hero-bottom {
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    margin-top: 36px;
}
.hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 28px; height: 48px; border-radius: var(--radius-pill);
    font-weight: 500; font-size: 15px;
    transition: opacity 0.2s, transform 0.2s;
}
.cta-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
}
.cta-primary:hover { opacity: 0.82; transform: translateY(-1px); }
.cta-primary svg { transition: transform 0.2s; }
.cta-primary:hover svg { transform: translate(3px, -3px); }

.hero-stats {
    display: inline-flex; align-items: center;
    border-radius: var(--radius-lg);
    padding: 14px 32px;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-sm);
}
.stat-item { text-align: center; padding: 0 20px; }
.stat-number { display: block; font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.4px; }
.stat-label {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 10px; color: var(--text-muted); letter-spacing: 1px; font-weight: 400;
    text-transform: uppercase; margin-top: 2px; display: block;
}
.stat-divider { width: 1px; height: 32px; background: var(--hairline); }

.hero-scroll-indicator { display: none; }
.scroll-line { display: none; }

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

.reveal-init {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ===== Events Section ===== */
.events-section {
    padding: 96px 0;
    background: var(--canvas-soft);
}
.events-section-preparing { background: var(--canvas-soft); }
.events-section-ended {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
}
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
    display: inline-block;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.section-tag-preparing { color: var(--warning); }
.section-tag-ended { color: var(--text-muted); }
.section-title {
    font-size: 32px; font-weight: 600; margin-bottom: 12px;
    color: var(--text); letter-spacing: -1.28px; line-height: 1.25;
}
.section-desc { color: var(--text-secondary); font-size: 16px; line-height: 1.6; }

/* ===== Event Cards ===== */
.events-carousel {
    display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
}
.event-card {
    width: 370px; border-radius: var(--radius-xl); overflow: hidden;
    background: var(--canvas);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s;
    cursor: pointer; position: relative;
    box-shadow: var(--shadow-md);
}
.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.event-card-image {
    width: 100%; height: 220px; overflow: hidden; position: relative;
}
.event-card-image::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.12), transparent);
}
.event-card-image img, .event-card-image svg {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.event-card:hover .event-card-image img,
.event-card:hover .event-card-image svg {
    transform: scale(1.04);
}
.event-card-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 4px 12px; border-radius: var(--radius-full);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; font-weight: 400; letter-spacing: 0.5px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--text);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.event-card-badge.closed {
    color: var(--text-muted);
    background: rgba(240,240,240,0.92);
}
.event-card-badge.preparing {
    color: #ab570a;
    background: rgba(255,239,207,0.92);
    border-color: rgba(245,166,35,0.2);
}
.event-card-body {
    padding: 20px 22px 22px; position: relative;
}
.event-card-title {
    font-size: 18px; font-weight: 600; margin-bottom: 8px;
    color: var(--text); letter-spacing: -0.3px; line-height: 1.3;
}
.event-card-desc {
    font-size: 14px; color: var(--text-secondary); line-height: 1.65;
    margin-bottom: 14px;
}
.event-card-arrow {
    position: absolute; bottom: 18px; right: 18px;
    width: 32px; height: 32px; border-radius: var(--radius-full);
    background: var(--canvas-soft-2);
    border: 1px solid var(--hairline);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; color: var(--text-secondary);
}
.event-card:hover .event-card-arrow {
    background: var(--primary); color: var(--on-primary);
    border-color: var(--primary);
    transform: translate(2px, -2px);
}

/* ===== Modals ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    justify-content: center; align-items: center;
    animation: fadeIn 0.15s;
}
.modal-overlay.active { display: flex; }
.modal {
    position: relative; max-height: 90vh; overflow-y: auto;
    animation: modalSlideUp 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: var(--radius-xl);
    background: var(--canvas);
    box-shadow: var(--shadow-xl);
}
.modal-glass { background: var(--canvas); }
.modal-close {
    position: absolute; top: 14px; right: 14px;
    background: var(--canvas-soft); border: 1px solid var(--hairline);
    border-radius: var(--radius-full); width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: all 0.2s; line-height: 1;
}
.modal-close:hover { background: var(--canvas-soft-2); color: var(--danger); border-color: rgba(238,0,0,0.2); }
.modal-header { padding: 28px 28px 14px; }
.modal-header h3 { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.5px; }
.modal-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.modal-icon {
    width: 40px; height: 40px; border-radius: var(--radius);
    background: var(--canvas-soft-2);
    border: 1px solid var(--hairline);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; color: var(--text);
}
.modal-icon.purple {
    background: #f0ebfa;
    border-color: rgba(121,40,202,0.15);
    color: #7928ca;
}

/* Calendar Modal */
.modal-calendar { width: 500px; padding-bottom: 20px; }
.calendar-nav {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    padding: 8px 28px 14px;
}
.cal-nav-btn, .glass-btn {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    background: var(--canvas-soft); border: 1px solid var(--hairline);
    transition: all 0.2s;
}
.cal-nav-btn:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.cal-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.cal-month { font-size: 16px; font-weight: 600; min-width: 120px; text-align: center; color: var(--text); letter-spacing: -0.3px; }
.calendar-grid { padding: 0 20px; }
.cal-header {
    display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
    margin-bottom: 4px;
}
.cal-day-name {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; font-weight: 400; padding: 8px 0;
    color: var(--text-muted); letter-spacing: 0.5px;
}
.cal-day-name.sun { color: var(--danger); }
.cal-day-name.sat { color: var(--link); }
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: 13px; font-weight: 400;
    color: var(--text-muted); position: relative;
    transition: all 0.15s ease;
}
.cal-day[data-date] { border: none; }
.cal-day.other { color: var(--hairline-strong); }
.cal-day.today { font-weight: 600; color: var(--link); background: #e8f0ff; }
.cal-day.available {
    background: var(--canvas-soft-2);
    border: 1px solid var(--hairline);
    color: var(--text); cursor: pointer; font-weight: 500;
}
.cal-day.available:hover {
    background: var(--primary); color: var(--on-primary);
    border-color: var(--primary);
    transform: scale(1.06);
}
.cal-day.available::after {
    content: ''; position: absolute; bottom: 3px; width: 3px; height: 3px;
    border-radius: 50%; background: var(--link);
}
.cal-day.available:hover::after { background: rgba(255,255,255,0.6); }

/* Calendar Skeleton */
.skeleton-day { pointer-events: none; }
.skeleton-pulse {
    width: 60%; height: 12px; border-radius: 4px;
    background: linear-gradient(90deg, var(--hairline) 25%, var(--canvas-soft-2) 50%, var(--hairline) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.calendar-legend {
    display: flex; gap: 16px; justify-content: center; padding: 16px;
    font-size: 12px; color: var(--text-muted);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-dot.available { background: var(--link); }

/* Form Error */
.form-error {
    color: var(--danger); font-size: 13px; font-weight: 500;
    margin-top: 6px; padding: 8px 12px;
    background: #fff0f0;
    border: 1px solid rgba(238,0,0,0.15);
    border-radius: var(--radius-sm);
}

/* Reservation Modal */
.modal-reservation { width: 440px; padding: 0 28px 28px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 500; margin-bottom: 6px;
    color: var(--text-secondary); letter-spacing: 0.1px;
}
.required { color: var(--danger); }
.form-input {
    width: 100%; padding: 0 12px;
    height: 40px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm); font-size: 14px;
    background: var(--canvas);
    color: var(--text);
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23,23,23,0.08);
}
.form-input::placeholder { color: var(--hairline-strong); }
textarea.form-input { resize: vertical; height: auto; padding: 10px 12px; }
select.form-input { cursor: pointer; }
.form-input-glass { background: var(--canvas); }
.form-help {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}
.btn-submit {
    width: 100%; height: 42px; border-radius: var(--radius-pill);
    background: var(--primary);
    color: var(--on-primary); font-size: 14px; font-weight: 500; margin-top: 8px;
    transition: opacity 0.2s; border: none;
}
.btn-submit:hover { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
    width: 100%; height: 42px;
    border-radius: var(--radius-pill);
    background: var(--canvas);
    color: var(--text);
    font-size: 14px; font-weight: 500;
    border: 1px solid var(--hairline);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.btn-secondary:hover { border-color: var(--hairline-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Success Modal */
.modal-success {
    width: 380px; padding: 48px 32px 40px; text-align: center;
}
.success-icon { margin-bottom: 20px; position: relative; display: inline-block; }
.success-icon svg { width: 72px; height: 72px; position: relative; z-index: 1; }
.success-ring {
    position: absolute; inset: -8px; border-radius: 50%;
    border: 2px solid rgba(0,112,243,0.2);
    animation: ringPulse 2s ease-in-out infinite;
}
@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50%       { transform: scale(1.15); opacity: 0; }
}
.check-path {
    stroke-dasharray: 60; stroke-dashoffset: 60;
    animation: drawCheck 0.5s ease-out 0.25s forwards;
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.modal-success h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--text); letter-spacing: -0.3px; }
.success-msg { color: var(--text-secondary); font-size: 14px; line-height: 1.8; margin-bottom: 28px; }
.btn-confirm {
    padding: 0 40px; height: 42px; border-radius: var(--radius-pill);
    background: var(--primary); color: var(--on-primary);
    font-size: 14px; font-weight: 500; transition: opacity 0.2s;
    border: none;
}
.btn-confirm:hover { opacity: 0.85; }

/* ===== Footer ===== */
.footer, .glass {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    text-align: center; padding: 24px 0; font-size: 12px;
    color: var(--text-muted);
}

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-body { background: var(--canvas-soft); color: var(--text); }

/* Login */
.login-screen {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--canvas-soft);
}
.login-card {
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-xl); padding: 40px 36px;
    width: 400px;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.login-logo { margin-bottom: 32px; }
.login-logo .logo-icon { margin: 0 0 16px; display: flex; }
.login-logo .logo-icon svg { width: 44px; height: 44px; }
.login-logo h2 { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.5px; }
.login-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.login-error { color: var(--danger); font-size: 13px; margin-bottom: 8px; min-height: 20px; }
.login-loading {
    display: none;
    position: absolute; inset: 0; border-radius: var(--radius-xl);
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; z-index: 10;
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
}
.login-loading.active { display: flex; }
.loading-spinner-lg { width: 28px; height: 28px; border-width: 2px; }

/* Admin Layout */
.admin-header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hairline);
    height: 60px; position: sticky; top: 0; z-index: 50;
}
.admin-header-right { display: flex; gap: 8px; }
.btn-outline {
    padding: 0 14px; height: 28px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    background: var(--canvas); border: 1px solid var(--hairline);
    color: var(--text-secondary); transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--text); }
.admin-content { display: flex; min-height: calc(100vh - 60px); }

.admin-sidebar {
    width: 220px;
    background: var(--canvas);
    border-right: 1px solid var(--hairline);
    padding: 16px 0;
}
.admin-sidebar ul { list-style: none; }
.admin-sidebar li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; font-size: 14px; font-weight: 400;
    cursor: pointer; transition: background 0.15s, color 0.15s;
    color: var(--text-secondary);
    border-left: 2px solid transparent; margin: 2px 0;
}
.admin-sidebar li:hover { background: var(--canvas-soft); color: var(--text); }
.admin-sidebar li.active {
    background: var(--canvas-soft-2);
    color: var(--text); font-weight: 500;
    border-left-color: var(--primary);
}
.admin-main { flex: 1; padding: 28px 32px; background: var(--canvas-soft); }

/* Admin Views */
.view-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.view-header h2 { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.4px; }
.btn-primary {
    padding: 0 16px; height: 34px; border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--on-primary); font-size: 13px; font-weight: 500;
    transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-back {
    background: none; font-size: 13px; color: var(--text-muted); margin-right: 12px;
    font-weight: 400; transition: color 0.2s;
}
.btn-back:hover { color: var(--text); }

/* Tables */
.data-table {
    width: 100%; border-collapse: collapse;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.data-table th {
    background: var(--canvas-soft);
    padding: 11px 16px; text-align: left;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; font-weight: 400; color: var(--text-muted);
    letter-spacing: 0.5px; text-transform: uppercase;
    border-bottom: 1px solid var(--hairline);
}
.data-table td {
    padding: 12px 16px; font-size: 14px; color: var(--text);
    border-top: 1px solid var(--hairline);
}
.data-table tr:first-child td { border-top: none; }
.data-table tr:hover td { background: var(--canvas-soft); }
.btn-sm {
    padding: 0 10px; height: 26px; border-radius: var(--radius-xs);
    font-size: 12px; font-weight: 500;
    margin-right: 4px; transition: all 0.15s; border: 1px solid var(--hairline);
    background: var(--canvas); color: var(--text-secondary);
}
.btn-sm:hover { border-color: var(--hairline-strong); color: var(--text); }
.btn-sm:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-edit   { color: #0761d1; border-color: rgba(7,97,209,0.2); background: #f0f4ff; }
.btn-edit:hover   { background: #0070f3; color: #fff; border-color: #0070f3; }
.btn-delete { color: var(--danger); border-color: rgba(238,0,0,0.2); background: #fff0f0; }
.btn-delete:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-detail { color: var(--text); border-color: var(--hairline); background: var(--canvas-soft); }
.btn-detail:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-success { color: #0070f3; border-color: rgba(0,112,243,0.2); background: #e8f0ff; }
.btn-success:hover { background: #0070f3; color: #fff; border-color: #0070f3; }

.booking-toggle { display: flex; align-items: center; gap: 8px; }
.booking-toggle .btn-sm { margin-right: 0; }

/* Status Badges */
.status-badge {
    display: inline-block; padding: 3px 10px; border-radius: var(--radius-full);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px; font-weight: 400; border: 1px solid;
    letter-spacing: 0.3px;
}
.status-open     { background: #e8f0ff; color: #0070f3; border-color: rgba(0,112,243,0.2); }
.status-closed   { background: var(--canvas-soft-2); color: var(--text-muted); border-color: var(--hairline); }
.status-preparing{ background: #fff9e6; color: #ab570a; border-color: rgba(245,166,35,0.25); }
.status-pending  { background: #fff0f0; color: var(--danger); border-color: rgba(238,0,0,0.2); }
.status-confirmed{ background: #e8f0ff; color: #0070f3; border-color: rgba(0,112,243,0.2); }

/* Tabs */
.detail-tabs { display: flex; gap: 2px; margin-bottom: 20px; }
.tab-btn {
    padding: 8px 20px; border-radius: var(--radius-full);
    font-size: 13px; font-weight: 500;
    background: transparent; color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.15s;
}
.tab-btn:hover { background: var(--canvas-soft-2); color: var(--text); }
.tab-btn.active { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.reservation-date-tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 14px;
}
.date-tab-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 34px; padding: 0 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--hairline);
    background: var(--canvas); color: var(--text-muted);
    font-size: 13px; font-weight: 500;
    transition: all 0.15s;
}
.date-tab-btn:hover { border-color: var(--hairline-strong); color: var(--text); }
.date-tab-btn.active {
    background: var(--text); color: var(--canvas);
    border-color: var(--text);
}
.date-tab-btn strong {
    min-width: 22px; height: 22px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full);
    background: var(--canvas-soft-2); color: var(--text);
    font-size: 12px; font-weight: 600;
}
.date-tab-btn.active strong { background: rgba(255,255,255,0.18); color: var(--canvas); }

/* Schedule Form */
.schedule-form {
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg); padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.schedule-form h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.schedule-form-row { display: flex; gap: 12px; align-items: flex-end; }
.schedule-form-row .form-group { flex: 1; margin-bottom: 0; }

/* Event Table Wrap */
.event-table-wrap { overflow-x: auto; }

/* Loading */
.loading-block {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; width: 100%; min-height: 120px;
    color: var(--text-muted); font-size: 14px; font-weight: 400;
}
.loading-block.table-loading { min-height: auto; padding: 24px 0; }
.loading-spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--hairline);
    border-top-color: var(--text);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive - Tablet (1024px) ===== */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }
    .events-section { padding: 72px 0; }
    .section-title { font-size: 26px; }
    .hero-title { font-size: 40px; letter-spacing: -1.6px; }
    .event-card-image { height: 200px; }
    .admin-sidebar { width: 190px; }
    .admin-main { padding: 24px; }
    .hero-stats { padding: 12px 24px; }
    .stat-item { padding: 0 14px; }
    .stat-number { font-size: 18px; }
    .data-table th, .data-table td { padding: 10px 12px; font-size: 13px; }
}

/* ===== Responsive - Small Tablet / Large Mobile (768px) ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    /* Header */
    .header { height: 56px; }
    .logo-icon { width: 30px; height: 30px; }
    .admin-btn { padding: 0 10px; height: 26px; font-size: 12px; }

    /* Hero */
    .hero { padding: 80px 20px 56px; }
    .hero-title { font-size: 34px; letter-spacing: -1.4px; }
    .hero-subtitle { font-size: 15px; }
    .hero-bottom { gap: 16px; margin-top: 28px; }
    .hero-cta { height: 44px; padding: 0 22px; font-size: 14px; }
    .hero-stats { flex-direction: column; gap: 8px; padding: 14px 24px; border-radius: var(--radius-lg); }
    .stat-divider { width: 36px; height: 1px; }

    /* Events */
    .events-section { padding: 56px 0; }
    .section-header { margin-bottom: 36px; }
    .section-title { font-size: 22px; }
    .section-desc { font-size: 14px; }
    .events-carousel { flex-direction: column; align-items: center; gap: 16px; }
    .event-card { width: 100%; max-width: 420px; }
    .event-card-image { height: 190px; }
    .event-card-title { font-size: 16px; }
    .event-card-desc { font-size: 13px; }

    /* Modals */
    .modal-calendar, .modal-reservation, .modal-success { width: 92vw; max-width: 500px; }
    .modal-reservation { padding: 0 20px 20px; }
    .modal-header { padding: 22px 20px 10px; }
    .modal-header h3 { font-size: 18px; }
    .calendar-grid { padding: 0 14px; }
    .cal-day { font-size: 13px; }
    .cal-month { font-size: 15px; }

    /* Forms */
    .form-input { font-size: 14px; }
    .btn-submit { font-size: 14px; }
    .btn-secondary { font-size: 14px; }

    /* Admin */
    .admin-sidebar { display: none; }
    .admin-content { flex-direction: column; }
    .admin-main { padding: 16px; }
    .admin-header .header-inner { padding: 0 12px; }
    .admin-header-right { gap: 4px; }
    .btn-outline { padding: 0 10px; font-size: 12px; }
    .view-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .view-header h2 { font-size: 18px; }
    .schedule-form-row { flex-direction: column; }
    .login-card { width: 90vw; max-width: 400px; padding: 32px 24px; }
    .login-logo h2 { font-size: 18px; }

    /* Table horizontal scroll */
    .event-table-wrap { margin: 0 -16px; padding: 0 16px; }
    .data-table { min-width: 560px; }
    .booking-toggle { flex-wrap: wrap; }
}

/* ===== Responsive - Mobile (480px) ===== */
@media (max-width: 480px) {
    .container { padding: 0 12px; }

    /* Header */
    .header { height: 52px; }
    .header-inner { padding: 0 12px; }
    .logo-icon { width: 28px; height: 28px; }
    .admin-btn { padding: 0 8px; font-size: 11px; gap: 4px; }
    .admin-btn svg { width: 13px; height: 13px; }

    /* Hero */
    .hero { padding: 72px 16px 48px; }
    .hero-title { font-size: 28px; letter-spacing: -1px; }
    .hero-subtitle { font-size: 14px; }
    .hero-bottom { gap: 14px; margin-top: 24px; }
    .hero-cta { height: 42px; padding: 0 18px; font-size: 14px; }
    .hero-stats { padding: 12px 18px; border-radius: var(--radius-lg); gap: 6px; }
    .stat-number { font-size: 16px; }
    .stat-label { font-size: 9px; }
    .stat-divider { width: 24px; }

    /* Events */
    .events-section { padding: 40px 0; }
    .section-header { margin-bottom: 28px; }
    .section-title { font-size: 20px; }
    .events-carousel { gap: 12px; }
    .event-card { max-width: 100%; }
    .event-card-image { height: 200px; }
    .event-card-body { padding: 16px 16px 18px; }
    .event-card-title { font-size: 16px; }
    .event-card-desc { font-size: 12px; line-height: 1.6; margin-bottom: 8px; }
    .event-card-arrow { width: 28px; height: 28px; bottom: 14px; right: 14px; }

    /* Modals bottom sheet */
    .modal-overlay { align-items: flex-end; }
    .modal {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 85vh;
        width: 100vw !important;
        max-width: 100vw !important;
        animation: modalSlideUpMobile 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    }
    .modal-close { top: 12px; right: 12px; width: 30px; height: 30px; }
    .modal-header { padding: 20px 16px 8px; }
    .modal-header h3 { font-size: 17px; }
    .modal-subtitle { font-size: 12px; }
    .modal-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); margin-bottom: 10px; }
    .modal-reservation { padding: 0 16px 16px; }

    /* Calendar */
    .calendar-nav { padding: 6px 16px 10px; gap: 10px; }
    .cal-nav-btn { width: 30px; height: 30px; }
    .cal-month { font-size: 14px; min-width: 100px; }
    .calendar-grid { padding: 0 10px; }
    .cal-day-name { font-size: 10px; padding: 6px 0; }
    .cal-day { font-size: 12px; border-radius: var(--radius-xs); }
    .cal-day.available::after { width: 3px; height: 3px; bottom: 2px; }
    .calendar-legend { padding: 12px; font-size: 11px; }

    /* Forms */
    .form-group { margin-bottom: 12px; }
    .form-group label { font-size: 11px; margin-bottom: 5px; }
    .form-input { font-size: 13px; border-radius: var(--radius-sm); }
    .btn-submit { font-size: 13px; }
    .btn-secondary { font-size: 13px; }

    /* Success */
    .modal-success { padding: 36px 20px 28px; }
    .success-icon svg { width: 60px; height: 60px; }
    .modal-success h3 { font-size: 17px; }
    .success-msg { font-size: 13px; margin-bottom: 20px; }
    .btn-confirm { padding: 0 36px; font-size: 13px; }

    /* Admin */
    .admin-header { height: 52px; }
    .admin-main { padding: 12px; }
    .view-header h2 { font-size: 17px; }
    .btn-primary { height: 32px; padding: 0 14px; font-size: 13px; }
    .detail-tabs { gap: 2px; }
    .tab-btn { padding: 7px 14px; font-size: 12px; }
    .schedule-form { padding: 16px; }
    .schedule-form h4 { font-size: 13px; margin-bottom: 10px; }
    .login-card { padding: 28px 20px; }
    .login-logo .logo-icon svg { width: 38px; height: 38px; }
    .login-logo h2 { font-size: 17px; }
    .btn-sm { height: 24px; padding: 0 8px; font-size: 11px; }
    .status-badge { font-size: 10px; padding: 2px 8px; }
    .event-table-wrap { margin: 0 -12px; padding: 0 12px; }
    .footer { padding: 20px 0; font-size: 11px; }
}

/* Mobile bottom-sheet animation */
@keyframes modalSlideUpMobile {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Touch-friendly tap targets ===== */
@media (hover: none) and (pointer: coarse) {
    .cal-day.available { min-height: 44px; }
    .btn-sm { height: 36px; padding: 0 12px; font-size: 12px; }
    .btn-outline { height: 36px; padding: 0 14px; }
    .admin-btn { height: 36px; padding: 0 14px; }
    .modal-close { width: 38px; height: 38px; }
    .cal-nav-btn { width: 40px; height: 40px; }
    .tab-btn { padding: 10px 18px; }
    .event-card { transform: none !important; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--hairline-strong); }

/* ===== Selection ===== */
::selection { background: rgba(0,112,243,0.12); color: var(--text); }
