:root {
    --pub-header-bg: #0f172a;
    --pub-header-text: #ffffff;
    --pub-header-subtext: #cbd5e1;
    --pub-footer-bg: #0f172a;
    --pub-footer-text: #cbd5e1;
    --pub-accent: #2563eb;
    --pub-surface: #ffffff;
    --pub-border: #e2e8f0;
    --pub-muted: #64748b;
}

* {
    box-sizing: border-box;
}

body.public-app {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #0f172a;
    display: flex;
    flex-direction: column;
}

.public-header {
    background: var(--pub-header-bg);
    color: var(--pub-header-text);
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.public-brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 700;
    font-size: 22px;
}

.public-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-brand h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

.public-brand p {
    margin: 0;
    color: var(--pub-header-subtext);
    font-size: 14px;
}

.public-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    background: var(--pub-accent);
    color: #fff;
    border: 1px solid transparent;
}

.public-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
}

.public-footer {
    background: var(--pub-footer-bg);
    color: var(--pub-footer-text);
    padding: 20px 24px;
    margin-top: auto;
}

.public-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.7;
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 18px;
    align-items: start;
}

.order-panel,
.catalog-panel {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.panel-title {
    margin: 0 0 6px;
    font-size: 22px;
}

.panel-subtitle {
    margin: 0 0 16px;
    color: var(--pub-muted);
    line-height: 1.6;
}

.step-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.step-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--pub-border);
    background: #f8fafc;
}

.step-item.active {
    border-color: #93c5fd;
    background: #eff6ff;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--pub-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.order-panel select,
.order-panel input,
.order-panel textarea,
.order-panel button {
    width: 100%;
    margin-bottom: 10px;
}

.order-panel button {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    background: var(--pub-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.order-panel button.secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.order-panel button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.summary-box {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 14px;
    padding: 14px;
    line-height: 1.7;
    margin-top: 10px;
}

.catalog-panel.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    color: var(--pub-muted);
    text-align: center;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.catalog-card {
    border: 1px solid var(--pub-border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.catalog-card-image {
    height: 140px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-weight: 700;
}

.catalog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-card-body {
    padding: 14px;
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
}

.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

.variant-row {
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
    padding-top: 12px;
}

.variant-row input {
    width: 100%;
    margin-top: 8px;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-top: 10px;
}

.alert-success { background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
}

.modal-backdrop.open { display: flex; }

.modal-card {
    width: min(100%, 520px);
    background: #fff;
    border-radius: 20px;
    padding: 22px;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.slider-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.slider-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--pub-border);
}

.slider-card .slider-image {
    height: 140px;
    background: #eff6ff;
}

.slider-card .slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-card .slider-body {
    padding: 14px;
}

@media (max-width: 960px) {
    .dashboard-grid,
    .slider-grid {
        grid-template-columns: 1fr;
    }
}
