/* Portal comenzi Tata Bebe — stiluri proprii peste Bootstrap 5.0.1 */
:root {
    --navy: #1e3a5f;
    --navy-2: #2b4c75;
    --accent: #c2410c;
    --accent-2: #9a3412;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f5f6f8;
    --card: #ffffff;
    --radius: 12px;
}

body.portal { background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; font-size: 15px; }
body.portal main { flex: 1 0 auto; }
a { color: var(--navy-2); }

/* Buton principal */
.btn-portal-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-portal-primary:hover, .btn-portal-primary:focus { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-portal-primary:disabled { background: #d6a68f; border-color: #d6a68f; }

/* Navigare */
.portal-nav { background: var(--navy); padding: .6rem 0; }
.portal-nav .navbar-brand { color: #fff; display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.brand-text { font-weight: 700; line-height: 1.1; }
.brand-text small { display: block; font-weight: 400; font-size: .75rem; opacity: .75; }
.portal-nav .navbar-toggler { color: #fff; border-color: rgba(255,255,255,.3); }
.portal-nav .nav-link { color: rgba(255,255,255,.8); border-radius: 8px; padding: .5rem .8rem !important; }
.portal-nav .nav-link:hover { color: #fff; }
.portal-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-account { color: #fff; text-align: right; line-height: 1.2; max-width: 240px; }
.nav-account-client { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-account-user { font-size: .75rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-logout { color: rgba(255,255,255,.8); text-decoration: none; }
.nav-logout:hover { color: #fff; }
@media (max-width: 991.98px) {
    .portal-nav .navbar-collapse { padding-top: .8rem; }
    .nav-account { text-align: left; max-width: none; padding: .5rem .8rem 0; }
    .nav-logout { text-align: left; padding-left: .8rem; }
}

/* Antet de pagina */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-title { font-size: 1.6rem; font-weight: 700; margin: 0; }
.page-sub { color: var(--muted); margin: .2rem 0 0; }
.back-link { display: inline-block; margin-bottom: .6rem; color: var(--muted); text-decoration: none; font-size: .9rem; }
.back-link:hover { color: var(--ink); }

/* Panouri */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.step { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .85rem; align-items: center; justify-content: center; margin-right: .4rem; }

/* Indicatori */
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; height: 100%; }
.kpi-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.kpi-value-sm { font-size: 1.25rem; padding-top: .35rem; }

/* Lista comenzilor */
.order-list { display: flex; flex-direction: column; gap: .5rem; }
.order-list.is-loading { opacity: .5; pointer-events: none; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
.order-row:hover { border-color: #c7ccd4; box-shadow: 0 2px 8px rgba(15,23,42,.06); color: var(--ink); }
.order-row.is-cancelled { opacity: .6; }
.order-row-title { font-weight: 600; }
.order-row-meta { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.order-row-meta i { font-size: .75rem; }
.order-row-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex-shrink: 0; }
.order-row-total { font-weight: 700; white-space: nowrap; }
.order-row-total small { font-weight: 400; color: var(--muted); }
.badge-soft { display: inline-block; font-size: .7rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; background: #ede9fe; color: #5b21b6; vertical-align: middle; }
@media (max-width: 575.98px) {
    .order-row { flex-direction: column; align-items: stretch; }
    .order-row-side { flex-direction: row; justify-content: space-between; align-items: center; }
}

.status-pill { --status: #64748b; display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--status); background: color-mix(in srgb, var(--status) 12%, #fff); border: 1px solid color-mix(in srgb, var(--status) 30%, #fff); white-space: nowrap; }
.status-pill-lg { font-size: .9rem; padding: .35rem .9rem; }

/* Filtre */
.filter-tabs { display: flex; gap: .35rem; flex-wrap: wrap; }
.filter-tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .9rem; font-size: .88rem; color: var(--muted); }
.filter-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1rem; }
.pager-info { color: var(--muted); font-size: .88rem; }

.empty-state { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty-state i { font-size: 2rem; margin-bottom: .6rem; display: block; }

/* Detalii comanda */
.lines-table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; border-bottom-width: 1px; }
.totals { margin: 1rem 0 .6rem auto; max-width: 320px; }
.totals > div { display: flex; justify-content: space-between; padding: .2rem 0; }
.totals dt { font-weight: 400; color: var(--muted); }
.totals dd { margin: 0; }
.totals-grand { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .5rem !important; font-size: 1.1rem; font-weight: 700; }
.totals-grand dt { color: var(--ink); font-weight: 700; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.facts dt { color: var(--muted); font-weight: 400; }
.facts dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { --status: #64748b; position: relative; padding: 0 0 .9rem 1.2rem; display: flex; justify-content: space-between; gap: .5rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .4rem; width: 9px; height: 9px; border-radius: 50%; background: var(--status); }
.timeline li::after { content: ""; position: absolute; left: 4px; top: 1.1rem; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline-date { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.list-plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }

/* Formular comanda: catalog */
.catalog-search { max-width: 280px; }
@media (max-width: 575.98px) { .catalog-search { max-width: none; } }
.catalog { display: flex; flex-direction: column; gap: .4rem; }
.catalog-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.catalog-item.is-selected { border-color: var(--accent); background: #fff7ed; }
.catalog-name { font-weight: 600; font-size: .95rem; }
.catalog-price { color: var(--muted); font-size: .88rem; }
.catalog-price strong { color: var(--ink); }
.catalog-old-price { margin-left: .4rem; font-size: .8rem; }
.qty { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.qty-btn { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; line-height: 1; color: var(--navy); }
.qty-btn:active { background: #eef2f7; }
.qty-input { width: 72px; text-align: center; height: 38px; font-weight: 600; }

/* Bara de jos cu totalul */
.order-bar { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: 0 -4px 16px rgba(15,23,42,.08); margin-bottom: 1rem; }
.order-bar-count { color: var(--muted); font-size: .85rem; }
.order-bar-total { font-size: 1.3rem; font-weight: 700; }
.order-bar-total small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.confirm-lines { list-style: none; padding: 0; margin: 0 0 1rem; border-top: 1px solid var(--line); }
.confirm-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.confirm-total { text-align: right; font-size: 1.05rem; }

/* Paginile publice */
.portal-public { background: linear-gradient(160deg, var(--navy) 0%, #0f2440 100%); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem; }
.auth-card { background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 430px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.auth-brand .brand-mark { width: 44px; height: 44px; font-size: 1.2rem; }
.auth-brand-title { font-weight: 700; font-size: 1.15rem; }
.auth-brand-sub { color: var(--muted); font-size: .85rem; }
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: .4rem; }
.auth-lead { color: var(--muted); margin-bottom: 1.4rem; }
.auth-note { color: var(--muted); font-size: .85rem; margin: 1.4rem 0 0; text-align: center; }

.portal-footer { color: var(--muted); font-size: .8rem; padding: 1.5rem 0; }
