:root {
    --bg: #0f1115;
    --panel: #171a21;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --accent: #ff6600;
    --accent-dark: #d95600;
    --border: #2a2f3a;
    --danger: #ff6b6b;
    --success: #58d68d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

.container {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 64px;
}

.auth-container {
    width: min(620px, calc(100% - 32px));
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 0 42px;
}

.brand {
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
}

.badge {
    display: inline-block;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    margin: 0 0 24px;
}

.auth-card h1 {
    font-size: clamp(34px, 5vw, 52px);
}

.lead {
    color: var(--muted);
    font-size: 20px;
    max-width: 760px;
}

.lead.small {
    font-size: 17px;
}

.hero-panel,
.auth-card {
    background: linear-gradient(135deg, rgba(255,102,0,0.08), rgba(255,102,0,0.01));
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: clamp(28px, 5vw, 48px);
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
}

.card h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.warning {
    margin-top: 40px;
    padding: 18px 22px;
    background: rgba(255, 102, 0, 0.08);
    border: 1px solid rgba(255, 102, 0, 0.35);
    border-radius: 14px;
    color: #ffd6bd;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 12px;
    color: #111;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.button.secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.button.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255,102,0,0.08);
}

.button.disabled,
.button.disabled:hover {
    cursor: not-allowed;
    opacity: 0.55;
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}

.back-link {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--muted);
    text-decoration: none;
}

.back-link:hover { color: var(--accent); }

.form-card {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0c0e12;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,102,0,0.15);
}

.field-error {
    color: var(--danger);
    font-size: 14px;
    font-weight: 400;
}

.alert {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.alert-error {
    color: #ffd4d4;
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.35);
}

.alert-success {
    color: #d7ffe7;
    background: rgba(88, 214, 141, 0.08);
    border-color: rgba(88, 214, 141, 0.35);
}

.auth-switch {
    margin-top: 22px;
    color: var(--muted);
}

@media (max-width: 640px) {
    .top-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-actions,
    .hero-actions {
        width: 100%;
    }

    .button {
        width: 100%;
    }
}

/* Product intake v2 additions */
.wide-form {
    width: min(860px, calc(100% - 32px));
}

.compact-panel h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.field-help,
.label-note {
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}

textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0c0e12;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
}

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

.form-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: 400;
}

.checkbox-row input {
    width: auto;
    min-height: auto;
    margin-top: 7px;
}

.empty-state {
    margin-top: 28px;
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 28px;
}

.product-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.product-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.product-row h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.product-row p {
    margin: 0;
    color: var(--muted);
}

.row-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mini-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,102,0,0.12);
    color: #ffd6bd;
    border: 1px solid rgba(255,102,0,0.35);
    font-size: 13px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.detail-card h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.detail-list dt {
    color: var(--muted);
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
}

.image-card p {
    color: var(--muted);
}

@media (max-width: 760px) {
    .form-grid-two,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .product-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .row-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
