/* admin2.css -- new admin look (prototype docs/prototip/salon-admin.html).
   Everything is under body.a2, so the therapist, client and public pages are not affected.
   styles.css stays as it is; here only its colour tokens are changed for the admin. */

body.a2 {
    --a2-cream:     #fffbf8;
    --a2-blush:     #fce4e0;
    --a2-rose:      #a6615a;
    --a2-rose-deep: #8c4d47;
    --a2-ink:       #23222b;
    --a2-muted:     #6b6570;
    --a2-line:      #efdcd7;
    --a2-row:       #f4e8e4;
    --a2-serif: "Playfair Display", Georgia, serif;
    --a2-sans:  Inter, "Segoe UI", system-ui, sans-serif;

    /* styles.css tokens, re-tinted to the prototype colours (admin only). */
    --primary:       var(--a2-rose);
    --primary-hover: var(--a2-rose-deep);
    --primary-soft:  var(--a2-blush);
    --bg:            var(--a2-cream);
    --text:          var(--a2-ink);
    --text-muted:    var(--a2-muted);
    --border:        var(--a2-line);
    --beige:         #fff8f6;
    --shadow-sm:     none;
    --shadow:        none;

    font-family: var(--a2-sans);
    background: var(--a2-cream);
    color: var(--a2-ink);
}
body.a2 :focus-visible { outline: 2px solid var(--a2-rose); outline-offset: 2px; }

/* ---------- Frame ---------- */
body.a2 .app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}
body.a2 .main-content {
    padding: 26px 32px 60px;
    max-width: 1200px;
    width: 100%;
    min-width: 0;
}

.a2-side {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    border-right: 1px solid var(--a2-line);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.a2-side .a2-logo img { width: 180px; height: auto; margin: 0 auto 6px; display: block; }
.a2-side nav { display: flex; flex-direction: column; gap: 4px; }

.a2-navb {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    padding: .8em 1em;
    border-radius: 12px;
    color: var(--a2-muted);
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.a2-navb svg { width: 20px; height: 20px; flex: none; }
.a2-navb:hover { background: var(--a2-blush); color: var(--a2-rose-deep); }
.a2-navb[aria-current="page"] { background: var(--a2-rose); color: var(--a2-cream); }
.a2-side .a2-logout { margin-top: auto; }

.a2-top, .a2-tabs { display: none; }

/* Danas: Pregled / Termini switch (prototype .seg2). */
.a2-seg {
    display: flex;
    width: max-content;
    max-width: 100%;
    background: #f3e6e2;
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 16px;
}
.a2-seg a {
    padding: .4em 1.1em;
    border-radius: 8px;
    font-weight: 500;
    color: var(--a2-ink);
    text-decoration: none;
}
.a2-seg a:hover { color: var(--a2-rose-deep); }
.a2-seg a[aria-current="page"] {
    background: #fff;
    color: var(--a2-rose-deep);
    box-shadow: 0 1px 3px rgba(140, 77, 71, .2);
}

/* Postavke sub-pages: back link (prototype .linkb). */
.a2-back {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--a2-rose-deep);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.a2-back:hover { color: var(--a2-rose); }
.a2-back[hidden] { display: none !important; }

/* Postavke menu (prototype .menu / .mrow). */
.a2-menu { padding: 0 18px; }
.a2-mrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 4px;
    border-top: 1px solid var(--a2-row);
    color: var(--a2-ink);
    text-decoration: none;
}
.a2-mrow:first-child { border-top: 0; }
.a2-mrow:hover { background: #fff8f6; color: var(--a2-ink); }
.a2-mrow b { font-weight: 600; }
.a2-mrow small { display: block; color: var(--a2-muted); font-size: .85rem; }
.a2-kar { color: var(--a2-rose); font-size: 1.5rem; line-height: 1; }

/* ---------- Look of the existing content ---------- */
body.a2 .page-header { margin-bottom: 16px; gap: 12px; }
body.a2 .page-title {
    font-family: var(--a2-serif);
    font-weight: 400;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    line-height: 1.15;
}
body.a2 h2.page-title { font-size: 1.25rem; }

body.a2 .card,
body.a2 .stat-card,
body.a2 .table-wrapper {
    background: #fff;
    border: 1px solid var(--a2-line);
    border-radius: 18px;
    box-shadow: none;
}
body.a2 .card.a2-menu { padding: 0 18px; }
body.a2 .stat-card { border-radius: 16px; padding: 14px 16px; }
body.a2 .stat-label { text-transform: none; letter-spacing: 0; font-size: .82rem; color: var(--a2-muted); }
body.a2 .stat-value { font-family: var(--a2-serif); font-weight: 400; font-size: 1.7rem; color: var(--a2-rose-deep); }

body.a2 .table th {
    background: #fff8f6;
    color: var(--a2-muted);
    text-transform: none;
    letter-spacing: 0;
    font-size: .82rem;
}
body.a2 .table td { border-bottom-color: var(--a2-row); }
body.a2 .table tr:hover td { background: #fff8f6; }

body.a2 .btn { border-radius: 10px; }
body.a2 .btn-primary { background: var(--a2-rose); color: var(--a2-cream); box-shadow: none; }
body.a2 .btn-primary:hover { background: var(--a2-rose-deep); color: var(--a2-cream); }
body.a2 .btn-secondary { background: transparent; border: 1px solid var(--a2-rose); color: var(--a2-rose); }
body.a2 .btn-secondary:hover { background: var(--a2-blush); color: var(--a2-rose-deep); border-color: var(--a2-rose); }

body.a2 .form-input,
body.a2 .form-select,
body.a2 .form-textarea { border-color: #dcc7c2; border-radius: 10px; }

body.a2 .modal { border-radius: 18px; }

/* ---------- Danas (dashboard.html, admin/danas.js) ---------- */
.a2-muted { color: var(--a2-muted); }
.a2-pad { padding: 8px 0; }
.a2-mt { margin-top: 14px; }
body.a2 .card.a2-card { padding: 8px 18px 12px; margin-bottom: 16px; display: block; }
.a2-card.a2-warnc { background: #fff8e8; border-color: #f0dba8; }
.a2-ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0 6px; }
.a2-ch h2, .a2-sn { font-family: var(--a2-serif); font-weight: 400; line-height: 1.15; }
.a2-ch h2 { font-size: 1.25rem; }
details.a2-card > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }

.a2-ib {
    border: 0; background: transparent; font-size: 1.4rem; line-height: 1;
    width: 44px; height: 44px; flex: none; border-radius: 50%;
    color: var(--a2-rose-deep); cursor: pointer;
}
.a2-ib:hover { background: var(--a2-blush); }

.a2-daynav { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; margin-bottom: 14px; }
.a2-dl { min-width: 0; }
.a2-dl b { display: block; font-weight: 600; }
.a2-dl small { color: var(--a2-rose-deep); font-weight: 600; }

.a2-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.a2-stat { background: #fff; border: 1px solid var(--a2-line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.a2-stat span { display: block; font-size: .82rem; color: var(--a2-muted); }
.a2-stat b { font-family: var(--a2-serif); font-weight: 400; font-size: 1.7rem; color: var(--a2-rose-deep); }

.a2-arow {
    display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 56px; padding: 12px 4px; border-top: 1px solid var(--a2-row);
    cursor: pointer; text-align: left;
}
.a2-card > .a2-arow:first-of-type, .a2-ch + .a2-arow, .a2-ch + div > .a2-arow:first-child { border-top: 0; }
.a2-arow:hover { background: #fff8f6; }
.a2-t { font-weight: 600; width: 48px; flex: none; color: var(--a2-rose-deep); }
.a2-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a2-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a2-who small { color: var(--a2-muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a2-arow.cancelled .a2-who b { text-decoration: line-through; color: var(--a2-muted); }

.a2-chip { display: inline-block; flex: none; border-radius: 999px; padding: .12em .75em; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.a2-chip.warn { background: #ffefc4; color: #7a5600; }
.a2-chip.rose { background: var(--a2-blush); color: var(--a2-rose-deep); }
.a2-chip.ok   { background: #dff3e6; color: #1e6b3b; }
.a2-chip.gray { background: #ece7e5; color: #6b6570; }

.a2-kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--a2-row); font-size: .95rem; }
.a2-kv:first-child { border-top: 0; }
.a2-kv span { color: var(--a2-muted); }
.a2-kv b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.a2-kv b small { color: var(--a2-muted); }

/* Revenue chart (prototype .rc / .rplot ...). */
.a2-rinfo { font-size: .95rem; color: var(--a2-muted); margin: 2px 0 12px; min-height: 1.5em; }
.a2-rinfo b { color: var(--a2-rose-deep); }
.a2-rc { position: relative; padding-left: 52px; }
.a2-rplot { position: relative; height: 190px; border-bottom: 1px solid #eadad6; }
.a2-gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--a2-row); height: 0; }
.a2-gl span { position: absolute; left: -52px; top: -9px; width: 46px; text-align: right; font-size: .72rem; font-style: normal; color: var(--a2-muted); }
.a2-rbars { position: absolute; inset: 0; display: flex; gap: 2px; align-items: stretch; }
.a2-rcol { flex: 1; display: flex; align-items: flex-end; min-width: 0; cursor: pointer; border-radius: 3px 3px 0 0; }
.a2-rcol:hover, .a2-rcol:focus-visible { background: rgba(166, 97, 90, .10); outline: none; }
.a2-rbar { width: 100%; background: linear-gradient(180deg, var(--a2-rose) 0%, #c48a84 100%); border-radius: 3px 3px 0 0; }
.a2-rcol.today .a2-rbar { background: var(--a2-rose-deep); }
.a2-rlab { display: flex; gap: 2px; margin-top: 6px; }
.a2-rlab span { flex: 1; min-width: 0; font-size: .68rem; color: var(--a2-muted); white-space: nowrap; text-align: center; }
.a2-rstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.a2-rstats div { background: #fff8f6; border-radius: 12px; padding: 10px 12px; min-width: 0; }
.a2-rstats span { display: block; font-size: .78rem; color: var(--a2-muted); }
.a2-rstats b { font-family: var(--a2-serif); font-weight: 400; font-size: 1.25rem; color: var(--a2-rose-deep); }
.a2-rstats small { display: block; font-size: .75rem; color: var(--a2-muted); }

/* Panel with one appointment: right side on a computer, from below on a phone. */
.a2-sheet[hidden] { display: none; }
.a2-scrim { position: fixed; inset: 0; background: rgba(35, 34, 43, .45); z-index: 50; }
.a2-panel { position: fixed; z-index: 51; background: #fff; overflow: auto; padding: 18px 22px 28px; }
.a2-sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.a2-sn { font-size: 1.7rem; margin-bottom: .2rem; }
.a2-kvs { margin: 14px 0; }
.a2-feeb { background: #fff3d6; border: 1px solid #f0dba8; border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin: 8px 0; }
.a2-acts { margin: 14px 0 8px; }
.a2-acts .btn { width: 100%; }
.a2-acts2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.a2-acts2 .btn:only-child { grid-column: 1 / -1; }
body.a2 .btn.a2-big { padding: .85em 1.4em; font-size: 1rem; }
body.a2-noscroll { overflow: hidden; }

/* "+" for a new appointment, phone only (the header button is shown on a computer). */
.a2-fab {
    display: none; position: fixed; right: 16px; bottom: 84px; z-index: 30;
    width: 58px; height: 58px; border-radius: 50%; border: 0;
    background: var(--a2-rose); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
    box-shadow: 0 6px 20px rgba(140, 77, 71, .4);
}

/* Manual booking dialog (Termini, Danas, Kalendar, Klijenti), as the booking in the prototype.
   The man-* classes stay only as hooks for admin.js; the look comes from the a2-* classes. */
.a2-bkp { margin-bottom: 14px; }
.a2-bkp-lbl { font-size: .88rem; color: var(--a2-muted); margin-bottom: 6px; }
.a2-bkp-bars { display: flex; gap: 6px; }
.a2-bkp-bars i { flex: 1; height: 4px; border-radius: 2px; background: #ecd9d5; }
.a2-bkp-bars i.on { background: var(--a2-rose); }
.a2-klist { border-top: 1px solid var(--a2-line); }
.a2-krow {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 12px 2px;
    background: none; border: 0; border-bottom: 1px solid var(--a2-line); cursor: pointer; font: inherit; color: inherit; text-align: left;
}
.a2-kn { font-family: var(--a2-serif); font-size: 1.25rem; }
.a2-km { margin-left: auto; color: var(--a2-muted); font-size: .88rem; white-space: nowrap; }
.a2-krow:hover .a2-kn { color: var(--a2-rose); }
.a2-bkback { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 4px; }
.a2-ktitle { font-family: var(--a2-serif); font-weight: 400; font-size: 1.4rem; margin-bottom: 10px; }
.a2-scard { background: #fff; border: 1px solid var(--a2-line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.a2-scard h4 { font-weight: 500; font-size: 1rem; }
.a2-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.a2-opt {
    display: flex; gap: 10px; align-items: center; min-height: 44px; padding: .5em 1em; cursor: pointer;
    border: 1px solid #e3cfca; border-radius: 999px; background: var(--a2-cream); font: inherit; font-weight: 500; font-size: .92rem; color: var(--a2-ink);
}
.a2-opt span:last-child { color: var(--a2-rose-deep); font-weight: 600; }
.a2-opt:hover { border-color: var(--a2-rose); }
.a2-addons { padding: 14px 16px; border: 1px dashed #dcbfb9; border-radius: 16px; }
.a2-addons h4 { font-weight: 500; margin-bottom: 6px; }
.a2-addons label { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 4px 0; cursor: pointer; font-size: .95rem; }
.a2-addons input { width: 18px; height: 18px; accent-color: var(--a2-rose); flex: none; }
.a2-ap { margin-left: auto; color: var(--a2-muted); white-space: nowrap; }
.a2-picked {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--a2-blush); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px;
}
.a2-picked small { display: block; color: var(--a2-rose-deep); font-size: .78rem; }
.a2-picked b { font-weight: 600; }
.a2-rooms { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.a2-room {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 14px;
    background: #fff; border: 1px solid var(--a2-line); border-radius: 12px; cursor: pointer; font: inherit; font-weight: 500; color: var(--a2-ink); text-align: left;
}
.a2-room:hover { border-color: var(--a2-rose); }
.a2-room.man-room-selected { border-color: var(--a2-rose); box-shadow: 0 0 0 1px var(--a2-rose); background: #fff8f6; }
.a2-room.taken { opacity: .55; cursor: default; background: #f7f4f3; }
.a2-room small { color: var(--a2-muted); font-weight: 400; }

/* Termini (appointments.html): filters above the list. */
.a2-filt { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.a2-filt .form-group { margin: 0; }
/* Date fields have a wide built-in minimum; let them shrink to the column. */
.a2-filt > * { min-width: 0; }
body.a2 .a2-filt input[type="date"] { width: 100%; min-width: 0; }
.a2-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.a2-fc span { margin-left: 6px; font-weight: 600; opacity: .75; }

/* ---------- Kalendar (calendar.html, admin/calendar.js) ---------- */
.a2-calbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.a2-calbar .a2-daynav { margin: 0; flex: 1 1 420px; }
.a2-seg2 { display: flex; background: #f3e6e2; border-radius: 10px; padding: 3px; }
.a2-seg2 button { border: 0; background: transparent; padding: .4em 1em; min-height: 38px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; }
.a2-seg2 button[aria-pressed="true"] { background: #fff; color: var(--a2-rose-deep); box-shadow: 0 1px 3px rgba(140, 77, 71, .2); }
.a2-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.a2-fc { flex: none; border: 1px solid #e3cfca; background: #fff; border-radius: 999px; padding: .4em 1em; min-height: 40px; font: inherit; font-weight: 500; font-size: .9rem; cursor: pointer; }
.a2-fc[aria-pressed="true"] { background: var(--a2-rose); border-color: var(--a2-rose); color: var(--a2-cream); }

.a2-calwrap {
    display: flex; overflow: auto; overscroll-behavior: contain;
    height: calc(100vh - 330px); height: calc(100dvh - 330px); min-height: 440px;
    border: 1px solid var(--a2-line); border-radius: 16px; background: #fff;
}
/* align-self: the hours column is as tall as the whole day, not only the visible part,
   so its white background covers the days scrolled under it. */
.a2-axis { width: 46px; flex: none; align-self: flex-start; position: sticky; left: 0; background: #fff; z-index: 4; border-right: 1px solid var(--a2-row); }
.a2-axis .a2-colh { z-index: 5; }
.a2-ab { position: relative; }
.a2-ab span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .72rem; color: var(--a2-muted); }
.a2-ab span:first-child { transform: translateY(4px); }
.a2-cols { display: grid; flex: 1; min-width: 0; }
.a2-col { border-left: 1px solid var(--a2-row); min-width: 0; }
.a2-colh {
    position: sticky; top: 0; z-index: 3; background: #fff; height: 52px; padding: 6px 8px;
    border-bottom: 1px solid var(--a2-line); text-align: center; overflow: hidden;
}
.a2-colh b { display: block; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a2-colh small { display: block; color: var(--a2-muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a2-colh.tod { background: var(--a2-blush); }
.a2-cb { position: relative; cursor: cell; }
.a2-hl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--a2-row); pointer-events: none; }
.a2-ev {
    position: absolute; left: 3px; right: 3px; z-index: 1; overflow: hidden; cursor: pointer;
    border-radius: 8px; border-left: 4px solid; padding: 3px 6px; font-size: .78rem; line-height: 1.25;
}
.a2-ev small { display: block; color: var(--a2-muted); font-size: .72rem; }
.a2-ev.pending   { background: #fff3d6; border-color: #e0b04a; }
.a2-ev.confirmed { background: #fbdcd7; border-color: var(--a2-rose); }
.a2-ev.done      { background: #dff3e6; border-color: #3d9a63; }
.a2-ev.noshow    { background: #ebe6e4; border-color: #9a9096; color: var(--a2-muted); }
.a2-ev:focus-visible { outline: 2px solid var(--a2-rose-deep); outline-offset: 1px; }
.a2-buf {
    position: absolute; left: 3px; right: 3px; pointer-events: none; border-radius: 0 0 8px 8px;
    background: repeating-linear-gradient(45deg, #f7ece9, #f7ece9 4px, #fff 4px, #fff 8px);
}
.a2-blk {
    position: absolute; left: 3px; right: 3px; z-index: 1; overflow: hidden; cursor: pointer;
    border-radius: 8px; padding: 4px 6px; font-size: .75rem; color: var(--a2-muted);
    background: repeating-linear-gradient(45deg, #e9e4e2, #e9e4e2 6px, #f3efee 6px, #f3efee 12px);
}
.a2-blk.a2-pause { cursor: default; }
.a2-shade { position: absolute; left: 0; right: 0; background: #f6f2f0; opacity: .85; }
.a2-closed { position: relative; padding: 20px 8px; text-align: center; color: var(--a2-muted); font-size: .9rem; pointer-events: none; }
.a2-nowl { position: absolute; left: 0; right: 0; height: 2px; background: #c0392b; z-index: 2; pointer-events: none; }
.a2-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: .82rem; color: var(--a2-muted); }
.a2-ld { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.a2-ld.warn { background: #e0b04a; }
.a2-ld.rose { background: var(--a2-rose); }
.a2-ld.ok   { background: #3d9a63; }
.a2-ld.gray { background: #9a9096; }
.a2-ld.blk  { background: repeating-linear-gradient(45deg, #d9d2cf, #d9d2cf 2px, #f3efee 2px, #f3efee 4px); }
.a2-ld.off  { background: #f6f2f0; border: 1px solid #e3dcd9; }

/* ---------- Klijenti (clients.html) ---------- */
.a2-search {
    width: 100%; padding: .8em 1em; min-height: 44px; margin-bottom: 10px;
    border: 1px solid #dcc7c2; border-radius: 12px; background: #fff; font: inherit;
}
/* Search with the "+ Novi klijent" button next to it. */
.a2-sbar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.a2-sbar .a2-search { margin: 0; flex: 1 1 auto; min-width: 0; }
.a2-sbar .btn { flex: none; min-height: 44px; white-space: nowrap; }
.a2-crow {
    display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 4px;
    border-top: 1px solid var(--a2-row); color: var(--a2-ink); text-decoration: none;
}
.a2-crow:first-child { border-top: 0; }
.a2-crow:hover { background: #fff8f6; color: var(--a2-ink); }
.a2-cm { display: flex; align-items: center; gap: 10px; flex: none; }
.a2-vis { font-weight: 600; color: var(--a2-rose-deep); white-space: nowrap; font-size: .9rem; }
.a2-hb { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.a2-lnk {
    background: none; border: 0; padding: 0 2px; min-height: 32px; cursor: pointer; font: inherit;
    color: var(--a2-rose-deep); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px;
}
.a2-kv b .a2-lnk { margin-left: 8px; }
.a2-t.a2-td { width: 52px; line-height: 1.2; }
.a2-t.a2-td small { display: block; font-weight: 400; font-size: .72rem; color: var(--a2-muted); }

/* Loyalty card: 15 fields, the 5th, 10th and 15th are the discount visits. */
.a2-lbar { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; margin: 14px 0 34px; }
.a2-lcell { position: relative; height: 26px; border-radius: 6px; background: #f1e2de; }
.a2-lcell.done { background: var(--a2-rose); }
.a2-lcell.disc { background: #fff; border: 2px solid #e3cfca; display: grid; place-items: center; }
.a2-lcell.disc.done { background: var(--a2-rose-deep); border-color: var(--a2-rose-deep); color: var(--a2-cream); }
.a2-lcell.next { border-color: var(--a2-rose); box-shadow: 0 0 0 3px var(--a2-blush); }
.a2-lcell i { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--a2-muted); }
.a2-lcell.disc.done i { color: var(--a2-cream); }
.a2-lcell em { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .78rem; font-weight: 600; color: var(--a2-rose-deep); white-space: nowrap; }
.a2-lprog { margin-bottom: 6px; }
textarea.a2-note { width: 100%; margin: 6px 0 10px; }
.a2-arow[hidden] { display: none; }
.a2-more { margin: 8px 0 4px; }
.a2-hint { font-size: .85rem; color: #7a5600; background: #fff3d6; border: 1px solid #f0dba8; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }

/* ---------- Postavke → Usluge (services.html) ---------- */
.a2-row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-bottom: 12px; }
.a2-row2 .a2-search { margin: 0; }
body.a2 .a2-sel { min-height: 44px; border-radius: 12px; }
.a2-srow {
    display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 4px;
    border-top: 1px solid var(--a2-row); cursor: pointer;
}
.a2-ch + .a2-srow { border-top: 0; }
.a2-srow:hover { background: #fff8f6; }
.a2-srow.off { opacity: .55; }
/* Long service names wrap instead of being cut. */
.a2-srow .a2-who b, .a2-srow .a2-who small { white-space: normal; }
.a2-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* align-items: end keeps the three fields in one line when a label wraps on a phone. */
.a2-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.a2-hint-plain { font-size: .82rem; color: var(--a2-muted); margin: 4px 0 0; }
.a2-checks { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.a2-tg { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-size: .95rem; }
.a2-tg input { accent-color: var(--a2-rose); width: 18px; height: 18px; }
.a2-formdanger { border-top: 1px solid var(--a2-row); padding-top: 12px; margin-bottom: 12px; }

/* ---------- Postavke → Terapeuti (therapists.html) ---------- */
.a2-thc.off { opacity: .6; }
.a2-thn { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.a2-thn small { font-size: .85rem; overflow-wrap: anywhere; }
.a2-thchips { display: flex; gap: 6px; flex-wrap: wrap; }
.a2-thb { margin: 4px 0 8px; }
/* Services of a therapist: one folded block per category. */
.a2-tcat { border: 1px solid var(--a2-line); border-radius: 10px; padding: 2px 12px; margin-bottom: 6px; }
.a2-tcat summary { cursor: pointer; padding: 10px 0; min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 500; }
.a2-chk { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: .93rem; cursor: pointer; }
.a2-chk input { margin-top: .2rem; accent-color: var(--a2-rose); width: 18px; height: 18px; flex: none; }
.a2-chk.a2-all { font-weight: 600; border-bottom: 1px solid var(--a2-row); }

/* ---------- Postavke → Radno vrijeme (working-hours.html, admin/radno-vrijeme.js) ---------- */
.a2-mb { margin-bottom: 12px; }
.a2-small { font-size: .88rem; }
.a2-h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 6px; }
/* Pregled: therapists × days */
.a2-tblw { overflow-x: auto; }
.a2-wt { border-collapse: separate; border-spacing: 0; width: 100%; }
.a2-wt th { font-size: .78rem; font-weight: 600; color: var(--a2-muted); text-align: center; padding: 6px 4px; }
.a2-wt th small { display: block; font-weight: 400; }
.a2-wt th.tod { color: var(--a2-rose-deep); }
.a2-wt td { padding: 4px; border-top: 1px solid var(--a2-row); text-align: center; }
.a2-wt td.nm { text-align: left; white-space: nowrap; padding-right: 8px; }
.a2-ro {
    display: block; position: relative; min-height: 46px; padding: 12px 4px; border-radius: 10px;
    border: 1px solid #f0d9d4; background: var(--a2-blush); color: var(--a2-rose-deep); font-weight: 600; font-size: .86rem;
}
.a2-ro small { display: block; font-weight: 400; font-size: .68rem; margin-top: 1px; }
.a2-ro.off { background: #f7f4f3; border-color: #ece7e5; color: #a09aa6; font-weight: 400; }
.a2-wdot { position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #e0a02f; }
.a2-nmb {
    background: none; border: 0; text-align: left; font: inherit; font-weight: 600; padding: 8px 8px 8px 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: flex-start; border-radius: 10px; color: var(--a2-ink); min-height: 44px;
}
.a2-nmb small { font-weight: 400; color: var(--a2-muted); font-size: .78rem; }
.a2-nmb .go { color: var(--a2-rose-deep); font-size: .78rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* Uredi: weekly schedule, one block per day with its intervals */
.a2-whd { border-top: 1px solid var(--a2-row); padding: 10px 0; }
.a2-whdh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a2-whd.off .a2-whi { display: none; }
.a2-whd.off .a2-whdh b { color: var(--a2-muted); font-weight: 500; }
.a2-whi { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; align-items: flex-start; }
.a2-wint, .a2-wrr { display: flex; align-items: center; gap: 6px; }
body.a2 .a2-wint input, body.a2 .a2-wrr input { width: 118px; min-height: 40px; padding: .5em .5em; }
.a2-ib-sm { width: 36px; height: 36px; font-size: 1rem; }
.a2-werr { color: #a33a32; font-size: .88rem; min-height: 1.2em; margin: 8px 0; }
/* Uredi: one row per date of the week */
.a2-wdn { display: flex; flex-direction: column; width: 110px; flex: none; }
.a2-wdn small { color: var(--a2-muted); font-size: .8rem; }
.a2-wtags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.a2-wtags .a2-chip { white-space: normal; }
/* Day dialog: exception and blocks */
.a2-wexist { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--a2-row); font-size: .93rem; }
.a2-wblk { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: center; }
body.a2 .a2-wblk input[type="date"] { width: 160px; min-height: 40px; }
body.a2 .a2-wblk input[type="text"] { flex: 1 1 180px; min-height: 40px; }
#whDay .a2-tg { margin: 4px 0; }
#whDay .a2-wrr { margin-bottom: 8px; }

/* ---------- Postavke → Prostorije (rooms.html) ---------- */
.a2-rmrow {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
    padding: 12px 4px; border-top: 1px solid var(--a2-row);
}
.a2-rmrow:first-child { border-top: 0; }
.a2-rmrow.off .a2-who { opacity: .55; }
.a2-rmrow .a2-who b, .a2-rmrow .a2-who small { white-space: normal; }
.a2-rmb { flex-wrap: nowrap; }

/* ---------- Newsletter (newsletter.html, admin/newsletter.js) ---------- */
.a2-nlrow {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 4px;
    background: none; border: 0; border-top: 1px solid var(--a2-row); font: inherit; color: inherit;
    text-align: left; cursor: pointer;
}
.a2-nlrow:first-child { border-top: 0; }
.a2-nlrow:hover { background: #fff8f6; }
.a2-nlrow .a2-who b { white-space: normal; }
/* Editor left, preview right; one column below 1180 px. */
.a2-nlgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.a2-nlcol { min-width: 0; }
.a2-nlfg { margin-bottom: 18px; }
.a2-nlfg .form-label { display: block; }
.a2-nlcount { display: block; text-align: right; color: var(--a2-muted); font-size: .8rem; margin-top: 4px; }
.a2-nlstatus { font-size: .88rem; color: var(--a2-rose-deep); min-height: 1.2em; margin: 6px 0 0; }
.a2-nlacts { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.a2-nlacts .btn { min-height: 44px; }
.a2-nldirty { font-size: .85rem; color: #7a5600; margin: 0 0 8px; }
.a2-nlrecip { margin: 4px 0 12px; }
.a2-nlask { line-height: 1.6; margin-bottom: 12px; }
/* Image list: thumbnail, name and size, Gore / Dolje / Ukloni. */
.a2-nlthumbs { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.a2-nlthumbs[hidden] { display: none; }
.a2-nlthumb {
    display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    border: 1px solid var(--a2-line); border-radius: 12px; padding: 8px;
}
.a2-nlthumb img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; background: #f7f1ee; display: block; }
.a2-nlthumb-info { display: flex; flex-direction: column; min-width: 0; }
.a2-nlthumb-info small { color: var(--a2-muted); font-size: .82rem; }
.a2-nlthumb-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.a2-nlthumb-acts .btn { min-height: 40px; }
.a2-nlimg-err { min-height: 40px; }
/* Preview: the salon e-mail frame (EmailService.emailFrame), smaller. */
.a2-nlmail { background: #f7f1ee; padding: 16px; border-radius: 12px; margin-bottom: 8px; font-family: Arial, sans-serif; color: #3b3330; }
.a2-nlmail-card { max-width: 620px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.a2-nlmail-logo { margin: 0 0 4px; color: #c96f78; font-family: Georgia, serif; font-size: 24px; }
.a2-nlmail-title { margin: 0 0 18px; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.a2-nlmail-img { display: block; width: 100%; max-width: 600px; height: auto; margin: 0 auto 16px; border: 0; min-height: 24px; background: #f7f1ee; }
.a2-nlmail-noimg { border: 2px dashed #e3cfc9; border-radius: 12px; padding: 32px 12px; text-align: center; color: #8a7f7a; margin: 0 0 16px; }
.a2-nlmail-text { font-size: 16px; line-height: 1.7; margin-top: 8px; overflow-wrap: anywhere; }
.a2-nlmail-hr { border: none; border-top: 1px solid #eee; margin: 22px 0; }
.a2-nlmail-foot { font-size: 13px; color: #8a7f7a; margin: 0; }
.a2-nlmail-link { color: #c96f78; text-decoration: underline; }
/* Sent newsletter: summary and deliveries. */
.a2-nlsum progress { width: 100%; height: 10px; accent-color: var(--a2-rose); margin: 4px 0 8px; }
.a2-nlprog { font-weight: 600; color: var(--a2-rose-deep); margin: 4px 0; }
.a2-nldl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 6px; font-size: .9rem; }
.a2-nldl dt { color: var(--a2-muted); }
.a2-nldl dd { margin: 0; }
.a2-nldrow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--a2-row); }
.a2-nldrow:first-child { border-top: 0; }
.a2-nldrow .a2-who b, .a2-nldrow .a2-who small { white-space: normal; overflow-wrap: anywhere; }
.a2-nlerr { color: #a33a32 !important; }
@media (max-width: 1180px) {
    .a2-nlgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .a2-nlthumb { grid-template-columns: 72px minmax(0, 1fr); }
    .a2-nlthumb img { width: 72px; height: 54px; }
    .a2-nlthumb-acts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
    .a2-nlacts .btn { flex: 1 1 100%; }
    .a2-nlmail { padding: 8px; }
    .a2-nlmail-card { padding: 16px; }
}

/* ---------- Therapist account (therapist/calendar.html, therapist/therapist-shell.js) ---------- */
.a2-me { padding: 4px 1em 10px; border-bottom: 1px solid var(--a2-row); min-width: 0; }
.a2-me small { display: block; color: var(--a2-muted); font-size: .78rem; }
.a2-me b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.a2-me-top { min-width: 0; font-weight: 600; color: var(--a2-rose-deep); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a2-tempty { background: #fff; border: 1px solid var(--a2-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; color: var(--a2-muted); }
/* Prethodni / Sljedeći dan under the calendar: phone only, in Dan. */
.a2-tnav { display: none; }

@media (min-width: 861px) {
    .a2-panel { top: 0; right: 0; bottom: 0; width: 480px; border-left: 1px solid var(--a2-line); box-shadow: -10px 0 40px rgba(0, 0, 0, .15); }
}

/* ---------- Login expiry (admin-shell.js) ----------
   The bar floats over the top of the page, so the content under it does not jump. */
.a2-sess {
    position: fixed; z-index: 60; top: 12px; left: calc(240px + 16px); right: 16px;
    max-width: 760px; margin: 0 auto;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    background: #fff; border: 1px solid var(--a2-rose); border-radius: 14px;
    padding: 10px 14px; box-shadow: 0 8px 28px rgba(140, 77, 71, .22);
    animation: a2SessIn .25s ease;
}
.a2-sess[hidden], .a2-sess-over[hidden], .a2-sess [hidden] { display: none; }
.a2-sess-text { flex: 1 1 260px; margin: 0; color: var(--a2-ink); }
.a2-sess-clock { font-variant-numeric: tabular-nums; color: var(--a2-rose-deep); }
.a2-sess-note { flex-basis: 100%; order: 3; margin: 0; color: #b42318; font-size: .92rem; }
.a2-sess-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.a2-sess-acts .btn { min-height: 40px; }
.a2-sess-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.a2-sess-over {
    position: fixed; inset: 0; z-index: 200; padding: 16px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(35, 34, 43, .45); backdrop-filter: blur(3px);
}
.a2-sess-box {
    background: #fff; border-radius: 18px; padding: 26px 24px; max-width: 420px; width: 100%;
    text-align: center; box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
}
.a2-sess-title { font-family: var(--a2-serif); font-weight: 400; font-size: 1.6rem; margin: 0 0 .4rem; }
.a2-sess-box p { color: var(--a2-muted); margin: 0 0 18px; }
.a2-sess-box .btn { width: 100%; min-height: 46px; }
@keyframes a2SessIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .a2-sess { animation: none; } }

/* ---------- Phone ---------- */
@media (max-width: 860px) {
    .a2-sess { top: 8px; left: 8px; right: 8px; padding: 10px 12px; }
    .a2-sess-acts { width: 100%; }
    .a2-sess-acts .btn { flex: 1 1 0; min-height: 44px; }

    body.a2 .app-shell { display: block; }
    .a2-side { display: none; }
    body.a2 .main-content { padding: 0 14px 110px; }

    .a2-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 40;
        margin: 0 -14px 14px;
        padding: 8px 14px;
        background: #fff;
        border-bottom: 1px solid var(--a2-line);
    }
    .a2-top .a2-logo img { height: 44px; width: auto; display: block; }
    .a2-top .a2-logout { padding: .5em .8em; font-size: .9rem; min-height: 44px; }

    .a2-tabs {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        background: #fff;
        border-top: 1px solid var(--a2-line);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    }
    .a2-tabs .a2-navb {
        flex-direction: column;
        gap: 2px;
        font-size: .72rem;
        padding: .4em 0;
        text-align: center;
        align-items: center;
    }
    .a2-tabs .a2-navb[aria-current="page"] { background: var(--a2-blush); color: var(--a2-rose-deep); }
    .a2-tabs.a2-tabs-2 { grid-template-columns: repeat(2, 1fr); }
    .a2-tnav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
    .a2-tnav[hidden] { display: none; }

    body.a2 .page-title { font-size: 1.9rem; }
    body.a2 .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }

    /* Danas on a phone: no sideways scrolling, buttons big enough to tap. */
    .a2-dsk { display: none; }
    .a2-fab { display: block; }
    .a2-stats { grid-template-columns: 1fr 1fr; }
    .a2-stats .a2-stat:first-child { grid-column: 1 / -1; }
    .a2-stat b { font-size: 1.45rem; }
    .a2-daynav { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 4px; }
    .a2-dl b { font-size: .95rem; }
    .a2-danas .btn, .a2-panel .btn { min-height: 44px; }
    .a2-panel { left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
    .a2-sn { font-size: 1.5rem; }
    .a2-rc { padding-left: 44px; }
    .a2-gl span { left: -44px; width: 38px; font-size: .66rem; }
    .a2-rlab span { font-size: .6rem; }
    .a2-rplot { height: 170px; }
    .a2-rstats { gap: 6px; }
    .a2-rstats div { padding: 8px; }
    .a2-rstats b { font-size: 1rem; }
    .a2-rstats span { font-size: .68rem; }
    .a2-rstats small { font-size: .66rem; }

    /* Kalendar on a phone: Dan / Tjedan under the day navigation (prototype). Tjedan scrolls
       sideways inside the grid; the hours column and the day headers stay in place. */
    .a2-calbar { display: block; }
    .a2-calbar .a2-daynav { margin-bottom: 8px; }
    .a2-seg2 { width: max-content; margin-bottom: 10px; }
    .a2-seg2 button { min-height: 44px; padding: .4em 1.3em; }
    .a2-fc { min-height: 44px; }
    .a2-calwrap { height: calc(100vh - 360px); height: calc(100dvh - 360px); min-height: 400px; }
    .a2-axis { width: 40px; }

    /* Klijenti on a phone */
    .a2-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 0; }
    .a2-hb { width: 100%; }
    .a2-hb .btn { flex: 1 1 0; }
    .a2-lnk { min-height: 44px; }
    .a2-lbar { gap: 3px; }
    .a2-lcell { height: 24px; border-radius: 5px; }
    .a2-lcell em { font-size: .7rem; }
    .a2-crow .a2-chip { font-size: .72rem; }
    .a2-cm { flex-direction: column; align-items: flex-end; gap: 4px; }

    /* Radno vrijeme on a phone: the table fits without sideways scrolling (prototype). */
    .a2-wt { table-layout: fixed; }
    .a2-wt th:first-child, .a2-wt td.nm { width: 74px; }
    .a2-wt td.nm { padding-right: 4px; white-space: normal; }
    .a2-nmb { font-size: .82rem; }
    .a2-nmb small:not(.go) { display: none; }
    .a2-wt td { padding: 3px 1px; }
    .a2-wt th { padding: 6px 1px; font-size: .7rem; }
    .a2-ro { font-size: .72rem; padding: 12px 1px; overflow-wrap: anywhere; }
    .a2-ro small { font-size: .58rem; }
    .a2-wdn { width: 96px; }
    body.a2 .a2-wint input, body.a2 .a2-wrr input { width: 112px; min-height: 44px; }
    .a2-ib-sm { width: 44px; height: 44px; }
    body.a2 .a2-wblk input[type="date"] { width: 100%; }

    /* Termini on a phone: dates side by side, Osvježi below. */
    .a2-filt { grid-template-columns: 1fr 1fr; }
    .a2-filt .btn { grid-column: 1 / -1; }

    /* Prostorije on a phone: name and switch on top, the two buttons below. */
    .a2-rmrow { grid-template-columns: minmax(0, 1fr) auto; }
    .a2-rmb { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }

    /* Terapeuti on a phone: the four buttons in two rows of two. */
    .a2-thb { display: grid; grid-template-columns: 1fr 1fr; }
    .a2-chk { min-height: 40px; }

    /* Usluge on a phone */
    .a2-row2 { grid-template-columns: 1fr; }
    .a2-grid2 { grid-template-columns: 1fr; gap: 0; }
    .a2-grid3 { gap: 8px; }
    .a2-tg { min-height: 44px; }
}
