/* Simple Office: the Staff page (staff.js). Built on app.css's tokens, so it follows the light and dark theme. Uses
   start / end (inline) properties only, so the same file serves the Arabic right-to-left layout. */
:root { --staff: #7c3aed; --staff-soft: #f1ebfe; }
[data-bs-theme="dark"] { --staff: #b195ff; --staff-soft: rgba(177, 149, 255, .14); }
.tone-staff { --tone: var(--staff); --tone-soft: var(--staff-soft); }

.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.st-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--staff-soft);
  color: var(--staff); font-weight: 600; text-decoration: none; }
.st-banner:hover { filter: brightness(.97); }

/* the clock */
.st-clock { padding: 20px; text-align: center; }
.st-clock-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted, #5a6270); }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa3b2; }
.st-clock.is-in .st-dot { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
.st-clock.is-in .st-clock-state { color: #16a34a; }
.st-clock-time { font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.st-big { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.st-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.st-bar span { display: block; height: 100%; background: var(--staff); border-radius: 99px; }
.st-date { min-width: 110px; color: var(--muted, #5a6270); font-size: .9rem; }
.st-month { min-width: 150px; opacity: 1 !important; font-weight: 600; }
.st-table td, .st-table th { vertical-align: middle; }

/* the shift plan */
.st-shifts { min-width: 860px; table-layout: fixed; }
.st-shifts th, .st-shifts td { text-align: center; vertical-align: top; padding: 6px; border-inline-start: 1px solid var(--line); }
.st-shifts th:first-child, .st-shifts td:first-child { width: 190px; text-align: start; border-inline-start: 0; }
.st-shifts th.is-today, .st-shifts td.is-today { background: var(--staff-soft); }
.st-shifts th.is-off, .st-shifts td.is-off { background: var(--surface-2); }
.st-shifts td[data-add] { cursor: pointer; }
.st-shifts td[data-add]:hover { outline: 2px dashed var(--staff); outline-offset: -3px; }
.st-person { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.st-shift { display: block; width: 100%; margin-bottom: 4px; padding: 4px 6px; border: 0; border-radius: 8px; background: var(--staff); color: #fff; font-size: .82rem; line-height: 1.25; text-align: center; }
.st-shift span { display: block; font-size: .75rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-shift:disabled { opacity: 1; cursor: default; }
.st-away { display: block; margin-bottom: 4px; padding: 3px 6px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: .78rem; }
[data-bs-theme="dark"] .st-away { background: rgba(245, 158, 11, .18); color: #fcd34d; }
.st-away i { margin-inline-end: 4px; }
.st-plus { display: none; color: var(--staff); font-size: 1.1rem; }
.st-shifts td[data-add]:hover .st-plus { display: inline; }

/* the calendar: time off and shifts (calendar.js) */
.cal-chip.cal-leave { background: #fef3c7; color: #92400e; border-color: transparent; }
[data-bs-theme="dark"] .cal-chip.cal-leave { background: rgba(245, 158, 11, .18); color: #fcd34d; }
.cal-chip.cal-shift { background: var(--staff-soft); color: var(--staff); border-color: transparent; }

/* A time-off row: who, what and when, then the status and the buttons. On a phone the buttons go on their own line
   under the text instead of squeezing the name out and spilling past the card. */
.st-leave { flex-wrap: wrap; row-gap: 8px; }
.st-leave > .flex-grow-1 { flex: 1 1 180px; }
.st-leave-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-inline-start: auto; }
.st-leave-acts .btn-link { padding-inline: 4px; }
@media (max-width: 575.98px) {
  .st-leave-acts { flex-basis: 100%; margin-inline-start: 0; }
  .st-leave-acts .btn-link { margin-inline-start: auto; }
}
