/* Factooo: application of the supplied identity, with no external resources. */
:root {
  --blue: var(--factooo-blue);
  --navy: var(--factooo-ink);
  --muted: var(--factooo-muted);
  --line: var(--factooo-border);
  --soft: var(--factooo-tint);
  --surface: var(--factooo-white);
  --radius: 16px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  font-family: Manrope, Arial, sans-serif;
  color: var(--navy);
  background: var(--factooo-canvas);
  font-synthesis: none;
  line-height: 1.5;
}
button, .button, .planner-button {
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  transition: background 160ms ease-out, color 160ms ease-out;
  box-shadow: none;
}
button:hover, .button:hover, .planner-button:hover { background: var(--soft); }
.primary { background: var(--blue); border-color: var(--blue); color: white; box-shadow: none; }
.primary:hover { background: var(--factooo-blue-hover); border-color: var(--factooo-blue-hover); }
.actions > button:not(.primary):not(.quiet):not(.danger), .gite-banner .button {
  border-color: var(--blue); color: var(--blue);
}
.quiet:hover { background: var(--soft); }
.danger { color: var(--factooo-danger); }
:is(button, a, summary, input, select, textarea):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
input, select, textarea { border-color: var(--factooo-input); border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type=checkbox] { accent-color: var(--blue); }
label { color: var(--navy); font-size: 14px; font-weight: 600; }
.field small, .hint, td small { font-size: 12px; line-height: 16px; }
.icon { stroke-width: 1.8; }
.actions > button > .icon, .primary > .icon { width: 24px; height: 24px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; letter-spacing: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 200px; max-width: 100%; height: auto; display: block; }
.brand > small { margin-left: 8px; font: 500 12px/16px Manrope, Arial, sans-serif; color: #DDE1ED; }
.sidebar { background: var(--navy); color: white; border-right: 0; padding: 24px 16px 16px; }
.sidebar .brand { padding: 0 0 24px; margin: 0 4px; }
.nav-label { color: var(--factooo-periwinkle); font-size: 12px; font-weight: 600; padding: 12px 16px 8px; letter-spacing: 1px; }
.nav-link { color: #DDE1ED; font-size: 14px; font-weight: 500; min-height: 44px; gap: 12px; border-radius: 10px; }
.nav-link:hover { background: #262D48; color: white; }
.nav-link.active { background: var(--blue); color: white; font-weight: 600; }
.sidebar :is(a, summary):focus-visible { outline-color: var(--factooo-periwinkle); }
.nav-label.mt { margin-top: 16px; }
.sidebar .local-note { background: #212740; color: #C2C9DD; border-color: #343C59; border-radius: 12px; padding: 12px; margin: 20px 4px 16px; font-size: 12px; }
.sidebar .local-note strong { color: white; margin-bottom: 4px; }
.sidebar .local-note .icon { color: var(--factooo-periwinkle); }
.user-menu { border-color: #343C59; padding-top: 12px; }
.user-menu > summary:hover { background: #262D48; }
.user-info strong { font-weight: 600; font-size: 14px; }
.sidebar .user-info small { color: #C2C9DD; font-size: 12px; }
.avatar { border-radius: 10px; background: var(--soft); color: var(--blue); }
.user-dropdown { box-shadow: 0 8px 24px rgb(23 28 48 / 6%); }
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--soft); }
.topbar { min-height: 80px; height: 80px; padding: 0 32px; background: white; }
.breadcrumb { font-size: 14px; }
.breadcrumb b { font-weight: 600; }
.local-badge { color: var(--muted); border-color: var(--line); font-weight: 500; }
.main { padding: 32px 32px 48px; }
.page-heading { margin-bottom: 32px; gap: 24px; }
.page-heading h1 { font-size: 36px; line-height: 44px; font-weight: 700; letter-spacing: -1px; margin-bottom: 8px; }
.page-heading p { font-size: 16px; line-height: 24px; }
.card { border-radius: 16px; box-shadow: none; }
.card-pad, .card-head { padding: 24px; }
.card h2 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.4px; }
.card h3 { font-weight: 600; }
.card-head p { font-size: 14px; line-height: 20px; }
.stats { gap: 24px; margin-bottom: 32px; }
.stat { padding: 24px; }
.stat-value { font-size: 32px; font-weight: 700; line-height: 40px; font-variant-numeric: tabular-nums; }
.stat-note { color: var(--muted); font-size: 12px; line-height: 16px; }
.stat-icon { background: var(--soft); color: var(--blue); border-radius: 10px; }
.stat:nth-child(2) .stat-icon { background: var(--factooo-warning-bg); color: var(--factooo-warning); }
.stat:nth-child(3) .stat-icon { background: var(--factooo-success-bg); color: var(--factooo-success); }
.gite-banner { background: var(--soft); border-color: var(--line); border-left: 4px solid var(--blue); padding: 24px; margin-bottom: 32px; }
.gite-banner h2 { font-size: 24px; line-height: 32px; font-weight: 600; margin: 8px 0; }
.gite-banner .eyebrow { color: var(--blue); }
.gite-banner p { font-size: 14px; line-height: 20px; }
.start-card { background: var(--soft); border-color: var(--line); }
.start-card p { color: var(--muted); }
.start-card h2 { font-size: 24px; line-height: 32px; }
.check-step.done { background: var(--factooo-success-bg); color: var(--factooo-success); }
.empty-symbol { background: var(--soft); border-color: var(--line); color: var(--blue); border-radius: 16px; }
th { color: var(--muted); background: var(--factooo-canvas); font-size: 12px; font-weight: 600; }
td { border-color: var(--line); }
tbody tr[data-open]:hover { background: var(--soft); }
.badge, .stage-completed, .reservation-chip { background: var(--factooo-canvas); color: var(--muted); font-size: 12px; font-weight: 600; }
.badge.issued, .badge.ready, .stage-deposit_paid { background: var(--soft); color: var(--blue); }
.badge.paid, .badge.accepted, .stage-signed, .stage-reserved, .reservation-chip.confirmed { background: var(--factooo-success-bg); color: var(--factooo-success); }
.badge.rejected, .badge.overdue, .stage-canceled, .reservation-chip.canceled { background: var(--factooo-danger-bg); color: var(--factooo-danger); }
.stage-interested { background: var(--factooo-warning-bg); color: var(--factooo-warning); }
.tabs { gap: 8px; margin-bottom: 32px; padding-bottom: 16px; }
.tabs button.active { background: var(--soft); color: var(--blue); font-weight: 600; }
.help-block, .read-value, .stay-progress, .client-private { background: var(--factooo-canvas); border-color: var(--line); color: var(--muted); }
.notice { background: var(--soft); border-color: var(--line); color: var(--blue); }
.notice.warning { background: var(--factooo-warning-bg); color: var(--factooo-warning); border-color: var(--factooo-warning); }
.notice.success, .stay-result { background: var(--factooo-success-bg); color: var(--factooo-success); border-color: var(--factooo-success); }
.form-error { background: var(--factooo-danger-bg); color: var(--factooo-danger); }
#toast { background: var(--navy); box-shadow: 0 8px 24px rgb(23 28 48 / 6%); }
#toast.error { background: var(--factooo-danger); }
dialog { border-radius: 16px; box-shadow: 0 8px 24px rgb(23 28 48 / 6%); }
dialog::backdrop { background: rgb(23 28 48 / 40%); backdrop-filter: none; }
.dialog-head, .dialog-body { padding: 24px; }
.dialog-head h2 { font-size: 24px; line-height: 32px; font-weight: 600; }
.editor-layout, .document-view, .customer-profile-grid { gap: 24px; }
.totals .grand { padding: 16px; background: var(--soft); border: 0; border-radius: 10px; color: var(--blue); }
.totals b, .totals strong, .stat-value { font-variant-numeric: tabular-nums; }
.document-frame { border-radius: 16px; }
.stay-option { background: white; border-color: var(--factooo-input); border-radius: 8px; padding: 16px; }
.stay-option:has(input:checked) { background: var(--soft); border-color: var(--blue); }
.stay-option input { accent-color: var(--blue); }
.stay-follow-summary { border-radius: 16px; padding: 16px 24px; }
.customer-profile-grid h2 { font-size: 20px; }
.client-avatar { color: var(--blue); background: var(--soft); }
.document-brand-choice { display: flex; align-items: center; gap: 20px; margin: 16px 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.document-brand-sample { display: grid; place-items: center; padding: 8px; border-radius: 8px; background: #000; flex: none; }
.document-brand-sample img { display: block; width: 80px; height: 80px; }
.document-brand-choice p { margin: 4px 0 12px; font-size: 14px; }
#appearance-logo img { display: block; max-width: 100px; max-height: 100px; margin-bottom: 12px; object-fit: contain; }
.mini-preview.roudiere-preview { border-color: #D9D9D6; border-top-color: var(--doc-color); background: #FFF; }
.mini-preview.roudiere-preview :is(h3, .eyebrow) { color: #171717; }
.mini-preview.roudiere-preview p { color: #595959; }
.mini-preview.roudiere-preview hr { border-color: #D9D9D6; }
.planner-controls { padding: 24px; margin-bottom: 24px; }
.planner-modes { background: var(--factooo-canvas); border-radius: 10px; padding: 4px; }
.planner-modes button.active { color: white; background: var(--blue); box-shadow: none; }
.planner-caption strong { color: var(--factooo-success); }
.planner-caption p, .planner-screen-legend, .planner-help { color: var(--muted); }
.planner-viewport { background: var(--factooo-canvas); }
.planner-date input, .planner-zoom select { border-color: var(--factooo-input); }
.planner-day:focus > rect:first-of-type, .planner-day:hover > rect:first-of-type { stroke: var(--blue); }
.auth-story { background: var(--navy); padding: 48px 10%; }
.auth-story .brand-logo { width: 240px; }
.auth-story .brand > small { color: #DDE1ED; }
.auth-copy { position: relative; z-index: 1; }
.auth-copy .eyebrow { color: var(--factooo-periwinkle); }
.auth-copy h1 { font-size: 48px; line-height: 56px; font-weight: 700; letter-spacing: -1.5px; }
.auth-copy > p { color: #DDE1ED; font-size: 16px; line-height: 24px; }
.auth-points { color: white; font-size: 14px; }
.auth-points .icon { color: var(--factooo-periwinkle); }
.auth-foot { color: #C2C9DD; font-size: 12px; }
.auth-story::after { content: ''; position: absolute; width: 180px; height: 60px; right: 32px; bottom: 96px; background: url('/brand/motif-ooo.svg') center / contain no-repeat; opacity: .25; pointer-events: none; }
.auth-form h2 { font-size: 32px; line-height: 40px; font-weight: 700; }
.auth-local { color: var(--muted); }
@media (max-width: 1150px) {
  .brand-logo { width: 184px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .main, .topbar { padding-left: 32px; padding-right: 32px; }
  .page-heading { flex-wrap: wrap; }
  .stats { gap: 16px; }
  .stat { padding: 20px; }
  .stat-value { font-size: 28px; }
  .auth-copy h1 { font-size: 40px; line-height: 48px; }
  .auth-story::after { display: none; }
}
@media (max-width: 800px) {
  .sidebar .brand-logo { width: 200px; }
  .topbar { height: auto; min-height: 72px; padding: 12px 16px; }
  .main { padding: 24px 16px 32px; }
  .page-heading { margin-bottom: 24px; gap: 16px; }
  .page-heading h1 { font-size: 28px; line-height: 36px; letter-spacing: -.7px; }
  .page-heading p { font-size: 14px; line-height: 20px; }
  .card-head, .card-pad { padding: 20px; }
  .card h2 { font-size: 20px; line-height: 28px; }
  .stats { gap: 8px; margin-bottom: 24px; }
  .stat { padding: 16px 12px; }
  .stat-value { font-size: 22px; line-height: 28px; }
  .stat-note { font-size: 12px; }
  .gite-banner { margin-bottom: 24px; padding: 20px; }
  .gite-banner h2 { font-size: 22px; line-height: 28px; }
  .auth-story { padding: 24px; }
  .auth-story .brand-logo { width: 200px; }
  .auth-form-panel { padding: 32px 24px; }
  .auth-form h2 { font-size: 28px; line-height: 36px; }
}
@media (max-width: 480px) {
  .document-brand-choice { align-items: flex-start; gap: 12px; padding: 12px; }
  .document-brand-sample img { width: 56px; height: 56px; }
  .document-brand-choice button { padding: 8px 10px; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stat { padding: 16px 20px; }
  .stat-top { font-size: 14px; }
  .stats .stat-value { font-size: 28px; line-height: 36px; margin: 4px 0; }
  .stat-note { font-size: 12px; }
  .stat-icon { display: flex; padding: 8px; }
  .card-head, .card-pad, .dialog-head, .dialog-body { padding: 16px; }
  .dialog-head h2 { font-size: 20px; line-height: 28px; }
  .planner-controls { padding: 16px; }
  .planner-modes button { font-size: 12px; padding: 8px; }
  .stay-follow-summary { padding: 16px; }
  .totals .grand { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
