/* =====================================================
   Meetlio — Base Design System (2026 Wedding Premium)
   ===================================================== */

:root {
    /* Color tokens */
    --color-primary: #8B6F5A;
    --color-primary-light: #B89E8E;
    --color-primary-dark: #6B5242;
    --color-secondary: #D4A574;
    --color-accent: #C9956F;
    --color-surface: #FDF8F4;
    --color-surface-alt: #F5ECE3;
    --color-surface-card: #FFFFFF;
    --color-text: #2C2320;
    --color-text-muted: #8A7E78;
    --color-text-light: #B0A59E;
    --color-border: #E8DDD3;
    --color-success: #6B9E6B;
    --color-warning: #D4A04A;
    --color-danger: #C45B5B;
    --color-overlay: rgba(44, 35, 32, 0.6);
    --color-nav-bg: #2C2320;

    /* Typography */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 100px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ---- Dark mode overrides ---- */
html[data-theme="dark"] {
    --color-surface: #1A1614;
    --color-surface-alt: #231F1D;
    --color-surface-card: #2A2522;
    --color-text: #EDE6E0;
    --color-text-muted: #A8998F;
    --color-text-light: #7A6E68;
    --color-border: #3D3530;
    --color-overlay: rgba(0, 0, 0, 0.72);
    --color-nav-bg: #141210;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.50);
    --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.60);
}

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

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-surface);
    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

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

a:hover {
    color: var(--color-primary-dark);
}

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

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.7em 1.5em;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

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

.btn-sm {
    padding: 0.4em 0.9em;
    font-size: 0.82rem;
}

/* ---- Forms ---- */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75em 1em;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-card);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(139, 111, 90, 0.15);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

label {
    display: block;
    margin-bottom: var(--space-md);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

label input,
label select,
label textarea {
    margin-top: var(--space-xs);
}

/* ---- Error ---- */
.error-message {
    color: var(--color-danger);
    font-size: 0.9rem;
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(196, 91, 91, 0.08);
    border-radius: var(--radius-sm);
}

/* ---- Cards ---- */
.card {
    background: var(--color-surface-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ---- Utility ---- */
.empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-2xl);
}

code {
    background: var(--color-surface-alt);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* ---- Setup page ---- */
.setup-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: var(--space-xl);
}

.setup-container h1 {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

/* ---- Modal ---- */
.modal {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal[hidden] {
    display: none !important;
}

[hidden] {
    display: none !important;
}

.modal-content {
    background: var(--color-surface-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: min(90vw, 480px);
    box-shadow: var(--shadow-xl);
}

.modal-content h2 {
    margin-bottom: var(--space-lg);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-lg);
}

.pin-display {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    text-align: center;
}

.pin-display code {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

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

.lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-delete {
    position: absolute;
    bottom: var(--space-xl);
}
.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
}
