/* ══════════════════════════════════════════════════════════════════════════════
   menulee — Clean & Modern Light Design System
   Minimalist, high-end white & soft shadow aesthetic with refined accents
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens & Color Palette ─────────────────────────────────────────────── */
:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --surface-hover: #f8fafc;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Primary Accent: Deep Slate Navy & Crisp Royal Blue */
    --primary: #0f172a;
    --primary-hover: #1e293b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.08);

    --text: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --danger-border: #fecaca;
    --success: #10b981;
    --success-soft: #ecfdf5;
    --success-border: #a7f3d0;
    --gold: #d97706;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-tile: 18px;
    --radius-full: 999px;

    /* Natural, layered soft shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-tile: 0 4px 14px rgba(15, 23, 42, 0.06);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.35rem;
    margin-bottom: 1.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* ── 3. Navigation & Header ────────────────────────────────────────────────── */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    text-decoration: none;
}

.brand-header svg, .brand-header i {
    color: var(--accent);
    width: 22px;
    height: 22px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-container {
    max-width: 1080px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    width: 100%;
    flex: 1;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 4rem auto;
    padding: 2.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

/* ── 4. Dashboard Tabs Navigation ─────────────────────────────────────────── */
.dashboard-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    overflow-x: auto;
}

.dashboard-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
    white-space: nowrap;
}

.dashboard-nav a:hover {
    color: var(--text);
    background: var(--surface-muted);
}

.dashboard-nav a.active {
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.dashboard-nav a svg {
    width: 16px;
    height: 16px;
}

/* ── 5. Buttons & Badges ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover:not(:disabled) {
    background: var(--surface-muted);
    border-color: var(--border-hover);
    transform: none;
    box-shadow: var(--shadow-sm);
}

.btn-icon-danger {
    color: var(--danger) !important;
    border-color: var(--danger-border) !important;
    background: #ffffff !important;
    padding: 0.5rem 0.65rem !important;
    width: auto !important;
}

.btn-icon-danger:hover {
    background: var(--danger-soft) !important;
    border-color: var(--danger) !important;
}

.btn-add-item {
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    margin-top: 0.5rem;
    width: auto !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.03em;
    background: var(--surface-muted);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge.pro {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(37, 99, 235, 0.2);
}

.badge-ai {
    background: var(--surface-muted);
    color: var(--text);
    border: 1px solid var(--border);
}

/* ── 6. Form Controls & Clean Cards ────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Alerts & Toasts */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
    color: #991b1b;
}

.alert-success {
    background: var(--success-soft);
    border: 1px solid var(--success-border);
    color: #065f46;
}

.template-saving-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideUpToast 0.3s var(--ease);
}

.template-saving-toast.success {
    border-color: var(--success-border);
    background: var(--success-soft);
    color: #065f46;
}

.template-saving-toast.error {
    border-color: var(--danger-border);
    background: var(--danger-soft);
    color: #991b1b;
}

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

@keyframes spin { to { transform: rotate(360deg); } }
.spinner-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ── 7. Menu Editor (Speisekarte) ─────────────────────────────────────────── */
.category-box {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.category-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
}

.category-name-input {
    font-size: 1.1rem;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}

.category-name-input:focus {
    border-color: var(--accent);
}

.item-box {
    margin-bottom: 0.65rem;
}

.item-row {
    display: grid;
    grid-template-columns: 52px 2fr 3fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.item-thumb-col {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.item-thumb-preview {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    background: #ffffff;
}

.item-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-remove-thumb {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-remove-thumb:hover {
    background: var(--danger);
}

.btn-upload-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    border: 1.5px dashed var(--border-hover);
    background: #ffffff;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.65rem;
    font-weight: 600;
}

.btn-upload-thumb:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.btn-upload-thumb svg {
    width: 15px;
    height: 15px;
}

.item-thumb-loading {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border);
}

.btn-upload-thumb.pro-locked-thumb {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

.btn-upload-thumb.pro-locked-thumb:hover {
    border-color: #d97706;
    color: #d97706;
    background: #fef3c7;
}

.item-thumb-pro-tag {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(15, 23, 42, 0.85);
    color: #fbbf24;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    pointer-events: none;
}

/* ── 8. Design Studio Header & Live Banner ─────────────────────────────────── */
.design-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.design-eyebrow {
    margin-bottom: 0.5rem;
}

.active-design-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    box-shadow: var(--shadow-sm);
}

.active-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.active-status-indicator strong {
    color: var(--text);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-live-menu {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-live-menu:hover {
    background: rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

/* ── 9. Clean Rounded Template Gallery (No Notch, Clean Frame) ────────────── */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.template-tab-bar {
    display: inline-flex;
    gap: 0.25rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.25rem;
}

.template-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
}

.template-tab.active {
    background: #ffffff;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.tab-count-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: var(--surface-muted);
    color: var(--text-muted);
    font-weight: 700;
}

.template-tab.active .tab-count-badge {
    background: #f1f5f9;
    color: var(--text);
}

.template-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.template-tile {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.25s var(--ease);
}

.template-tile:hover {
    transform: translateY(-4px);
}

/* Clean Rounded Preview Frame (No notch, just clean curved card) */
.phone-frame {
    position: relative;
    width: 160px;
    height: 284px;
    border-radius: var(--radius-tile);
    border: 1.5px solid var(--border);
    background: #ffffff;
    overflow: hidden;
    box-shadow: var(--shadow-tile);
    transition: all 0.25s ease;
}

.phone-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 375px;
    height: 667px;
    border: none;
    transform: scale(0.4266);
    transform-origin: top left;
    pointer-events: none;
    background: #ffffff;
}

.phone-hover-actions {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 8;
}

.template-tile:hover .phone-hover-actions {
    opacity: 1;
    pointer-events: auto;
}

.btn-hover-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.15s ease;
}

.btn-hover-action:hover {
    background: var(--surface-muted);
    transform: scale(1.05);
}

.btn-hover-action svg {
    width: 12px;
    height: 12px;
}

/* Selected state: refined crisp blue border ring */
.template-tile.selected .phone-frame {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), var(--shadow-lg);
}

.template-active-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 12;
    box-shadow: var(--shadow-sm);
}

.template-active-badge svg {
    width: 10px;
    height: 10px;
    stroke: #fff;
}

.template-tile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.template-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
}

.template-tile-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-tile.selected .template-tile-name {
    color: var(--accent);
    font-weight: 700;
}

.btn-delete-template {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s, background 0.15s;
}

.btn-delete-template:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.btn-delete-template svg {
    width: 13px;
    height: 13px;
}

.template-layout-chip {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.template-layout-chip.grid {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(37, 99, 235, 0.2);
}

.template-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── 10. AI Generator Card (Clean White, No Sci-Fi Glow) ───────────────────── */
.ai-showcase-card {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.ai-card-inner {
    position: relative;
    z-index: 2;
}

.ai-badge-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ai-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.ai-card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 680px;
}

.ai-prompt-suggestions {
    margin: 1.25rem 0 1.5rem 0;
    padding: 1rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.suggestions-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.suggestions-label svg {
    width: 12px;
    height: 12px;
    color: var(--gold);
}

.prompt-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prompt-chip {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-body);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s var(--ease);
}

.prompt-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.ai-actions-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.btn-ai-generate {
    width: auto;
    padding: 0.75rem 1.75rem;
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-ai-generate:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.ai-hint-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pro-lock-container {
    position: relative;
}

.pro-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    z-index: 20;
    padding: 2rem;
    text-align: center;
}

/* ── 11. Interactive Fullscreen Preview Modal ──────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-phone-dialog {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-phone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover { color: var(--text); }

.modal-phone-container {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    background: var(--surface-muted);
}

.large-phone-frame {
    position: relative;
    width: 300px;
    height: 533px;
    border-radius: 24px;
    border: 2px solid var(--border);
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.large-phone-frame iframe {
    width: 375px;
    height: 667px;
    border: none;
    transform: scale(0.8);
    transform-origin: top left;
    background: #fff;
}

.modal-phone-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

/* ── 12. Responsive Breakpoints ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    .dashboard-container {
        padding: 0 1rem;
    }
    .auth-wrapper {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
    .item-row {
        grid-template-columns: 1fr;
    }
    .template-gallery {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
    .phone-frame {
        width: 130px;
        height: 231px;
    }
    .phone-frame iframe {
        transform: scale(0.3466);
    }
    .large-phone-frame {
        width: 260px;
        height: 462px;
    }
    .large-phone-frame iframe {
        transform: scale(0.693);
    }
}