/* Wall of Love - GenAI Unplugged Brand Styles
   Brand: Teal #367e83 | Cream #faf9f5 | Yellow #ffde59
   Fonts: Montserrat (headings) | Roboto (body)
   Base unit: 8px | Radius: 8px/12px | Shadow: rgba(42,42,42,0.08)
*/

:root {
    /* Brand colors */
    --teal: #367e83;
    --teal-dark: #2a5f63;
    --teal-light: #4a9da3;
    --teal-pale: #e8f3f4;
    --cream: #faf9f5;
    --yellow: #ffde59;
    --yellow-dark: #e5c74f;
    --yellow-pale: #fffbeb;

    /* Neutrals */
    --charcoal: #2a2a2a;
    --gray: #5a5a5a;
    --gray-light: #e8e8e8;
    --white: #ffffff;

    /* Semantic aliases */
    --primary: var(--teal);
    --primary-hover: var(--teal-dark);
    --accent: var(--yellow);
    --accent-hover: var(--yellow-dark);
    --danger: #c0392b;
    --danger-hover: #a93226;
    --success: #27ae60;
    --bg: var(--cream);
    --card-bg: var(--white);
    --text: var(--charcoal);
    --text-muted: var(--gray);
    --border: var(--gray-light);

    /* Elevation */
    --shadow: 0 2px 8px rgba(42, 42, 42, 0.08);
    --shadow-lg: 0 8px 24px rgba(42, 42, 42, 0.12);

    /* Shape */
    --radius: 8px;
    --radius-lg: 12px;

    /* Spacing (8px base) */
    --sp-xs: 8px;
    --sp-sm: 16px;
    --sp-md: 24px;
    --sp-lg: 32px;
    --sp-xl: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* --- Auth Screen --- */
.auth-container {
    max-width: 460px;
    margin: 80px auto;
    padding: var(--sp-xl) var(--sp-xl) var(--sp-lg);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.auth-brand-link {
    display: block;
    text-align: center;
    margin-bottom: 12px;
}
.auth-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    transition: transform 0.2s;
}
.auth-brand-icon:hover {
    transform: scale(1.08);
}

.auth-container h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--teal);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.auth-container h1 span {
    background: linear-gradient(180deg, transparent 40%, var(--yellow) 40%);
    padding: 0 6px;
}

.auth-container h1 .heart {
    color: #e74c3c;
    font-size: 32px;
    display: inline-block;
    animation: heartbeat 2s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 6px;
    background: none;
    padding: 0;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}

.auth-container .subtitle {
    color: var(--text-muted);
    margin-bottom: var(--sp-lg);
    font-size: 16px;
    line-height: 1.6;
}

.auth-container input[type="email"] {
    width: 100%;
    padding: 14px var(--sp-sm);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    margin-bottom: var(--sp-sm);
    outline: none;
    transition: all 0.2s;
    color: var(--text);
}

.auth-container input[type="email"]:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-pale);
}

.auth-container .btn {
    padding: 16px 24px;
    font-size: 16px;
}

/* Auth CTA uses yellow accent */
.auth-container .btn-accent {
    background: var(--yellow);
    color: var(--charcoal);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(255, 222, 89, 0.3);
}
.auth-container .btn-accent:hover {
    background: var(--yellow-dark);
    box-shadow: 0 4px 16px rgba(255, 222, 89, 0.4);
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--gray);
    line-height: 1.5;
    cursor: pointer;
    text-align: left;
}

.consent-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--teal);
    flex-shrink: 0;
}

.consent-label a {
    color: var(--teal);
    text-decoration: none;
}

.consent-label a:hover {
    text-decoration: underline;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-accent {
    background: var(--yellow);
    color: var(--charcoal);
    font-weight: 700;
}
.btn-accent:hover { background: var(--yellow-dark); }

.modal-actions .btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
}

.modal-actions .btn-outline {
    border: 2px solid #eee;
    color: var(--gray);
}

.modal-actions .btn-accent {
    box-shadow: 0 4px 12px rgba(255, 222, 89, 0.4);
}

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

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-full { width: 100%; }

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

/* --- Layout --- */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-md);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-sm) 0;
    margin-bottom: var(--sp-md);
    border-bottom: 1px solid var(--border);
}

.app-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--teal);
    letter-spacing: -0.02em;
}

/* --- Editor Bar (compact two-row header) --- */
.editor-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px;
}

.editor-bar-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-bar-title {
    flex: 1;
    min-width: 0;
    font-size: 20px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.editor-bar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.editor-bar-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tb-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray);
    margin-right: 2px;
}

.tb-sep {
    width: 1px;
    height: 22px;
    background: var(--border);
    margin: 0 4px;
}

.tb-spacer {
    flex: 1;
}

.arrange-btn.active {
    background: var(--teal-pale);
    border-color: var(--teal);
    color: var(--teal);
}

.app-header .user-info {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Wall List (Dashboard) --- */
.wall-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--sp-sm);
    margin-bottom: var(--sp-md);
}

.wall-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-md);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.wall-card-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.wall-card:hover .wall-card-delete {
    opacity: 1;
}

.wall-card-delete:hover {
    background: #fee;
    color: var(--danger);
}

.wall-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-light);
}

.wall-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--charcoal);
}

.wall-card .wall-meta {
    font-size: 14px;
    color: var(--text-muted);
}

.wall-card .wall-meta .meta-count {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--teal);
    font-size: 16px;
}

.wall-card .wall-meta .meta-slug {
    color: var(--gray);
    font-size: 12px;
    margin-left: 4px;
}

.create-wall-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px var(--sp-md);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 140px;
}

.create-wall-card:hover {
    border-color: var(--teal);
    background: var(--teal-pale);
}

.create-wall-card .plus {
    font-size: 32px;
    color: var(--teal);
    margin-bottom: var(--sp-xs);
}

.create-wall-card p {
    color: var(--teal);
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

/* --- Wall Editor --- */
.wall-editor {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--sp-md);
    min-height: calc(100vh - 140px);
}

/* Sidebar toggle button */
.sidebar-toggle {
    display: none;
    width: 100%;
    padding: 10px 14px;
    background: var(--white);
    color: var(--charcoal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    letter-spacing: 0.02em;
    transition: background 0.2s, border-color 0.2s;
}
.sidebar-toggle:hover { background: var(--bg); border-color: var(--teal); }

/* 4-column mode: sidebar collapses */
.wall-editor.cols-4-mode {
    grid-template-columns: 1fr;
}
.wall-editor.cols-4-mode .sidebar-toggle {
    display: block;
    margin-bottom: var(--sp-sm);
}
.wall-editor.cols-4-mode .editor-sidebar {
    position: static;
}
.wall-editor.cols-4-mode .sidebar-inner {
    display: none;
}
.wall-editor.cols-4-mode .sidebar-inner.expanded {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-sm) var(--sp-md);
    margin-top: var(--sp-sm);
}

/* Danger zone styling */
.danger-zone-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    user-select: none;
}
.danger-zone-label:hover { color: var(--danger); }

.editor-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-md);
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.editor-sidebar h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: var(--sp-sm);
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.editor-sidebar label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--charcoal);
}

.editor-sidebar input,
.editor-sidebar select {
    width: 100%;
    padding: var(--sp-xs) 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    margin-bottom: var(--sp-sm);
    outline: none;
    color: var(--text);
    transition: border-color 0.2s;
}

.editor-sidebar input:focus,
.editor-sidebar select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 2px var(--teal-pale);
}

.sidebar-section {
    margin-bottom: var(--sp-md);
    padding-bottom: var(--sp-md);
    border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Background preset swatches */
.bg-presets {
    display: flex;
    gap: 6px;
    margin-bottom: var(--sp-sm);
    flex-wrap: wrap;
}

.bg-preset {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.bg-preset:hover {
    transform: scale(1.15);
}

.bg-preset.active {
    border-color: var(--teal);
    box-shadow: 0 0 0 2px var(--teal-pale);
}

.color-row {
    display: flex;
    gap: var(--sp-xs);
    align-items: center;
    margin-bottom: var(--sp-sm);
}

.color-row input[type="color"] {
    width: 40px;
    height: 32px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0;
}

.color-row input[type="text"] {
    flex: 1;
    margin-bottom: 0;
}

/* --- Upload Zone --- */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px var(--sp-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: var(--sp-md);
    background: var(--card-bg);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--teal);
    background: var(--teal-pale);
}

.upload-zone .upload-icon {
    font-size: 56px;
    color: var(--teal);
    margin-bottom: var(--sp-xs);
    font-weight: 300;
}

.upload-zone p {
    color: var(--charcoal);
    font-size: 16px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

.upload-zone .formats {
    font-size: 13px;
    color: var(--gray);
    margin-top: 6px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

/* --- Testimonial Grid (Editor) --- */
.testimonial-grid {
    display: flex;
    gap: var(--sp-sm);
}
.testimonial-grid-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    min-width: 0;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--sp-sm);
    overflow: hidden;
    position: relative;
    transition: all 0.2s;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-light);
}

.testimonial-card img {
    width: 100%;
    display: block;
}

.testimonial-card .card-overlay {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.testimonial-card:hover .card-overlay {
    opacity: 1;
}

.card-actions-left, .card-actions-right {
    display: flex;
    gap: 4px;
}

.card-overlay button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--charcoal);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: background 0.2s;
}

.card-overlay button:hover {
    background: var(--teal);
}

.testimonial-card .card-meta {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
}

.testimonial-card .card-meta.card-meta-top {
    border-top: none;
    border-bottom: none;
}

.testimonial-card .card-meta .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testimonial-card .card-meta .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.testimonial-card .card-meta .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.testimonial-card .card-meta .meta-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: var(--charcoal);
}

.testimonial-card .meta-source {
    font-size: 11px;
    color: var(--teal);
    background: var(--teal-pale);
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 3px;
    font-weight: 500;
}

.meta-tag {
    font-size: 10px;
    color: #b8860b;
    background: #fffbeb;
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-left: 4px;
}
.meta-tag.tag-paid {
    color: #1a6e5c;
    background: #e6f5f0;
}
.meta-tag.tag-paid::before {
    content: "\2605 ";
}

.testimonial-card .card-meta .meta-highlight {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

/* --- Live Preview: Card Styles --- */
.testimonial-card.card-shadow {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.testimonial-card.card-rounded {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: none;
}

.testimonial-card.card-minimal {
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.testimonial-card.card-branded {
    border-radius: var(--radius);
    border: 2px solid var(--teal-pale);
    box-shadow: var(--shadow);
}
.testimonial-card.card-branded:hover {
    border-color: var(--teal-light);
}

/* --- Live Preview: Dark Theme --- */
.editor-main.theme-dark {
    border-radius: var(--radius-lg);
}

.editor-main.theme-dark .upload-zone {
    border-color: #555;
    color: #ccc;
}
.editor-main.theme-dark .upload-zone p { color: #ccc; }
.editor-main.theme-dark .upload-zone .formats { color: #888; }
.editor-main.theme-dark .upload-icon { color: #888; }

.editor-main.theme-dark .testimonial-card {
    background: #1e1e2e;
    border-color: #333;
}
.editor-main.theme-dark .testimonial-card .card-meta {
    border-color: #333;
}
.editor-main.theme-dark .testimonial-card .card-meta .meta-name {
    color: #f0f0f0;
}

.editor-main.theme-dark .empty-state {
    color: #888;
}

/* --- Edit Modal --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 42, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal {
    background: var(--card-bg);
    border: none;
    border-radius: 16px;
    padding: 32px 36px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(42, 42, 42, 0.2), 0 0 0 1px rgba(42, 42, 42, 0.05);
    animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal h3 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: var(--sp-md);
    font-size: 22px;
    font-weight: 800;
    color: var(--charcoal);
    letter-spacing: -0.02em;
}

.modal label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    color: var(--gray);
}

.modal input, .modal select, .modal textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 20px;
    outline: none;
    color: var(--text);
    background: #fafafa;
    transition: all 0.2s;
}

.modal input::placeholder, .modal textarea::placeholder {
    color: #bbb;
}

.modal input:focus, .modal select:focus, .modal textarea:focus {
    border-color: var(--teal);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--teal-pale);
}

.modal textarea {
    resize: vertical;
    min-height: 60px;
}

/* Title template chips */
.title-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.title-chip {
    padding: 8px 16px;
    border: 2px solid #eee;
    border-radius: 99px;
    background: var(--white);
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.title-chip:hover {
    border-color: var(--teal-light);
    color: var(--teal);
    background: var(--teal-pale);
    transform: translateY(-1px);
}

.title-chip.active {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(54, 126, 131, 0.3);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Slug prefix styling */
.slug-row {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 20px;
}

.slug-prefix {
    color: var(--teal);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Roboto Mono', 'SF Mono', monospace;
    white-space: nowrap;
}

.slug-value {
    font-size: 14px;
    font-family: 'Roboto Mono', 'SF Mono', monospace;
    color: var(--gray);
    padding: 10px 0;
}

.modal input.readonly-title {
    background: #f5f5f5;
    color: var(--gray);
    cursor: default;
}

.modal input.readonly-title:focus {
    border-color: #eee;
    box-shadow: none;
}

/* --- Public Wall --- */
.public-wall {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 40px 48px;
    box-sizing: border-box;
    position: relative;
}

.public-wall h1 {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: var(--sp-xl);
    letter-spacing: -0.02em;
    color: var(--charcoal);
}

.masonry {
    display: flex;
    gap: 20px;
}
.masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Widen public wall for 4 columns */
.public-wall:has(.masonry.cols-4) { max-width: 1400px; }

.masonry-item {
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--card-bg);
}

.masonry-item:hover {
    transform: translateY(-2px);
}

/* Card styles for public wall */
.masonry-item.style-shadow {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.masonry-item.style-shadow:hover {
    box-shadow: var(--shadow-lg);
}

.masonry-item.style-rounded {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.masonry-item.style-minimal {
    border-radius: 0;
    box-shadow: none;
}

.masonry-item.style-branded {
    border-radius: var(--radius);
    border: 1px solid var(--teal-pale);
    box-shadow: var(--shadow);
}
.masonry-item.style-branded:hover {
    border-color: var(--teal-light);
}

.masonry-item img {
    width: 100%;
    display: block;
}

.masonry-item .item-meta,
.masonry-item .item-header {
    padding: 12px 14px;
}

.masonry-item .item-meta {
    border-top: 1px solid var(--border);
}

.masonry-item .item-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--charcoal);
}

.masonry-item .item-source {
    font-size: 11px;
    color: var(--teal);
    background: var(--teal-pale);
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 500;
    margin-top: 4px;
}

.masonry-item .item-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.masonry-item .item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.item-tag {
    font-size: 10px;
    color: #b8860b;
    background: #fffbeb;
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-left: 4px;
}
.item-tag.tag-paid {
    color: #1a6e5c;
    background: #e6f5f0;
}
.item-tag.tag-paid::before {
    content: "\2605 ";
}

.masonry-item .item-highlight {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
    line-height: 1.5;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 42, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    cursor: pointer;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: var(--sp-md);
    right: var(--sp-md);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    z-index: 300;
    animation: slideUp 0.3s ease;
}

.toast.success { background: var(--teal); color: var(--white); }
.toast.error { background: var(--danger); color: var(--white); }

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .wall-editor {
        grid-template-columns: 1fr;
    }
    .editor-sidebar {
        position: static;
    }
    .testimonial-grid { flex-wrap: wrap; }
    .testimonial-grid-col { min-width: calc(50% - var(--sp-sm)); flex: none; width: calc(50% - var(--sp-sm) / 2); }
    .masonry { flex-wrap: wrap; }
    .masonry .masonry-col { min-width: calc(50% - 10px); flex: none; width: calc(50% - 10px); }
    .public-wall:has(.masonry.cols-4) { max-width: 100%; }
    .wall-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .testimonial-grid { flex-direction: column; }
    .testimonial-grid-col { width: 100%; min-width: 100%; }
    .masonry { flex-direction: column; }
    .masonry .masonry-col { width: 100%; min-width: 100%; }
    .app-container { padding: var(--sp-sm); }
    .public-wall { padding: var(--sp-md) var(--sp-sm); }
}

/* --- Text Testimonial Cards (Senja-style) --- */
/* Text card - Senja-style: header (avatar+name+stars) then body text */
.text-card {
    padding: 24px;
    position: relative;
}

.text-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.text-card .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.text-card .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.text-card .header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.text-card .header-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--charcoal);
}

.text-card .header-source {
    font-size: 11px;
    color: var(--teal);
    background: var(--teal-pale);
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 500;
    margin-top: 2px;
}

.text-card .star-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}

.text-card .star-rating .star {
    color: var(--yellow);
    font-size: 20px;
    line-height: 1;
}

.text-card .star-rating .star.empty {
    color: var(--gray-light);
}

.text-card .quote-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--charcoal);
}

/* Text card in masonry (public wall) */
.masonry-item.text-card {
    cursor: default;
}

.masonry-item.text-card:hover {
    transform: none;
}

/* Text card in editor grid */
.testimonial-card.text-type {
    position: relative;
}

/* Admin editor text card - Senja-style: header then text */
.testimonial-card.text-type .text-card-body {
    padding: 20px;
    position: relative;
}

.testimonial-card.text-type .text-card-body .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.testimonial-card.text-type .text-card-body .quote-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--charcoal);
}

.testimonial-card.text-type .text-card-body .star-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

.testimonial-card.text-type .text-card-body .star {
    color: var(--yellow);
    font-size: 18px;
}

.testimonial-card.text-type .text-card-body .star.empty {
    color: var(--gray-light);
}

.testimonial-card.text-type .text-card-body .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* Dark theme text card overrides */
.theme-dark .text-card .quote-text,
.editor-main.theme-dark .text-card-body .quote-text { color: #f0f0f0; }

.theme-dark .text-card .header-name,
.editor-main.theme-dark .text-card-body .meta-name { color: #f0f0f0; }

/* Pending badge */
.pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f39c12;
    color: white;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

/* Status badge on cards */
.status-pending {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f39c12;
    color: white;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

/* --- Submit Form --- */
.submit-container {
    max-width: 540px;
    margin: 60px auto;
    padding: var(--sp-xl) var(--sp-xl) var(--sp-lg);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.submit-container h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--teal);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    text-align: center;
}

.submit-container h1 .heart {
    color: #e74c3c;
    font-size: 26px;
    display: inline-block;
    animation: heartbeat 2s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 4px;
}

.submit-container .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: var(--sp-lg);
    font-size: 16px;
    line-height: 1.6;
}

.submit-container .wall-name {
    color: var(--teal);
    font-weight: 600;
}

.submit-container label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    color: var(--gray);
}

.submit-container input,
.submit-container select,
.submit-container textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 20px;
    outline: none;
    color: var(--text);
    background: #fafafa;
    transition: all 0.2s;
}

.submit-container input:focus,
.submit-container select:focus,
.submit-container textarea:focus {
    border-color: var(--teal);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--teal-pale);
}

.submit-container textarea {
    resize: vertical;
    min-height: 100px;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0 8px;
}

.optional-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 12px;
}

.extras-section {
    opacity: 0.85;
    transition: opacity 0.2s;
}

.extras-section:hover,
.extras-section:focus-within {
    opacity: 1;
}

.extras-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.extras-grid td {
    vertical-align: middle;
}

.submit-container .extras-grid .extras-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    padding-right: 14px;
    width: 1%;
    margin-bottom: 0;
}

.star-picker-sm {
    margin-bottom: 0 !important;
}

.star-picker-sm .star-btn {
    font-size: 22px !important;
}

.submit-container .extras-select {
    width: auto;
    min-width: 160px;
    margin-bottom: 0;
    padding: 8px 12px;
    font-size: 13px;
}

.avatar-upload-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-upload-compact .avatar-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal-pale);
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-upload-compact .avatar-preview.has-image {
    border: 2px solid var(--teal);
}

.avatar-upload-compact .avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.edit-avatar-row {
    margin-bottom: 14px;
}

.edit-avatar-row .avatar-preview {
    width: 40px;
    height: 40px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.radio-pill input[type="radio"] {
    display: none;
}

.radio-pill:has(input:checked) {
    background: var(--teal-pale);
    border-color: var(--teal);
    color: var(--teal);
}

/* Star rating picker */
.star-picker {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.star-picker .star-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-light);
    transition: color 0.15s, transform 0.15s;
    padding: 0;
    line-height: 1;
}

.star-picker .star-btn:hover {
    transform: scale(1.15);
}

.star-picker .star-btn.active {
    color: var(--yellow);
}

.submit-success {
    text-align: center;
    padding: var(--sp-xl) var(--sp-md);
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.avatar-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--teal-pale);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-preview.has-image {
    border-style: solid;
    border-color: var(--teal);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.avatar-hint {
    font-size: 11px;
    color: var(--gray);
}

.consent-text {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 16px;
    text-align: center;
}

.submit-success .check {
    font-size: 48px;
    color: var(--success);
    margin-bottom: var(--sp-sm);
}

.submit-success h2 {
    font-size: 22px;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.submit-success p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Import modal */
.import-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.import-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.import-preview th {
    background: var(--cream);
    padding: 8px 10px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    position: sticky;
    top: 0;
}

.import-preview td {
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.import-drop-zone:hover {
    border-color: var(--teal);
    background: var(--teal-pale);
}

.import-drop-zone p {
    font-size: 14px;
    color: var(--gray);
}

.import-drop-zone .or-text {
    margin: 8px 0;
    color: var(--gray-light);
    font-size: 12px;
}

/* --- Misc --- */
.empty-state {
    text-align: center;
    padding: var(--sp-xl) var(--sp-md);
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    color: var(--teal-light);
    margin-bottom: var(--sp-sm);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.hidden { display: none !important; }

.share-url {
    display: flex;
    gap: var(--sp-xs);
    align-items: center;
    margin-bottom: var(--sp-sm);
}

.share-url input {
    flex: 1;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    background: var(--cream);
}

/* Powered by footer for public wall */
.powered-by {
    text-align: center;
    margin-top: var(--sp-xl);
    padding-top: var(--sp-md);
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.powered-by a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 500;
}

.powered-by a:hover {
    color: var(--teal-dark);
    text-decoration: underline;
}
