/* R14. Components use the shared palette on application and access pages. */
:root {
  --ui-blue: #3555cf;
  --ui-blue-dark: #23399a;
  --ui-blue-light: #eceffc;
  --ui-blue-surface: #f3f5fd;
  --ui-ink: #151a2d;
  --ui-muted: #5a6275;
  --ui-quiet: #7a8091;
  --ui-ground: #f6f5f2;
  --ui-booking: #faf8f5;
  --ui-paper: #fff;
  --ui-edge: #e7e3dc;
  --ui-field: #d9d4cb;
  --ui-divider: #f0ece6;
  --ui-apricot: #fdf3e7;
  --ui-apricot-edge: #f1d3b3;
  --ui-apricot-text: #5e3510;
  --ui-apricot-dark: #7a3e14;
  --ui-hatch: #fbe6d4;
  --ui-green: #1d5e3c;
  --ui-green-light: #e3f2ea;
  --ui-red: #8b283c;
  --ui-red-light: #fcebee;
  --ui-red-edge: #e9c3ca;
  --ui-focus: #8fa2ee;
  --ui-card: 18px;
  --ui-control: 12px;
  --ui-chip: 999px;
  --ui-sidebar: 236px;
}

.tagano-shell {
  min-height: 100vh;
  background: var(--ui-ground);
  color: var(--ui-ink);
  font: 500 15px/1.55 'Plus Jakarta Sans', system-ui, sans-serif;
  overflow-wrap: anywhere;
  accent-color: var(--ui-blue);
}

.tagano-shell > main {
  max-width: 1500px;
  margin-block: 0;
  min-width: 0;
  padding: 30px clamp(1rem, 3vw, 40px) 2.5rem;
}
.tagano-shell h1, .tagano-shell h2, .tagano-shell h3 {
  color: inherit;
  font-weight: 800;
  line-height: 1.2;
}
.tagano-shell h1 { font-size: clamp(1.65rem, 3vw, 2.14rem); letter-spacing: -.035em; margin: 0 0 1rem; }
.tagano-shell h2 { font-size: 1.2rem; letter-spacing: -.015em; }
.tagano-shell h3 { font-size: 1.05rem; }
.tagano-shell p { margin-block: .65em 1em; }
.tagano-shell .heading { align-items: flex-end; gap: .9rem; margin-bottom: 1.2rem; }
.tagano-shell .heading h1 { margin: 0; }
.tagano-shell .heading p { color: var(--ui-muted); margin-bottom: 0; }
.tagano-shell .eyebrow {
  color: var(--ui-blue-dark); font-size: .83rem; letter-spacing: .14em;
  font-weight: 800; margin: 0 0 .4rem; text-transform: uppercase;
}
.tagano-shell .hint, .tagano-shell .helptext { color: var(--ui-muted); line-height: 1.55; }
.tagano-shell a { color: var(--ui-blue-dark); text-underline-offset: .15em; }
.tagano-shell a:not(.button):hover { text-decoration: underline; }
.tagano-shell .panel {
  border: 1px solid var(--ui-edge); border-radius: var(--ui-card);
  background: var(--ui-paper); color: var(--ui-ink); min-width: 0; padding: 22px;
}
.tagano-shell .panel > :first-child { margin-top: 0; }
.tagano-shell .panel > :last-child { margin-bottom: 0; }
.tagano-shell .columns { gap: 18px; }
.tagano-shell .columns > *, .tagano-shell .fields > * { min-width: 0; }
.tagano-shell .actions { gap: 10px; }
.tagano-shell :where(button, .button) {
  min-height: 44px; max-width: 100%; white-space: normal;
  padding: 10px 16px; border-radius: var(--ui-control);
  background: var(--ui-blue); border: 1px solid transparent;
  color: var(--ui-paper); font-weight: 700; font-family: inherit; line-height: 1.35;
}
.tagano-shell a.button { color: var(--ui-paper); }
.tagano-shell :where(button,.button):not(:disabled):hover { background-color: var(--ui-blue-dark); }
.tagano-shell button.quiet, .tagano-shell .button.quiet {
  color: var(--ui-ink); background: var(--ui-paper); border: 1px solid var(--ui-field);
}
.tagano-shell button.quiet:hover, .tagano-shell .button.quiet:hover { background: var(--ui-ground); }
.tagano-shell .danger, .tagano-shell a.button.danger, .tagano-shell .account-danger button {
  color: var(--ui-red); background: var(--ui-paper); border: 1px solid var(--ui-red-edge);
}
.tagano-shell .danger:hover, .tagano-shell a.button.danger:hover, .tagano-shell .account-danger button:hover { background: var(--ui-red-light); }
.tagano-shell button:disabled { cursor: not-allowed; }
.tagano-shell label { color: var(--ui-ink); font-size: .94rem; font-weight: 700; }
.tagano-shell :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  min-height: 44px; min-width: 0; max-width: 100%;
  border: 1px solid var(--ui-field); border-bottom-color: var(--ui-quiet); border-radius: var(--ui-control);
  padding: 9px 12px; font: 500 1rem/1.45 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ui-ink); background: var(--ui-paper);
}
.tagano-shell :where(input,textarea)::placeholder { color: var(--ui-muted); opacity: 1; }
.tagano-shell input:is([type=radio],[type=checkbox]) {
  width: 24px; height: 24px; min-width: 24px; min-height: 24px;
  flex: none; vertical-align: middle; accent-color: var(--ui-blue);
}
.tagano-shell :where(textarea) { resize: vertical; }
.tagano-shell form p > label:first-child { margin-bottom: .35rem; }
.tagano-shell fieldset { min-width: 0; border-color: var(--ui-edge); border-radius: 14px; }
.tagano-shell legend {
  font-size: .83rem; font-weight: 800; letter-spacing: .07em;
  padding: 0 .4rem; text-transform: uppercase; color: var(--ui-muted);
}
.tagano-shell details { border-color: var(--ui-divider); }
.tagano-shell summary { min-height: 24px; font-weight: 700; color: var(--ui-ink); cursor: pointer; }
.tagano-shell th { font-weight: 800; color: var(--ui-muted); letter-spacing: .045em; font-size: .84rem; }
.tagano-shell th, .tagano-shell td { border-color: var(--ui-divider); }
.tagano-shell .status-badge, .tagano-shell .account-status {
  background: var(--ui-blue-light); color: var(--ui-blue-dark); border-radius: var(--ui-chip); font-weight: 700;
}
.tagano-shell .notice, .tagano-shell #feedback, .tagano-shell .setup-notice, .tagano-shell .billing-notice {
  background: var(--ui-apricot); border: 1px solid var(--ui-apricot-edge);
  border-radius: 14px; color: var(--ui-apricot-text);
}
.tagano-shell .setup-notice p, .tagano-shell .billing-notice p { color: var(--ui-apricot-text); }
.tagano-shell .setup-notice a, .tagano-shell .billing-notice a {
  color: var(--ui-apricot-dark); background: var(--ui-paper); border-color: var(--ui-apricot-edge);
  border-radius: var(--ui-control); min-height: 44px;
}
.tagano-shell .notice a { color: var(--ui-apricot-dark); font-weight: 700; }
.tagano-shell #feedback.error, .tagano-shell .errorlist, .tagano-shell .error, .tagano-shell .notice.errorlist {
  color: var(--ui-red); background: var(--ui-red-light); border: 1px solid var(--ui-red-edge); border-radius: var(--ui-control);
}
.tagano-shell .setup-success, .tagano-shell .account-status:not(.pending) { color: var(--ui-green); background: var(--ui-green-light); }
.tagano-shell :focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ui-blue-dark); }
.tagano-shell footer { color: var(--ui-muted); font-size: .86rem; padding: 22px clamp(1rem,3vw,40px); }
.tagano-shell footer a { display: inline-block; min-height: 24px; padding-block: .25rem; color: inherit; }
.tagano-shell footer p { margin: 0; }

.tagano-shell main > a:not([class]), .tagano-shell main nav > a:not([class]),
.tagano-shell :where(p, li, .actions) > a:not([class]),
.tagano-shell a.retention-back {
  display: inline-block; min-height: 24px; min-width: 24px; max-width: 100%;
}
@media (max-width: 400px) {
  .tagano-shell .setup-day { grid-template-columns: minmax(0, 1fr); }
  .tagano-shell .setup-day .hours-times { grid-template-columns: minmax(0, 1fr); }
}

/* With JavaScript disabled the existing links remain available in the normal flow. */
.tagano-shell .app-header { background: var(--ui-paper); border-color: var(--ui-edge); }
.tagano-shell .app-header .brand {
  color: var(--ui-ink); font-size: 1.28rem; font-weight: 800; letter-spacing: -.035em;
  min-height: 44px; text-decoration: none;
}
.tagano-shell .app-header .brand img { width: 30px; height: 30px; }
.tagano-shell #app-navigation { gap: 2px; }
.tagano-shell #app-navigation > a {
  color: var(--ui-muted); border-radius: 10px; padding: 10px 12px; font-weight: 650;
  display: flex; align-items: center; gap: 12px; min-height: 44px; line-height: 1.3;
  text-decoration: none;
}
.tagano-shell #app-navigation svg { flex: none; }
.tagano-shell #app-navigation > a:hover { background: var(--ui-ground); color: var(--ui-ink); }
.tagano-shell #app-navigation > a[aria-current=page] { background: var(--ui-blue-light); color: var(--ui-blue-dark); font-weight: 800; }
.tagano-shell #app-navigation > .nav-administration { margin-top: 1.1rem; position: relative; }
.nav-administration::before { content: ""; position: absolute; inset: -.57rem .6rem auto; border-top: 1px solid var(--ui-edge); }
@media (min-width:861px) {
  .app-shell { padding-left: var(--ui-sidebar); }
  .app-shell .app-header {
    position: fixed; z-index: 15; inset: 0 auto 0 0; width: var(--ui-sidebar);
    padding: 20px 14px; flex-direction: column; align-items: stretch; justify-content: flex-start;
    flex-wrap: nowrap; gap: 22px; overflow-y: auto; border: 0; border-right: 1px solid var(--ui-edge);
  }
  .app-shell .app-header .brand { align-self: flex-start; margin-left: 8px; }
  .app-shell .app-header .nav-toggle { display: none !important; }
  /* R13 sets hidden up to 1100px. The permitted CSS breakpoint is 860px. */
  .app-shell #app-navigation, .app-shell #app-navigation[hidden] {
    display: flex !important; flex: 1 0 auto; flex-flow: column nowrap; align-items: stretch;
    border: 0; padding: 0; font-size: 1rem;
  }
  .app-shell #app-navigation > a.nav-administration {
    padding-inline: 12px 2px;
    gap: 6px;
  }
  .app-shell #app-navigation > form { margin-top: auto; padding-top: 1.5rem; border: 0; }
  .app-shell #app-navigation > form button { width: 100%; text-align: center; }
}
@media (max-width:860px) {
  .app-shell .app-header {
    position: relative; width: 100%; flex-flow: row wrap; align-items: center;
    justify-content: space-between; gap: 10px 16px; padding: 10px 16px; border-bottom: 1px solid var(--ui-edge);
  }
  .app-shell #app-navigation { flex: 0 0 100%; align-items: stretch; flex-direction: column; font-size: 1rem; }
  .tagano-shell > main { padding: 20px 16px 30px; }
  .tagano-shell .panel { padding: 16px; }
  .tagano-shell .columns, .tagano-shell .cards { grid-template-columns: minmax(0,1fr); }
}
.guest-shell .app-header {
  display: flex; align-items: center; justify-content: center; flex-flow: column; gap: .5rem;
  background: transparent; border: 0; padding: clamp(20px,5vh,64px) 16px 0;
}
.guest-shell .app-header .brand { font-size: 1.5rem; }
.guest-shell #app-navigation { flex-flow: row wrap; justify-content: center; flex: 0 1 auto; border: 0; padding: 0; }
.guest-shell > main { min-height: 0; padding-bottom: 1rem; }
.guest-shell .narrow { max-width: 560px; margin: 0 auto 1rem; padding: clamp(18px,3vw,30px); }
.guest-shell .narrow h1 { font-size: 1.88rem; }
.guest-shell .narrow form > button { width: 100%; }
@media (min-width:861px) {
  .guest-shell .nav-toggle { display: none !important; }
  .guest-shell #app-navigation[hidden] { display: flex !important; }
}

/* Overview */
.dashboard-cards { margin-block: 1.2rem; gap: 16px; }
.dashboard-cards > a.panel { margin: 0; display: flex; flex-flow: column; align-items: start; color: var(--ui-ink); text-decoration: none; }
.dashboard-cards > a.panel:hover { text-decoration: none; border-color: var(--ui-blue); }
.dashboard-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ui-blue-light); color: var(--ui-blue); }
.dashboard-cards h2 { margin: .9rem 0 .25rem; }
.dashboard-cards p { color: var(--ui-muted); }
.dashboard-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 16px; }
.dashboard-details > .panel { margin-block: 0; align-content: start; }
.dashboard-details .dashboard-booking { background: var(--ui-ink); color: var(--ui-paper); }
.dashboard-booking a { color: var(--ui-paper); }
.dashboard-booking > a { display: block; border: 1px solid var(--ui-quiet); padding: .7rem .9rem; border-radius: var(--ui-control); }
.tagano-shell .customer-rows > li + li, .tagano-shell .note-history article + article { border-color: var(--ui-divider); }
.tagano-shell .record-button {
  min-height: 44px; border-radius: var(--ui-control); border-color: var(--edge); background: var(--tint); color: var(--ink);
}
.tagano-shell .record-care { --tint: var(--ui-blue); --ink: var(--ui-paper); --edge: var(--ui-blue); }
.tagano-shell .record-edit { --tint: var(--ui-paper); --ink: var(--ui-ink); --edge: var(--ui-field); }
.tagano-shell .record-review { --tint: var(--ui-apricot); --ink: var(--ui-apricot-text); --edge: var(--ui-apricot-edge); }
.tagano-shell .record-danger { --tint: var(--ui-paper); --ink: var(--ui-red); --edge: var(--ui-red-edge); }
.tagano-shell .record-button:hover { background: var(--tint); color: var(--ink); border-color: var(--ui-blue-dark); }
.tagano-shell .record-button[aria-current=page] { background: var(--ui-blue-light); border-color: var(--ui-blue); color: var(--ui-blue-dark); }
.tagano-shell .record-filters .record-button[aria-current=page] { box-shadow: inset 0 -2px currentColor; }
.tagano-shell .record-back { padding-block: .35rem; }
.tagano-shell .customer-ident span, .tagano-shell .customer-status { color: var(--ui-muted); }
.tagano-shell .customer-status { display: inline-block; padding: 3px 10px; border-radius: var(--ui-chip); background: var(--ui-ground); }
.tagano-shell .workflow-type label:has(input:checked), .tagano-shell .billing-method:has(input:checked) {
  border-color: var(--ui-blue); background: var(--ui-blue-light);
}
.tagano-shell .workflow-step, .tagano-shell .workflow-service-card, .tagano-shell .billing-plan {
  border-color: var(--ui-edge); border-radius: var(--ui-card); background: var(--ui-paper);
}
.tagano-shell .workflow-service-list:has(.workflow-service-card) { padding: 0; background: transparent; border: 0; }
.tagano-shell .workflow-service-card { padding: 18px 20px; gap: 1.25rem; }
.tagano-shell .workflow-type label span, .tagano-shell .workflow-grid output { color: var(--ui-muted); }
.tagano-shell .workflow-equipment, .tagano-shell .plan-terms { background: var(--ui-ground); border-radius: var(--ui-control); }
.tagano-shell .workflow-checks label { border-color: var(--ui-field); }
.tagano-shell #workflow-summary { color: var(--ui-blue-dark); }
.tagano-shell .privacy-layout {
  display: grid; grid-template-columns: minmax(170px,220px) minmax(0,1fr); gap: 18px; align-items: start;
}
.privacy-toc { position: sticky; top: 16px; display: grid; justify-items: stretch; gap: 3px; background: var(--ui-paper); border: 1px solid var(--ui-edge); border-radius: var(--ui-card); padding: 12px; }
.privacy-toc strong { color: var(--ui-muted); font-size: .87rem; padding: 5px 10px; }
.privacy-toc a { display: block; text-decoration: none; padding: 6px 10px; border-radius: 9px; }
.privacy-toc a:hover { background: var(--ui-blue-light); }
.privacy-sections { min-width: 0; }
.privacy-sections > :first-child { margin-top: 0; }
.privacy-sections section[id] { scroll-margin-top: 1rem; }
@media (max-width:1100px) { .tagano-shell .privacy-layout { grid-template-columns: minmax(0,1fr); } .privacy-toc { position: static; display: flex; flex-wrap: wrap; } }
@media (prefers-reduced-motion:reduce) {
  .tagano-shell *, .tagano-shell *::before, .tagano-shell *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Salon settings and account use the same two-tab header. */
.settings-action.settings-setup { margin: 0 0 1.75rem; }
.settings-group { margin: 1.75rem 0; }
.settings-group > h2 { margin: 0 0 .75rem; }
.settings-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 14px; }
.settings-action { margin: 0; min-width: 0; }
.settings-action > .panel {
  display: block; width: 100%; height: 100%; margin: 0; text-align: left;
  color: var(--ui-ink); background: var(--ui-paper); white-space: normal; overflow-wrap: anywhere;
}
.tagano-shell .settings-action > .panel:hover { background: var(--ui-blue-surface); border-color: var(--ui-blue); }
.settings-title { display: block; margin-bottom: 6px; font-size: 1.08rem; font-weight: 750; }
.settings-description { display: block; color: var(--ui-muted); font-weight: 500; line-height: 1.55; }
.settings-setup button { max-width: 100%; white-space: normal; min-height: 44px; }
.settings-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 1.25rem; background: var(--ui-paper); border: 1px solid var(--ui-edge); border-radius: var(--ui-control); }
.settings-tabs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ui-muted); text-decoration: none; font-weight: 700; border-radius: 9px; padding: 8px 16px; }
.settings-tabs a[aria-current=page] { background: var(--ui-blue-light); color: var(--ui-blue-dark); }
.account-page { max-width: 980px; }
.account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.account-grid .panel { margin: 0; }
.account-profile { grid-column: 1/-1; }
.account-data { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 28px; margin: 24px 0 4px; }
.account-data div { min-width: 0; }
.account-data dt { font-size: .87rem; color: var(--ui-muted); margin-bottom: 6px; }
.account-data dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.account-note { line-height: 1.6; color: var(--ui-muted); max-width: 760px; }
.tagano-shell .account-danger { border-color: var(--ui-red-edge); }
.account-danger h2 { color: var(--ui-red); }
.account-status { display: inline-block; font-size: .83rem; padding: 4px 10px; margin-left: .5rem; }
.account-status.pending { background: var(--ui-apricot); color: var(--ui-apricot-dark); }
.account-delete-form { max-width: 540px; }
.account-delete-form button { margin-top: 10px; }
.account-blockers { line-height: 1.7; padding-left: 22px; }
@media (max-width:650px) {
  .settings-cards, .account-grid, .account-data { grid-template-columns: minmax(0,1fr); }
  .account-profile { grid-column: auto; }
  .account-data { gap: 16px; }
  .account-status { display: table; margin: 6px 0 0; }
}

.hours-layout, .subscription-layout { min-width: 0; }
.hours-week, .subscription-change { min-width: 0; }
.agreement-text { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width:1180px) {
  .hours-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(290px,1fr); align-items: start; gap: 18px; }
  .hours-week { grid-column: 1; grid-row: 1; }
  .holiday-settings { grid-column: 2; grid-row: 1; }
  .hours-week > .panel:first-child, .hours-layout > .holiday-settings { margin-top: 0; }
  .subscription-layout:has(> .subscription-change) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 18px; }
  .subscription-layout:has(> .subscription-change) > * { margin: 0; }
}
