/* ============================================
   Personal Brand Kit Builder — Styles
   Theme: Clean premium white (branding agency)
   ============================================ */

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

:root {
    --bg: #FAFBFC;
    --bg-card: #FFFFFF;
    --bg-hover: #F3F4F6;
    --border: #E5E7EB;
    --border-hover: #D1D5DB;
    --primary: #2563EB;
    --primary-hover: #3B82F6;
    --text: #111827;
    --text-muted: #6B7280;
    --text-dim: #9CA3AF;
    --accent: #F59E0B;
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, system-ui, sans-serif;
    --transition: 200ms ease;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* --- Header --- */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.logo h1 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.header-actions {
    display: flex;
    gap: 0.4rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

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

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

.btn-outline:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- Wizard Tabs --- */
.wizard-tabs {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-family: var(--font);
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.tab:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    font-weight: 600;
}

/* --- Panels --- */
.tab-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.panel {
    display: none;
    animation: fadeIn 250ms ease;
}

.panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.panel-inner h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.panel-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* --- Forms --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    font-family: var(--font);
    transition: all var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input::placeholder {
    color: var(--text-dim);
}

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

.select {
    cursor: pointer;
}

/* --- Color Pickers --- */
.color-pickers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.color-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.color-card label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.color-input {
    width: 64px;
    height: 64px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 3px;
    background: transparent;
}

.color-codes {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'SF Mono', monospace;
    line-height: 1.5;
}

.palette-preview {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    height: 48px;
    box-shadow: var(--shadow-sm);
}

.palette-preview div {
    flex: 1;
}

/* --- Typography Preview --- */
.type-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.25rem;
}

.type-heading {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.type-body {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- Voice --- */
.slider-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.slider-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    min-width: 50px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.tag-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-family: var(--font);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.tag-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tag-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- Social Bios --- */
.bio-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.bio-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.bio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.bio-platform {
    font-weight: 600;
    font-size: 0.85rem;
}

.bio-limit {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: 'SF Mono', monospace;
}

/* --- Brand Preview --- */
.brand-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.brand-preview .brand-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.brand-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.brand-preview h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

.brand-preview .brand-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.brand-section {
    margin-bottom: 1.5rem;
}

.brand-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.brand-colors-row {
    display: flex;
    gap: 0.5rem;
}

.brand-color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.brand-font-sample {
    margin-bottom: 0.25rem;
}

.brand-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.brand-tag {
    background: var(--bg-hover);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Print --- */
.print-only {
    display: none;
}

@media print {
    body>*:not(.print-only) {
        display: none !important;
    }

    .print-only {
        display: block !important;
        padding: 1rem;
    }

    @page {
        margin: 0.75in;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .app-header {
        padding: 0.75rem 1rem;
    }

    .wizard-tabs {
        padding: 0.5rem 1rem;
    }

    .tab-content {
        padding: 0 1rem 1rem;
    }

    .color-pickers {
        grid-template-columns: 1fr;
    }

    .bio-cards {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}