/* ================================================
   Tvorba Stranek - Builder UI
   ================================================ */

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

:root {
    --brand: #2563eb;
    --brand-rgb: 37, 99, 235;
    --brand-dark: #1d4ed8;
    --brand-light: #dbeafe;
    --brand-50: #eff6ff;
    --success: #16a34a;
    --warning: #f59e0b;
    --error: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --transition: 0.2s ease;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Spinner --- */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}
.spinner--dark {
    border-color: rgba(0,0,0,0.15);
    border-top-color: var(--brand);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================
   LANDING PAGE
   ================================================ */
/* Landing header */
.landing-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    height: 64px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.landing-header__logo {
    font-weight: 800;
    font-size: 1.0625rem;
    color: var(--gray-900);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.landing-header__logo::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    border-radius: 8px;
}
.landing-header__login {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.landing-header__login::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
.landing-header__login:hover {
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: var(--shadow);
    text-decoration: none;
}
@media (max-width: 767px) {
    .landing-header { padding: 0 1rem; height: 56px; }
    .landing-header__logo::before { width: 24px; height: 24px; border-radius: 6px; }
}

.landing-body {
    background: linear-gradient(135deg, #eff6ff 0%, #f9fafb 50%, #f0fdf4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.landing__container {
    max-width: 640px;
    width: 100%;
}

.landing__hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.landing__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.landing__title-accent {
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Form */
.landing__form {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.landing__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.landing__textarea-wrap {
    position: relative;
    margin-bottom: 1.5rem;
}

.landing__textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
    resize: vertical;
    min-height: 120px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.landing__textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
    background: #fff;
}
.landing__textarea::placeholder { color: var(--gray-400); }

.landing__charcount {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Type buttons */
.landing__type-select {
    margin-bottom: 1.5rem;
}

.landing__type-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.landing__type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition);
    position: relative;
}
.landing__type-btn:hover:not(:disabled) {
    border-color: var(--brand);
    color: var(--brand);
}
.landing__type-btn--active {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
}
.landing__type-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.landing__type-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--warning);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Submit */
.landing__urls { margin-bottom: 1.25rem; }
.landing__label--optional { font-size: 0.75rem; color: var(--gray-400); margin-bottom: 0.5rem; }
.landing__urls-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.landing__url-field { display: flex; flex-direction: column; }
.landing__url-label { font-size: 0.6875rem; font-weight: 600; color: var(--gray-500); margin-bottom: 0.25rem; }
.landing__url-input {
    padding: 0.5rem 0.75rem; border: 1.5px solid var(--gray-200); border-radius: 8px;
    font-size: 0.8125rem; font-family: inherit; color: var(--gray-700); background: var(--gray-50);
    transition: border-color 0.2s;
}
.landing__url-input:focus { border-color: var(--brand); outline: none; background: #fff; }
.landing__url-input::placeholder { color: var(--gray-300); }
@media (max-width: 767px) { .landing__urls-row { grid-template-columns: 1fr; } }

.landing__submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.landing__submit:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-1px); }
.landing__submit:active:not(:disabled) { transform: translateY(0); }
.landing__submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* Widget */
.landing__widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

.landing__widget-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--gray-800);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: background var(--transition);
}
.landing__widget-toggle:hover { background: var(--gray-700); }

.landing__widget-panel {
    display: none;
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 1rem;
}
.landing__widget-panel--open { display: block; }

.landing__widget-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.landing__widget-card {
    display: block;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.5rem;
    transition: border-color var(--transition), background var(--transition);
}
.landing__widget-card:last-child { margin-bottom: 0; }
.landing__widget-card:hover { border-color: var(--brand); background: var(--brand-50); }

.landing__widget-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.landing__widget-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.landing__widget-phase {
    background: var(--gray-100);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.6875rem;
    text-transform: uppercase;
}

/* ================================================
   BUILDER PAGE
   ================================================ */
.builder-body {
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Split layout — jen na builder stránce (sidebar 30% + preview 70%) */
.builder-body--split {
    height: 100vh;
    overflow: hidden;
}

/* Header with progress bar */
.builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 56px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.builder-header__logo {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}

.builder-header__progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.builder-header__bar {
    width: 200px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.builder-header__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), #7c3aed);
    border-radius: 3px;
    width: 0%;
    transition: width 1s ease;
}

.builder-header__percent {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand);
    min-width: 40px;
}

.builder-header__estimate {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-align: center;
    margin-top: 0.25rem;
    min-height: 1rem;
    transition: opacity 0.3s;
}

/* Main */
.builder-main {
    flex: 1;
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    min-height: 0;
}

.builder-body--split .builder-main {
    overflow: hidden;
    align-items: stretch;
}

/* Levý sidebar — log 30% */
.builder-sidebar {
    width: 30%;
    min-width: 280px;
    max-width: 400px;
    flex-shrink: 0;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Starý selektor pro kompatibilitu */
.builder-content {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

/* Status card */
.builder-status {
    text-align: center;
    padding: 2.5rem 1.5rem 1.5rem;
}

.builder-status__icon {
    margin-bottom: 1rem;
}

.builder-status__spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.builder-status__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.375rem;
}

.builder-status__text {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

/* Log */
.builder-log {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Log item */
.log-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    animation: fadeIn 0.3s ease;
    border-radius: 6px;
}
.log-item:hover { background: var(--gray-100); }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.log-item__icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.log-item__icon--working { color: var(--brand); }
.log-item__icon--working .spinner--dark { width: 14px; height: 14px; border-width: 2px; }
.log-item__icon--done { color: var(--success); }
.log-item__icon--waiting { color: var(--warning); }
.log-item__icon--error { color: var(--error); }

.log-item__text {
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Stats input field */
.field__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
.field__stats-card {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem 0.75rem;
    text-align: center;
    transition: border-color 0.2s;
}
.field__stats-card:focus-within {
    border-color: var(--brand);
}
.field__stats-num {
    width: 100%;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
    text-align: center;
    outline: none;
    padding: 0;
    margin-bottom: 0.25rem;
}
.field__stats-num::placeholder {
    color: var(--brand);
    opacity: 0.3;
}
.field__stats-label {
    width: 100%;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    outline: none;
    padding: 0;
}
.field__stats-label::placeholder {
    color: var(--gray-400);
}
@media (max-width: 767px) {
    .field__stats { grid-template-columns: repeat(2, 1fr); }
}

/* Opening hours - grid */
/* ================================================
   FILE UPLOAD DROPZONE
   ================================================ */
.field__dropzone-area {
    border: 2px dashed var(--gray-200); border-radius: 14px;
    padding: 2rem; text-align: center; cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.field__dropzone-area:hover, .field__dropzone-area--drag {
    border-color: var(--brand); background: var(--brand-50);
}
.field__dropzone-area svg { color: var(--gray-300); margin: 0 auto 0.75rem; }
.field__dropzone-text { font-size: 0.9375rem; color: var(--gray-600); margin: 0; }
.field__dropzone-text span { color: var(--brand); font-weight: 600; text-decoration: underline; }
.field__dropzone-hint { font-size: 0.75rem; color: var(--gray-400); margin: 0.5rem 0 0; }
.field__dropzone-preview {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem; margin-top: 0.75rem;
}
.field__dropzone-card { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--gray-100); }
.field__dropzone-card img { width: 100%; height: 100%; object-fit: cover; }
.field__dropzone-card--loading { display: flex; align-items: center; justify-content: center; }
.field__dropzone-card-spinner { width: 20px; height: 20px; border: 2px solid var(--gray-200); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.6s linear infinite; }
.field__dropzone-remove {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
    background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%;
    font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.field__dropzone-card:hover .field__dropzone-remove { opacity: 1; }

/* Slot-based photo upload */
.field__photo-slots { display: flex; flex-direction: column; gap: 1rem; }
.field__photo-slot { border: 1px solid var(--gray-200); border-radius: 12px; padding: 1rem; }
.field__photo-slot-header { margin-bottom: 0.625rem; }
.field__photo-slot-header strong { font-size: 0.875rem; color: var(--gray-800); display: block; }
.field__photo-slot-hint { font-size: 0.75rem; color: var(--gray-400); }
.field__photo-slot-drop {
    border: 2px dashed var(--gray-200); border-radius: 10px; padding: 1.25rem;
    text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
}
.field__photo-slot-drop:hover { border-color: var(--brand); background: var(--brand-50); }
.field__photo-slot-drop svg { color: var(--gray-300); }
.field__photo-slot-drop span { font-size: 0.8125rem; color: var(--gray-500); font-weight: 500; }
.field__photo-slot-preview {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem;
}
.field__photo-slot-preview:empty { display: none; }
.field__photo-slot-preview .field__dropzone-card { width: 70px; height: 70px; }

/* ================================================
   SECTION PREVIEW MODAL
   ================================================ */
.field__section-preview { display: flex; flex-direction: column; gap: 1rem; }
.field__section-list { display: flex; flex-direction: column; gap: 0.375rem; }
.field__section-item {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.625rem 0.875rem; background: #fff; border: 1.5px solid var(--gray-200);
    border-radius: 10px; cursor: grab; transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}
.field__section-item:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.field__section-item--dragging { opacity: 0.4; border-color: var(--brand); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.field__section-item--new { border-color: #22c55e; background: #f0fdf4; }

.field__section-item-num { font-size: 0.6875rem; font-weight: 800; width: 20px; text-align: center; flex-shrink: 0; }
.field__section-item-drag { font-size: 0.875rem; color: var(--gray-300); cursor: grab; flex-shrink: 0; }
.field__section-item-info { flex: 1; min-width: 0; }
.field__section-item-top { display: flex; align-items: center; gap: 0.5rem; }
.field__section-item-info strong { font-size: 0.8125rem; color: var(--gray-800); }
.field__section-item-desc { font-size: 0.6875rem; color: var(--gray-400); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.125rem; }

.field__section-item-swap {
    font-size: 0.6875rem; padding: 0.125rem 0.375rem; border: 1px solid var(--gray-200);
    border-radius: 4px; color: var(--gray-500); background: var(--gray-50);
    cursor: pointer; font-family: inherit;
}
.field__section-item-swap:hover { border-color: var(--brand); }

.field__section-item-score {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 0.6875rem; font-weight: 800; flex-shrink: 0;
}
.field__section-item-remove {
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--gray-200); border-radius: 6px; color: var(--gray-300);
    cursor: pointer; font-size: 1rem; transition: all 0.15s; flex-shrink: 0;
}
.field__section-item-remove:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.field__section-add { margin-top: 0.5rem; }
.field__section-add-select {
    width: 100%; padding: 0.625rem 0.875rem; border: 1.5px dashed var(--gray-200);
    border-radius: 10px; font-family: inherit; font-size: 0.875rem; color: var(--gray-500);
    background: #fff; cursor: pointer; transition: border-color 0.2s;
}
.field__section-add-select:hover { border-color: var(--brand); }
.field__section-restart {
    background: none; border: 1px solid var(--gray-200); border-radius: 8px;
    padding: 0.5rem 1rem; font-size: 0.8125rem; color: var(--gray-500); cursor: pointer;
    font-family: inherit; transition: all 0.15s; align-self: center; margin-top: 0.5rem;
}
.field__section-restart:hover { border-color: #ef4444; color: #ef4444; }

/* ================================================
   OPENING HOURS — vylepšený design
   ================================================ */
.field__hours { display: flex; flex-direction: column; gap: 0.75rem; }

/* Předvolby — rychlé nastavení */
.field__hours-presets {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem;
}
.field__hours-preset {
    padding: 0.375rem 0.75rem; border: 1.5px solid var(--gray-200); border-radius: 20px;
    background: #fff; font-size: 0.75rem; font-weight: 600; color: var(--gray-500);
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.field__hours-preset:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }

/* Náhled — kompaktní přehled */
.field__hours-preview {
    background: var(--brand-50); border: 1px solid var(--brand-light); border-radius: 10px;
    padding: 0.875rem 1.125rem; font-size: 0.8125rem; color: var(--brand-dark, var(--brand)); line-height: 1.7;
    white-space: pre-line; min-height: 2rem; font-weight: 500;
    font-family: 'SF Mono', 'Fira Code', monospace, system-ui;
}

/* Den blok */
.field__hours-dayblock {
    border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden;
    transition: border-color 0.2s;
}
.field__hours-dayblock:hover { border-color: var(--gray-300); }
.field__hours-dayheader {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0.875rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-100);
}
.field__hours-dayheader span { font-size: 0.8125rem; font-weight: 700; color: var(--gray-800); }
.field__hours-copy {
    background: none; border: 1px solid var(--gray-200); font-size: 0.6875rem;
    color: var(--brand); cursor: pointer; font-weight: 600; padding: 0.2rem 0.5rem;
    border-radius: 6px; font-family: inherit; transition: all 0.15s;
}
.field__hours-copy:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Closed toggle */
.field__hours-closed {
    font-size: 0.6875rem; color: var(--gray-400); cursor: pointer; font-weight: 500;
    padding: 0.2rem 0.5rem; border: 1px solid var(--gray-200); border-radius: 6px;
    background: #fff; font-family: inherit; transition: all 0.15s;
}
.field__hours-closed:hover { border-color: #ef4444; color: #ef4444; }
.field__hours-closed--active { background: #fef2f2; border-color: #ef4444; color: #ef4444; }

/* Time grid */
.field__hours-grid {
    display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--gray-200) transparent;
}
.field__hours-cell {
    min-width: 28px; height: 34px; display: flex; align-items: center; justify-content: center;
    border-right: 1px solid var(--gray-50); cursor: pointer; user-select: none;
    background: #fff; transition: background 0.08s; position: relative; flex-shrink: 0;
}
/* Celé hodiny mají silnější border */
.field__hours-cell[data-slot]:nth-child(odd) { border-right-color: var(--gray-100); }
.field__hours-cell:last-child { border-right: none; }
.field__hours-cell--on { background: var(--brand); }
.field__hours-cell:hover:not(.field__hours-cell--on) { background: var(--brand-50); }
.field__hours-cell-label {
    font-size: 0.5625rem; color: var(--gray-300); pointer-events: none;
    position: absolute; top: 2px; left: 2px; font-weight: 500;
}
.field__hours-cell--on .field__hours-cell-label { color: rgba(255,255,255,0.7); }

@media (max-width: 767px) {
    .field__hours-cell { min-width: 22px; height: 28px; }
    .field__hours-cell-label { font-size: 0.5rem; }
    .field__hours-presets { gap: 0.375rem; }
}

/* Error banner */
.builder-error {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.builder-error--blink {
    animation: errorBlink 1s ease 3;
}

@keyframes errorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Tips */
.builder-tips {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 1rem;
}

.builder-tip {
    font-size: 0.8125rem;
    color: var(--gray-400);
    font-style: italic;
    transition: opacity 0.3s ease;
    min-height: 1.5em;
}

/* ================================================
   MODAL
   ================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay--open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    position: relative;
    animation: modalSlideUp 0.25s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition);
}
.modal__close:hover { background: var(--gray-100); color: var(--gray-600); }

.modal__header {
    padding: 1.75rem 1.75rem 0;
}

.modal__step {
    display: inline-flex; align-items: center; gap: 0.375rem;
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--brand); margin-bottom: 0.5rem;
    background: var(--brand-50); padding: 0.25rem 0.625rem; border-radius: 20px;
}

.modal__title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gray-900);
    padding-right: 2rem;
    line-height: 1.3;
}

.modal__description {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.modal__body {
    padding: 1.25rem 1.75rem 1.75rem;
}

.modal__info {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--brand-50);
    border-radius: var(--radius-xs);
    display: none;
}
.modal__info:not(:empty) { display: block; }

.modal__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.modal__submit {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.modal__submit:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.modal__submit:active { transform: translateY(0); }
.modal__submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* Modal form fields */
.field {
    margin-bottom: 1rem;
}
.field:last-child { margin-bottom: 0; }

.field__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.field__input,
.field__textarea,
.field__select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: var(--gray-50);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field__input:focus,
.field__textarea:focus,
.field__select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
    background: #fff;
}
.field__textarea { resize: vertical; min-height: 80px; }
.field__input::placeholder,
.field__textarea::placeholder { color: var(--gray-400); }

.field__hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

/* Yes/No buttons */
.field__yesno {
    display: flex;
    gap: 0.5rem;
}
.field__yesno-btn {
    flex: 1;
    padding: 0.625rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-xs);
    background: #fff;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition);
}
.field__yesno-btn:hover { border-color: var(--brand); }
.field__yesno-btn--active {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand);
}

/* Select cards (for multi-select options) */
.field__options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.field__option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition);
}
.field__option:hover { border-color: var(--brand); }
.field__option--selected {
    border-color: var(--brand);
    background: var(--brand-50);
}
.field__option-radio {
    width: 18px; height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}
.field__option--selected .field__option-radio {
    border-color: var(--brand);
}
.field__option--selected .field__option-radio::after {
    content: '';
    width: 10px; height: 10px;
    background: var(--brand);
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 2px;
}
.field__option-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* File upload */
.field__dropzone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 2rem;
    text-align: center;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition);
}
.field__dropzone:hover,
.field__dropzone--dragover {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand);
}
.field__dropzone-text {
    font-size: 0.875rem;
    font-weight: 500;
}
.field__dropzone-hint {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.field__dropzone input[type="file"] {
    display: none;
}

.field__file-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.field__file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-xs);
    font-size: 0.8125rem;
}
.field__file-remove {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1rem;
}
.field__file-remove:hover { color: var(--error); }

/* Color picker */
.field__color-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.field__color-input {
    width: 48px; height: 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xs);
    cursor: pointer;
    padding: 0;
}
.field__color-hex {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ================================================
   LIVE PREVIEW — vpravo 70%, vždy viditelný
   ================================================ */
.builder-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    min-height: 0;
}

.builder-preview__mockup {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.05);
    min-height: 0;
}

.builder-preview__browser {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #252540;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.builder-preview__browser-dots { display: flex; gap: 4px; }
.builder-preview__browser-dots span { width: 8px; height: 8px; border-radius: 50%; }
.builder-preview__browser-dots span:nth-child(1) { background: #ff5f57; }
.builder-preview__browser-dots span:nth-child(2) { background: #ffbd2e; }
.builder-preview__browser-dots span:nth-child(3) { background: #28c840; }
.builder-preview__browser-url {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    color: rgba(255,255,255,0.35);
    font-family: 'SF Mono', monospace, system-ui;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.builder-preview__mockup {
    position: relative;
}

/* Placeholder — zobrazuje se dokud není živý náhled */
.builder-preview__placeholder {
    flex: 1;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
}

.builder-preview__placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 2rem;
}

.builder-preview__placeholder-inner svg {
    opacity: 0.3;
    color: #6b7280;
}

.builder-preview__placeholder-inner p {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.builder-preview__placeholder-inner span {
    font-size: 0.8rem;
    color: #9ca3af;
    max-width: 260px;
    line-height: 1.5;
}

/* Iframe schovaný dokud není živý náhled */
.builder-preview__iframe {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: none;
    background: var(--gray-100);
    display: none;
}

/* Při live_preview: skryj placeholder, zobraz iframe */
.builder-preview__mockup.has-preview .builder-preview__placeholder {
    display: none;
}

.builder-preview__mockup.has-preview .builder-preview__iframe {
    display: block;
}

.builder-preview__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.25rem;
}
.builder-preview__status-text {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 500;
}
.builder-preview__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-50);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}
.builder-preview__badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand);
    animation: pulse-dot 1.5s infinite;
}

@media (max-width: 1023px) {
    .builder-body--split { height: auto; overflow: visible; }
    .builder-body--split .builder-main { flex-direction: column; overflow: visible; }
    .builder-sidebar { width: 100%; max-width: 100%; min-width: 0; }
    .builder-preview__mockup { flex: none; }
    .builder-preview__iframe { height: 50vh; min-height: 300px; flex: none; }
    .builder-preview__placeholder { height: 50vh; min-height: 300px; flex: none; }
}
@media (max-width: 767px) {
    .builder-main { padding: 0.75rem; gap: 0.75rem; }
    .builder-sidebar { padding-right: 0; }
    .builder-preview__iframe { height: 40vh; min-height: 250px; }
    .builder-preview__placeholder { height: 40vh; min-height: 250px; }
    .builder-preview__mockup { border-radius: 8px; }
}

/* ================================================
   COMPLETE OVERLAY
   ================================================ */
.builder-complete {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.builder-complete__content {
    background: #fff;
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.3s ease;
}

.builder-complete__icon {
    color: var(--success);
    margin-bottom: 1rem;
}

.builder-complete__title {
    font-size: 1.5rem;
    font-weight: 800;
}

.builder-complete__text {
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.builder-complete__link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-xs);
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--brand);
    text-decoration: none;
    word-break: break-all;
}

.builder-complete__cta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}
.builder-complete__cta p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.builder-complete__buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.builder-complete__login {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background var(--transition);
}
.builder-complete__login:hover { background: var(--brand-dark); text-decoration: none; }

.builder-complete__register {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #fff;
    color: var(--brand);
    text-decoration: none;
    border: 2px solid var(--brand);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all var(--transition);
}
.builder-complete__register:hover { background: var(--brand-50); text-decoration: none; }

/* Dashboard */
.dashboard-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.dashboard-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.dashboard-card__name { font-size: 1rem; font-weight: 600; color: var(--gray-900); }
.dashboard-card__meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; }
.dashboard-card__domain { font-size: 0.75rem; color: var(--gray-500); font-family: monospace; }
.dashboard-card__status { font-size: 0.6875rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.dashboard-card__status--ok { background: #dcfce7; color: #16a34a; }
.dashboard-card__status--progress { background: var(--brand-50); color: var(--brand); }
.dashboard-card__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.dashboard-card__btn { padding: 0.5rem 1rem; font-size: 0.8125rem; font-weight: 500; border: 1px solid var(--gray-200); border-radius: var(--radius-xs); color: var(--gray-600); text-decoration: none; transition: all var(--transition); }
.dashboard-card__btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.dashboard-card__btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.dashboard-card__btn--primary:hover { background: var(--brand-dark); color: #fff; }
.dashboard-card__expiry { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.75rem; }
.dashboard-card__expiry-info { color: var(--gray-400); }
.dashboard-card__expiry-warn { color: var(--error); font-weight: 600; animation: errorBlink 2s ease infinite; }
.dashboard-card__expiry-extend { color: var(--brand); text-decoration: none; font-weight: 500; }
.dashboard-card__expiry-extend:hover { text-decoration: underline; }
.dashboard-card__expiry-sep { color: var(--gray-300); }
.dashboard-card__expiry-buy { color: var(--success); text-decoration: none; font-weight: 600; }
.dashboard-card__expiry-buy:hover { text-decoration: underline; }
.dashboard-card__btn--delete { color: var(--error); border-color: transparent; }
.dashboard-card__btn--delete:hover { color: #fff; background: var(--error); border-color: var(--error); }
@media (max-width: 767px) {
    .dashboard-card { flex-direction: column; align-items: flex-start; }
    .dashboard-card__actions { width: 100%; }
    .dashboard-card__btn { flex: 1; text-align: center; }
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 767px) {
    .landing__type-buttons {
        grid-template-columns: 1fr;
    }

    .landing__form { padding: 1.25rem; }

    .builder-header { padding: 0 1rem; }
    .builder-header__bar { width: 120px; }
    .builder-main { padding: 0.75rem; }

    .modal { max-width: 100%; border-radius: var(--radius-sm); }
    .modal__header { padding: 1.25rem 1.25rem 0; }
    .modal__body { padding: 1rem 1.25rem 1.25rem; }

    .landing__widget { bottom: 1rem; right: 1rem; }
    .landing__widget-panel { width: calc(100vw - 2rem); }
}

@media (min-width: 768px) {
    .landing__type-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}
