/* =========================================================================
   Rotație Creșă — temă vizuală (peste Bootstrap 5)
   Paletă: teal calm + accent nisip · fundal rece deschis
   ========================================================================= */
:root {
    --bg:        #eef4f4;
    --bg-soft:   #f7fafa;
    --surface:   #ffffff;
    --ink:       #14343b;
    --ink-soft:  #4d6a72;
    --muted:     #7d949b;
    --line:      #e2ecec;

    --teal:      #2a9d8f;
    --teal-600:  #23867a;
    --teal-050:  #e7f5f2;
    --sand:      #f4a261;
    --sand-050:  #fdeede;
    --danger:    #e76f51;
    --danger-050:#fbe7e1;

    --radius:    22px;
    --radius-md: 16px;
    --radius-sm: 11px;
    --shadow-sm: 0 2px 10px -3px rgba(20,52,59,.12);
    --shadow:    0 22px 46px -24px rgba(20,52,59,.34);

    --ff-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --ff-head: 'Baloo 2', var(--ff-body);
}

* { box-sizing: border-box; }

body {
    font-family: var(--ff-body);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Blob-uri decorative de fundal (o singură dată, discret) */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    pointer-events: none;
}
body::before { width: 460px; height: 460px; top: -160px; right: -120px;
    background: radial-gradient(circle at 30% 30%, #7fd3c6, transparent 70%); }
body::after  { width: 520px; height: 520px; bottom: -220px; left: -160px;
    background: radial-gradient(circle at 30% 30%, #ffd7ac, transparent 70%); opacity:.5; }

.page { position: relative; z-index: 1; }

/* --- Tipografie --------------------------------------------------------- */
h1, h2, h3, .brand-word { font-family: var(--ff-head); letter-spacing: -.01em; }
h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }
.text-muted, .muted { color: var(--muted) !important; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal); }

/* --- Wordmark ----------------------------------------------------------- */
.brand {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--ff-head); font-weight: 700; color: var(--ink);
    font-size: 1.25rem; letter-spacing: -.02em;
}
.brand-mark {
    width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
    display: grid; place-items: center; font-size: 1.25rem;
    background: linear-gradient(140deg, var(--teal), #45c4b3);
    box-shadow: 0 8px 18px -8px rgba(42,157,143,.7);
}

/* --- Hero (pagina publică) --------------------------------------------- */
.hero { text-align: center; padding: 3.2rem 1rem 1.4rem; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--teal-050); color: var(--teal-600);
    font-weight: 600; font-size: .82rem;
    padding: .38rem .85rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.08; margin: 0 0 .6rem; }
.hero p.lead { color: var(--ink-soft); font-size: 1.06rem; max-width: 34ch; margin: 0 auto; }

/* --- Carduri ------------------------------------------------------------ */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.card--raised { box-shadow: var(--shadow); border-color: transparent; }
.card--primary { position: relative; overflow: hidden; }
.card--primary::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
    background: linear-gradient(90deg, var(--teal), var(--sand));
}
.card-body { padding: 1.6rem; }
@media (min-width: 768px) { .card-body { padding: 2rem; } }
.card-title-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }

/* --- Formulare ---------------------------------------------------------- */
.form-label { font-weight: 600; font-size: .9rem; color: var(--ink-soft); margin-bottom: .35rem; }
.form-control, .form-select {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .7rem .9rem;
    color: var(--ink);
    background: var(--bg-soft);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--teal);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(42,157,143,.16);
}
.form-control-lg { padding: .85rem 1rem; font-size: 1.05rem; }

/* --- Butoane ------------------------------------------------------------ */
.btn { font-weight: 600; border-radius: var(--radius-sm); padding: .62rem 1.1rem;
    transition: transform .12s ease, box-shadow .15s ease, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .85rem 1.2rem; font-size: 1.05rem; border-radius: 14px; }

.btn-primary {
    --bs-btn-color:#fff; --bs-btn-hover-color:#fff; --bs-btn-active-color:#fff;
    border: none;
    background: linear-gradient(135deg, var(--teal), var(--teal-600));
    box-shadow: 0 12px 24px -12px rgba(35,134,122,.8);
}
.btn-primary:hover { background: linear-gradient(135deg, #2fb0a0, var(--teal));
    box-shadow: 0 16px 28px -12px rgba(35,134,122,.9); }

.btn-outline-secondary { border-color: var(--line); color: var(--ink-soft); background: #fff; }
.btn-outline-secondary:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.btn-outline-primary { border-color: var(--teal); color: var(--teal-600); }
.btn-outline-primary:hover { background: var(--teal); border-color: var(--teal); color:#fff; }
.btn-outline-success { border-color: var(--teal); color: var(--teal-600); }
.btn-outline-success:hover { background: var(--teal); border-color: var(--teal); color:#fff; }
.btn-outline-danger { border-color: var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color:#fff; }
.btn-light { background:#fff; border:1px solid var(--line); color: var(--ink-soft); }
.btn-sm { padding: .38rem .6rem; border-radius: 9px; }

/* --- Tabele ------------------------------------------------------------- */
.table { --bs-table-bg: transparent; color: var(--ink); margin: 0; }
.table > :not(caption) > * > * { padding: .85rem 1.1rem; border-bottom-color: var(--line); }
.table thead th {
    font-family: var(--ff-body); font-weight: 700; font-size: .78rem;
    color: var(--muted); background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}
.table-hover tbody tr { transition: background .12s; }
.table-hover tbody tr:hover { background: var(--teal-050); }
.table-responsive { border-radius: var(--radius-md); overflow: hidden; }
tr.is-next { background: var(--sand-050) !important; }

/* --- Badge-uri (pill) --------------------------------------------------- */
.badge { font-weight: 600; font-size: .74rem; padding: .4em .7em; border-radius: 999px; }
.badge.bg-success { background: var(--teal-050) !important; color: var(--teal-600) !important; }
.badge.bg-warning { background: var(--sand-050) !important; color: #b4682a !important; }
.badge.bg-danger  { background: var(--danger-050) !important; color: var(--danger) !important; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    font-weight: 600; font-size: .78rem; padding: .34rem .7rem; border-radius: 999px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip--wait { background: var(--sand-050); color: #b4682a; }
.chip--wait .dot { background: var(--sand); }
.chip--done { background: var(--teal-050); color: var(--teal-600); }
.chip--done .dot { background: var(--teal); }
.chip--next { background: var(--ink); color:#fff; }

/* --- Nav bar admin ------------------------------------------------------ */
.topbar {
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}

/* --- Tabs (pill) -------------------------------------------------------- */
.nav-tabs { border: none; gap: .4rem; }
.nav-tabs .nav-link {
    border: 1px solid var(--line); border-radius: 999px;
    color: var(--ink-soft); font-weight: 600; padding: .5rem 1.1rem; background:#fff;
}
.nav-tabs .nav-link:hover { border-color: var(--teal); color: var(--teal-600); }
.nav-tabs .nav-link.active {
    background: var(--ink); color:#fff; border-color: var(--ink);
}

/* --- Alerte ------------------------------------------------------------- */
.alert { border: none; border-radius: var(--radius-md); font-weight: 500; }
.alert-success { background: var(--teal-050); color: var(--teal-600); }
.alert-danger  { background: var(--danger-050); color: var(--danger); }
.alert-warning { background: var(--sand-050); color: #9a5a24; }

/* --- Cod / instrucțiuni ------------------------------------------------- */
code { color: var(--teal-600); background: var(--teal-050); padding: .1em .4em; border-radius: 6px; font-size: .85em; }

/* --- Footer ------------------------------------------------------------- */
.foot { color: var(--muted); font-size: .82rem; }
.foot .brand-word { color: var(--ink-soft); }

/* --- Intrare la încărcare (o singură dată) ------------------------------ */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: riseIn .5s cubic-bezier(.2,.7,.3,1) both; }
.rise-2 { animation-delay: .08s; }
.rise-3 { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
    .rise, .rise-2, .rise-3 { animation: none; }
    .btn, .table-hover tbody tr, .form-control { transition: none; }
}

/* --- Focus vizibil ------------------------------------------------------ */
:focus-visible { outline: 3px solid rgba(42,157,143,.45); outline-offset: 2px; border-radius: 6px; }

/* =========================================================================
   Responsive admin — corecții afișare pe mobil
   ========================================================================= */

/* Taburi: o singură linie, derulabile orizontal pe ecrane mici */
.nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.nav-tabs::-webkit-scrollbar { height: 0; }
.nav-tabs .nav-link { white-space: nowrap; }

/* Formulare aflate în interiorul celulelor de tabel */
.cell-form {
    display: flex;
    gap: .4rem;
    align-items: center;
    flex-wrap: wrap;
}
.cell-form .form-control,
.cell-form .form-select { min-width: 120px; flex: 1 1 120px; }
.cell-form .btn { flex: 0 0 auto; }

/* Grup de acțiuni pe rând (butoane mici) */
.row-actions { display: inline-flex; gap: .3rem; justify-content: flex-end; flex-wrap: wrap; }

/* Buton de login în antetul paginii publice */
.public-top { display: flex; justify-content: flex-end; padding-top: 1rem; }

/* Etichetă preț masă */
.price-tag {
    display: inline-flex; align-items: baseline; gap: .3rem;
    font-family: var(--ff-head); font-weight: 700; color: var(--teal-600);
}
.price-tag .cur { font-size: .8rem; color: var(--muted); font-weight: 600; }

@media (max-width: 575.98px) {
    .card-body { padding: 1.15rem; }
    .hero { padding: 2.2rem .5rem 1rem; }
    .brand { font-size: 1.05rem; }
    .topbar .container { gap: .5rem; }
    /* pe telefon, formularele din celule ocupă tot rândul, curat */
    .cell-form { width: 100%; }
}

.min-w-0 { min-width: 0; }
