/* The settings look (macOS-like grouped lists) of both web apps: the partner panel and the admin site;
   each app's own parts stay in its app.css.
   A card is a white rounded group of rows; a hint about a card sits under it (st-foot); a gray caption above a list
   names it (st-head); a row that opens something ends with a chevron; actions on a list are centered rows. */
:root {
    --st-accent: #007aff;
    --st-accent-text: #0a64d6;
    --st-accent-bg: #e6f0fd;
    --st-text: #1d1d1f;
    --st-text-2: #6e6e73;
    --st-text-3: #a1a1a6;
    --st-border: rgba(0, 0, 0, 0.1);
    --st-border-strong: rgba(0, 0, 0, 0.18);
    --st-bg: #f5f5f7;
    --st-warning: #ff9f0a;
    --st-danger: #d70015;
    --st-success: #248a3d;
}

.st-page { max-width: 600px; margin: 0 auto; background: var(--st-bg); border-radius: 12px; padding: 20px 20px 28px; font-size: 14px; color: var(--st-text); }
.st-card { background: #fff; border: 0.5px solid var(--st-border); border-radius: 10px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 14px; }
.st-row + .st-row { border-top: 0.5px solid var(--st-border); }
.st-click { cursor: pointer; }
.st-value { color: var(--st-text-2); display: flex; align-items: center; gap: 5px; white-space: nowrap; min-width: 0; }
.st-sub { display: block; font-size: 12px; color: var(--st-text-2); }
.st-foot { font-size: 12px; color: var(--st-text-2); padding: 6px 14px 18px; line-height: 1.5; min-height: 42px; }
.st-head { font-size: 12px; color: var(--st-text-2); padding: 0 14px 6px; }
.st-ok { color: var(--st-success); }
.st-error { color: var(--st-danger); font-size: 13px; margin-top: 8px; }
.st-link { color: var(--st-accent-text); cursor: pointer; text-decoration: none; }
.st-link:hover { text-decoration: underline; color: var(--st-accent-text); }
.st-chevron { color: var(--st-text-3); }
.st-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--st-warning); display: inline-block; flex-shrink: 0; vertical-align: middle; }
.st-foot .st-dot { margin-right: 5px; vertical-align: middle; }
.st-closed { color: var(--st-text-3); font-size: 13px; }
.st-action-row { justify-content: center; color: var(--st-accent-text); cursor: pointer; }
.st-action-row.st-danger { color: var(--st-danger); }
.st-action-row > span { display: inline-flex; align-items: center; gap: 8px; }

.st-icon-btn { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--st-accent-text); background: var(--st-accent-bg); flex-shrink: 0; }
.st-icon-btn.st-small { width: 24px; height: 24px; }
.st-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--st-bg); border: 0.5px solid var(--st-border); }
.st-chip-x { border: 0; background: none; padding: 0 2px; color: var(--st-text-3); cursor: pointer; display: inline-flex; align-items: center; }
.st-chip-x:hover { color: var(--st-text); }

.st-switch { width: 40px; height: 24px; border-radius: 12px; background: #e3e3e8; position: relative; border: 0; padding: 0; cursor: pointer; flex-shrink: 0; transition: background 0.15s; }
.st-switch.st-on { background: #34c759; }
.st-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: left 0.15s; }
.st-switch.st-on::after { left: 18px; }
.st-switch:disabled { opacity: 0.5; cursor: default; }

/* A value that opens the browser's own list when clicked: the select is invisible on top of the text. */
.st-select { position: relative; cursor: pointer; }
.st-select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; }

/* A number typed right in its row (iOS settings): no box, right-aligned, gray like the other values, dark while typing. */
.st-inline-input { border: 0; background: none; padding: 0; margin: 0; width: 130px; height: 24px; text-align: right; font-size: 14px; color: var(--st-text-2); outline: none; }
.st-inline-input:focus { color: var(--st-text); }

.st-popover { position: absolute; background: #fff; border: 0.5px solid var(--st-border-strong); border-radius: 10px; padding: 5px; font-size: 13px; z-index: 30; min-width: 160px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.st-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; background: none; text-align: left; color: inherit; white-space: nowrap; cursor: pointer; font-size: 13px; }
.st-menu-item:hover { background: var(--st-accent); color: #fff; }
.st-menu-overlay { position: fixed; inset: 0; z-index: 25; }


.st-seg { display: inline-flex; flex-wrap: wrap; background: var(--st-bg); border: 0.5px solid var(--st-border); border-radius: 8px; padding: 2px; font-size: 13px; }
.st-seg > button { padding: 4px 12px; border-radius: 6px; border: 0.5px solid transparent; background: none; color: var(--st-text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.st-seg > button.st-on { background: #fff; color: var(--st-text); border-color: var(--st-border); }

.st-btn { height: 32px; font-size: 13px; padding: 0 14px; border: 0.5px solid var(--st-border-strong); border-radius: 8px; background: #fff; color: var(--st-text); cursor: pointer; }
.st-btn-primary { background: var(--st-accent); color: #fff; border-color: transparent; }
.st-btn-danger { background: #ff3b30; color: #fff; border-color: transparent; }
.st-btn:disabled { opacity: 0.6; cursor: default; }
.st-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; align-items: center; }
/* One order in every sheet, so the hand learns it: an action on the item (delete, cancel, a status) alone on the left,
   Save next to Close, Close always last on the right. */
.st-actions .st-btn-side { margin-right: auto; }

.st-warn { border: 0.5px solid #f3c46b; background: #fff6e5; color: #7a4a00; border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
.st-warn a { color: inherit; text-decoration: underline; }


.st-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); z-index: 1050; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px; overflow-y: auto; }
/* Beside the sidebar (MainLayout's 240px column), the sheet sits over the page it belongs to, not the window's middle; the
   dimming still covers the sidebar. Pages without the sidebar (EmptyLayout) keep the window's middle. */
@media (min-width: 641px) { .sidebar ~ main .st-overlay { padding-left: calc(240px + 16px); } }
.st-sheet { width: min(460px, 100%); background: #fff; border: 0.5px solid var(--st-border-strong); border-radius: 12px; padding: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); font-size: 14px; color: var(--st-text); }
.st-sheet h3 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
/* Cards stacked in a sheet (a new branch: its texts, then its zone) have no foot between them to space them; zero specificity, so a sheet's own spacing (gap-card) wins. */
:where(.st-sheet .st-card + .st-card) { margin-top: 12px; }
.st-label { display: block; font-size: 12px; color: var(--st-text-2); margin: 12px 0 4px; }
.st-hint { font-size: 12px; color: var(--st-text-2); margin-top: 8px; line-height: 1.5; }

.st-cal { border: 0.5px solid var(--st-border); border-radius: 10px; padding: 8px; }
.st-cal-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.st-cal-nav { width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--st-accent-text); }
.st-cal-nav:hover { background: var(--st-bg); }
.st-cal-nav:disabled { color: var(--st-text-3); cursor: default; background: none; }
.st-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.st-cal-dow { font-size: 11px; color: var(--st-text-2); padding: 2px 0; }
.st-cal-day { font-size: 13px; line-height: 30px; border-radius: 8px; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; }
.st-cal-day:hover { background: var(--st-bg); }
.st-cal-day.st-today { color: var(--st-accent-text); font-weight: 600; }
.st-cal-day.st-sel, .st-cal-day.st-sel:hover { background: var(--st-accent); color: #fff; }
.st-cal-day:disabled { color: var(--st-text-3); cursor: default; background: none; }
/* A run of days (DayRangeCalendar): the days between tinted, the two ends joined to them. */
.st-cal-day.st-run { background: var(--st-accent-bg); color: var(--st-accent-text); border-radius: 0; }
.st-cal-day.st-sel.st-run-start { border-radius: 8px 0 0 8px; }
.st-cal-day.st-sel.st-run-end { border-radius: 0 8px 8px 0; }
.st-plain, .st-plain:hover { text-decoration: none; }
/* A row that is a form's submit button (the organization picker): looks like the other rows. */
.st-row-button { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.st-row-button:hover { background: rgba(0, 0, 0, 0.025); }
