/* Martín José · azul noche, dorado y crema. Sin recursos externos. */
:root {
  --background:#f7f3ec; --foreground:#0b1324; --card:#fffdf9; --card-foreground:#0b1324;
  --popover:#fffdf9; --popover-foreground:#0b1324; --primary:#07101f; --primary-foreground:#fffdf9;
  --secondary:#efe8db; --secondary-foreground:#14233b; --muted:#f0ebe3; --muted-foreground:#626b79;
  --accent:#eee6d8; --accent-foreground:#14233b; --border:#ded6c9; --input:#c9c3b8; --ring:#a78040;
  --mj-ink:#07101f; --mj-gold:#c5a56e; --mj-paper:#fffdf9;
}
html { scroll-padding-top:110px; }
body { background:var(--background); color:var(--foreground); font-family:'Segoe UI',Arial,sans-serif; -webkit-font-smoothing:antialiased; line-height:1.5; }
::selection { color:#fff; background:#263d61; }
* { scrollbar-width:thin; scrollbar-color:#b8ab95 transparent; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
button,a,[role="button"] { touch-action:manipulation; }
button { transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease; }
button:active:not(:disabled) { transform:translateY(1px); }
:focus-visible { outline:3px solid #b28b4b; outline-offset:3px; }
/* La cabecera mantiene la identidad del atelier. */
.app-header { position:sticky; top:0; z-index:35; height:88px; min-height:88px; color:var(--mj-paper); background:var(--mj-ink); border-bottom:3px solid var(--mj-gold); padding-inline:clamp(20px,4vw,64px); gap:26px; box-shadow:0 4px 18px #07101f15; }
.app-brand { color:var(--mj-paper); gap:14px; }
.brand-icon { width:43px; height:43px; background:transparent; color:var(--mj-gold); border:1px solid #c5a56e88; border-radius:50%; }
.app-brand strong { font-family:Georgia,serif; font-size:1.65rem; letter-spacing:-.025em; font-weight:500; }
.app-brand small { font-size:.62rem; color:#d2c4ab; letter-spacing:.16em; }
.main-nav { gap:6px; }
.main-nav button { color:#d8deea; padding:12px 20px; font-size:.96rem; font-weight:600; border-radius:5px; }
.main-nav button:hover { color:#fff; background:#ffffff0d; }
.main-nav button.nav-active { color:#f0d9ae; background:#ffffff0d; box-shadow:inset 0 -2px var(--mj-gold); }
.header-calendar { width:46px; height:46px; color:#07101f; border:1px solid #d9cbb2; border-radius:6px; background:#ede3d1; }
.header-calendar svg { width:25px; height:25px; stroke-width:2.2; }
.header-calendar:hover,.header-calendar:focus-visible { color:#07101f; background:#e4d6bd; border-color:#bda173; }
@media(min-width:701px) {
  .header-calendar { display:flex; justify-content:center; gap:8px; width:auto; padding-inline:13px; }
  .header-calendar::after { content:'Agenda'; font-size:.85rem; font-weight:700; }
}
.header-user { width:42px; height:42px; border:2px solid #c5a56eaa; background:#e9dcc2; color:var(--mj-ink); }
.user-menu { padding:8px; background:var(--mj-paper); border-color:#d8cbb7; border-radius:9px; box-shadow:0 16px 40px #07101f26; }
.user-menu [data-slot="dropdown-menu-item"] { min-height:46px; border-radius:5px; font-weight:600; }
.google-user-summary { border-color:var(--border); }
.google-user-summary strong { color:var(--mj-ink); }
.google-user-summary small { color:#687185; }
/* Jerarquía, líneas precisas y espacio de trabajo. */
.dashboard,.editor-page { max-width:1480px; padding-top:38px; padding-inline:clamp(20px,4vw,64px); }
.dashboard-heading { align-items:center; border:0; padding-bottom:0; margin-bottom:30px; gap:20px; }
.dashboard-heading h1,.editor-intro h1 { font-family:Georgia,serif; color:var(--mj-ink); font-weight:500; letter-spacing:-.04em; line-height:1.12; }
.dashboard-heading h1 { font-size:clamp(2.25rem,4vw,3.4rem); margin:9px 0 13px; }
.dashboard-heading p,.editor-intro p { color:#596274; line-height:1.6; max-width:620px; }
.overline,.panel-kicker { color:#876736; font-weight:700; font-size:.69rem; letter-spacing:.17em; }
.overline { display:inline-flex; align-items:center; gap:10px; border:0; padding:0; }
.overline::before { content:none; }
.panel,.editor-card { border:1px solid var(--border); border-radius:12px; background:var(--mj-paper); box-shadow:0 5px 24px #19253b05; overflow:hidden; }
.panel-head { padding:23px 26px; border-bottom:1px solid var(--border); background:#f1ece2; }
.panel-head h2 { color:var(--mj-ink); font-family:Georgia,serif; font-weight:500; font-size:1.55rem; line-height:1.25; }
.panel-link { color:#263f65; font-weight:600; }
.count-pill { background:#fffdf9; color:#745b35; border:1px solid #d8c9af; font-size:.75rem; font-weight:700; }
.orders-list-panel > .panel-head,.customers-list-panel > .panel-head { background:#111e32; border-color:#111e32; }
.orders-list-panel > .panel-head h2,.customers-list-panel > .panel-head h2 { color:#fffdf9; }
.orders-list-panel .panel-kicker { color:#d5b782; }
.orders-list-panel .orders-hide-button,.customers-list-panel .orders-hide-button { color:#111e32; border-color:#c5a56e; background:#e5c58e; }
.orders-list-panel .orders-hide-button:hover,.customers-list-panel .orders-hide-button:hover,
.orders-list-panel .orders-hide-button:focus-visible,.customers-list-panel .orders-hide-button:focus-visible,
.orders-list-panel .orders-hide-button:active,.customers-list-panel .orders-hide-button:active { color:#111e32; border-color:#d4b27a; background:#f0d9ae; }
.orders-hide-button svg { color:inherit; stroke:currentColor; stroke-width:2.5; }
.orders-hide-button .mobile-chevron { transition:transform .18s ease; }
.detail-empty { min-height:270px; padding:50px 26px; }
.detail-empty svg { color:#ae8c58; }
.detail-empty strong { color:#25344d; font-family:Georgia,serif; font-size:1.2rem; font-weight:500; }
.empty-copy,.detail-empty p { color:#657083; }
.detail-head { border-top:3px solid var(--mj-gold); background:#fffdf9; padding:28px; border-bottom-color:#e6dfd2; }
.detail-head h2 { color:var(--mj-ink); font-family:Georgia,serif; font-size:clamp(1.7rem,2.7vw,2.3rem); font-weight:500; letter-spacing:-.025em; }
.detail-head .panel-kicker { font-size:.69rem; }
.order-title-status { gap:24px; align-items:flex-start; }
.order-person { min-width:0; }
.order-name-row h2 { overflow-wrap:anywhere; }
.status-picker-block { min-width:205px; }
.status-picker-block > span { color:#52627b; font-size:.68rem; letter-spacing:.1em; }
.order-contact { color:#40506b; font-weight:600; gap:12px; line-height:1.6; }
.order-contact svg { color:#a78040; flex:none; }
.detail-section,.danger-zone { border-color:#e8e1d5; }
.detail-section { padding:27px 28px; }
.detail-section h3 { font-family:Georgia,serif; color:#14233b; font-weight:500; font-size:1.4rem; margin-bottom:20px; }
.info-grid { padding:24px 28px; gap:22px; background:transparent; border-color:#d8cbb5; }
.info-grid small { color:#52627b; letter-spacing:.06em; font-size:.69rem; font-weight:600; text-transform:uppercase; margin-bottom:7px; }
.info-grid strong { color:#23334e; font-weight:650; font-size:.96rem; }
.order-garment-summary { border:1px solid #d7c7ac; background:#f0e7d7; color:#5a4320; border-radius:5px; padding:8px 13px; font-weight:650; }
.orders-show-button,.orders-hide-button { min-width:44px; min-height:44px; color:#263f65; background:#f7f3ec; border-color:#cbbda5; border-radius:6px; }
.orders-show-button:hover,.orders-hide-button:hover { background:#ebe2d2; }
.back-link { color:#263f65; font-weight:600; }
/* Registrar trabajo es el primer gesto, sin competir con la agenda. */
.start-order-button { position:relative; min-height:110px; width:100%; padding:20px 24px; margin:0 0 24px; background:#ede3d1; color:#07101f; border:1px solid #d9cbb2; border-radius:12px; box-shadow:0 5px 20px #8263320a; gap:18px; }
.start-order-button::before { content:''; position:absolute; inset:5px; border:1px solid #a8895238; border-radius:6px; pointer-events:none; }
.start-order-button:hover { background:#e4d6bd; box-shadow:0 10px 28px #82633217; transform:translateY(-2px); }
.start-order-icon { flex:none; width:52px; height:52px; border-radius:50%; background:#07101f; color:#e5ca95; border:1px solid #07101f; }
.start-order-icon svg { width:27px; height:27px; }
.start-order-button > span:nth-child(2) { gap:4px; }
.start-order-button strong { font-family:Georgia,serif; font-size:clamp(1.6rem,2.8vw,2rem); font-weight:500; letter-spacing:-.025em; line-height:1.15; }
.start-order-button small { color:#5e4e32; font-size:.94rem; line-height:1.4; }
.start-order-button > svg { color:#07101f; width:28px; transition:transform .2s ease; }
.start-order-button:hover > svg { transform:translateX(4px); }
.dashboard-grid { gap:24px; }
.dashboard-grid .panel-head { background:#111e32; border-color:#111e32; }
.dashboard-grid .panel-head h2 { color:#fffdf9; }
.dashboard-grid .panel-head > svg { color:#e4c99a; }
.dashboard-grid .panel-head .panel-kicker,.dashboard-grid .panel-head .panel-link { color:#e4c99a; }
.dashboard-grid .panel-head .count-pill { background:#ffffff12; color:#eddec4; border-color:#ffffff25; }
[data-slot="button"] { min-height:46px; border-radius:6px; font-weight:650; box-shadow:none; }
[data-slot="button"].bg-primary:hover { background:#233957; box-shadow:0 4px 12px #07101f19; }
.save-action-button { background:#23734b !important; color:#fff !important; border-color:#23734b !important; }
.save-action-button:hover:not(:disabled),.save-action-button:active:not(:disabled) { background:#1a5b3b !important; border-color:#1a5b3b !important; }
.save-action-button:focus-visible { outline-color:#23734b; }
.edit-action-button { color:#fff !important; background:#263f65 !important; border:1px solid #263f65 !important; border-radius:6px; }
.edit-action-button:hover { background:#172e51 !important; box-shadow:0 4px 12px #263f6520; }
.heading-actions { gap:10px; }
.calendar-launch { color:#07101f; background:#ede3d1; border-color:#d9cbb2; border-radius:6px; min-height:46px; font-weight:700; }
.calendar-launch:hover { background:#e4d6bd; }
/* Listas: borde dorado y selección en crema, sin perder los colores de estado. */
.customer-row,.order-row,.queue-item,.history-row { background:var(--mj-paper); border-color:#eae4d9; }
.dashboard-grid .queue-item { background:var(--mj-paper); border-color:#eae4d9; }
.dashboard-grid .queue-item:hover { background:#f4eee3; }
.customer-row,.order-row { position:relative; }
.customer-row::before,.order-row::before { content:''; position:absolute; inset:0 auto 0 0; width:4px; background:#a78040; opacity:0; transition:opacity .18s ease; }
.customer-row:hover,.order-row:hover,.queue-item:hover,.history-row:hover { background:#f4eee3; }
.customer-row.active,.order-row.active { background:#f0e8d9; }
.customer-row.active::before,.order-row.active::before { opacity:1; }
.customer-row strong,.order-row strong,.queue-item strong { color:#17253d; font-weight:650; }
.customer-row small,.order-row small,.queue-item small,.history-row small { color:#657083; }
.avatar { border:1px solid #d9cbb2; border-radius:50%; background:#ede3d1; color:#745829; font-weight:700; }
.queue-number { color:#96743e; font-family:Georgia,serif; font-size:1.4rem; }
.queue-side { min-width:0; }
.status-chip { font-size:.76rem; border-radius:5px; padding:5px 9px; font-weight:700; }
.search-box { background:#fffdf9; border-color:#cbbda5; border-radius:6px; color:#927446; margin-top:16px; }
.search-box:focus-within { border-color:#a78040; box-shadow:0 0 0 3px #a780401a; }
.search-box input { background:transparent; min-height:46px; font-size:.96rem; color:#17253d; }
/* La retícula de medidas conserva la claridad de una ficha de taller. */
.read-measures section,.measure-card { padding:20px; background:#f8f4ed; border:1px solid #cbb899; border-radius:8px; box-shadow:none; }
.read-measures h4 { color:#17253d; font-family:Georgia,serif; font-size:1.2rem; font-weight:500; border-bottom:2px solid #bda173; padding-bottom:12px; margin-bottom:18px; }
.read-measures section > div { gap:18px 16px; }
.read-measures section > div > span { padding-bottom:10px; border-bottom:1px solid #dfd2bc; }
.read-measures small { color:#445570; font-size:.75rem; }
.read-measures strong { color:#15243e; font-size:1.05rem; font-weight:700; font-variant-numeric:tabular-nums; }
.piece-note { border-top:1px dashed #d9c9ac; padding-top:13px; margin-top:17px; }
.general-note { padding:0; border:0; background:transparent; border-radius:0; }
.piece-note,.general-note { color:#4d576a; font-size:.94rem; line-height:1.65; }
.editor-section { border-color:#e5ddd0; padding:28px; }
.editor-section h2 { font-family:Georgia,serif; color:#14233b; font-size:1.5rem; font-weight:500; }
.editor-section p,.section-help { color:#647087; }
.field { color:#34435c; font-size:.88rem; font-weight:600; }
.field input,.field textarea,.field select { background:#fffdf9; border:1px solid #cbbfae; border-radius:6px; min-height:48px; font-size:1rem; }
.field input:focus-visible,.field textarea:focus-visible,.field select:focus-visible { outline:none; border-color:#a78040; box-shadow:0 0 0 3px #a780401a; }
.field textarea { min-height:96px; line-height:1.6; }
.measure-grid .field input { min-height:46px; font-variant-numeric:tabular-nums; font-weight:650; }
.measure-card .field input { background:#fffdf9; border-color:#bca789; }
.garment-choice { min-height:50px; color:#34435c; background:#fffdf9; border:1px solid #cbbda5; border-radius:6px; }
.garment-choice.selected { color:#162941; background:#eee3cf; border-color:#aa844b; box-shadow:inset 0 -2px #aa844b; }
.check-line { color:#354663; line-height:1.5; }
.date-picker-button { min-height:48px; color:#2c4162; background:#fffdf9; border-color:#cbbfae; border-radius:6px; }
.appointment-row { background:#f5f0e7; border:1px solid #e0d4c1; border-radius:7px; padding:16px; }
.editor-actions { background:transparent; border-top:1px solid #ded6c9; border-radius:0; box-shadow:none; }
.dialog-form .editor-actions { border-top:0; }
.payment-summary span { border-radius:7px; }
.payment-summary strong,.payment-row strong { font-variant-numeric:tabular-nums; }
.payment-summary .payment-price { background:#e8edf5; color:#253c5d; border-color:#b9c6d9; }
.payment-summary .payment-price strong { color:#172e51; }
.payment-summary .payment-paid { background:#f1eee8; color:#666b73; border-color:#d5d0c6; }
.payment-summary .payment-paid strong { color:#5b6068; }
.payment-summary .payment-balance { background:#fff0ea; border-color:#e5bcae; }
.payment-row { border-color:#e5ddd0; }
.danger-zone button { color:#a33d34; background:var(--mj-paper); }
/* Agenda, diálogos y selección de cliente. */
[data-slot="dialog-content"],[data-slot="alert-dialog-content"] { background:var(--mj-paper); border-color:#d8c8aa; border-radius:12px; box-shadow:0 24px 80px #07101f38; }
[data-slot="dialog-overlay"],[data-slot="alert-dialog-overlay"] { background:#07101f99; backdrop-filter:blur(4px); }
[data-slot="dialog-title"],[data-slot="alert-dialog-title"] { color:#07101f; font-family:Georgia,serif; font-weight:500; letter-spacing:-.025em; }
[data-slot="dialog-description"],[data-slot="alert-dialog-description"] { color:#626d80; line-height:1.6; }
[data-slot="dialog-close"] { color:#233957; border-color:#cbbda5 !important; background:#fffdf9 !important; }
.start-choice { min-height:210px; background:#f5eee1; border:1px solid #dac7a5; border-radius:9px; }
.start-choice:hover,.start-choice:focus-visible { background:#ede0c6; border-color:#a78040; transform:translateY(-2px); box-shadow:0 7px 20px #07101f0d; }
.start-choice-icon { background:#111e32; color:#e4c99a; border-radius:50%; }
.start-choice strong { color:#15243e; font-family:Georgia,serif; font-size:1.5rem; font-weight:500; }
.start-choice small { color:#647087; }
.start-choice > svg { color:#a78040; }
.start-results,.start-preview { border-color:#d8cbb5; border-radius:8px; }
.start-preview { background:#faf7f1; border:1px solid #ded6c9; box-shadow:none; }
.start-preview > p { color:#52627b; }
.calendar-toolbar strong { color:#17253d; font-family:Georgia,serif; font-weight:500; font-size:1.5rem; }
.calendar-day,.calendar-blank { background:var(--mj-paper); border-color:#ded2be; border-radius:6px; }
.calendar-day:hover { background:#f0e6d3; }
.calendar-day.selected { background:#e9edf5; border-color:#536d93; box-shadow:inset 0 0 0 1px #536d93; }
.calendar-day.is-today > strong { color:#fffdf9; background:#172e51; }
.calendar-weekday { color:#876736; font-weight:650; }
.calendar-details { background:#f1e9db; border-color:#d8c8aa; border-radius:8px; }
.calendar-details h3 { color:#233957; font-family:Georgia,serif; }
.calendar-event { background:var(--mj-paper); border-color:#d8cbb5; border-radius:6px; }
.calendar-event:hover { background:#eee3cf; }
.calendar-legend { color:#52627b; font-size:.88rem; }
.archive-backup { margin-top:34px; padding-top:26px; border-color:#c9b48d; }
.archive-backup a { background:#111e32; border-radius:6px; font-family:'Segoe UI',Arial,sans-serif; }
.archive-backup a:hover { background:#263f65; }
.colored-status-menu { animation:mj-menu-enter .16s ease-out; }
.colored-status-trigger { border-radius:6px; }
/* Acceso sin alterar la autenticación. */
.welcome-page { background:#07101f; }
.welcome-card { position:relative; background:#fffdf9; border:1px solid #c5a56e; border-radius:10px; padding:50px; box-shadow:0 22px 70px #00000030; }
.welcome-card::before { content:''; position:absolute; inset:9px; border:1px solid #decdaa; border-radius:4px; pointer-events:none; }
.welcome-emblem { color:#a78040; background:#f1e8d6; border:1px solid #d8c8aa; }
.welcome-card h1 { color:#07101f; font-family:Georgia,serif; font-weight:500; letter-spacing:-.035em; }
.welcome-card p { color:#647087; }
.welcome-button,.login-google { background:#111e32; border-radius:6px; }
.login-google:hover { background:#263f65; }
/* Movimiento breve: entrada, selección y respuesta táctil. */
@keyframes mj-page-enter { from { opacity:0; transform:translateY(9px); } to { opacity:1; transform:translateY(0); } }
@keyframes mj-menu-enter { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@keyframes mj-dialog-enter { from { opacity:0; scale:.98; } to { opacity:1; scale:1; } }
.dashboard,.editor-page,.welcome-card { animation:mj-page-enter .26s ease-out both; }
[data-slot="dialog-content"][data-state="open"],[data-slot="alert-dialog-content"][data-state="open"],.ficha-modal { animation:mj-dialog-enter .22s ease-out; }
/* Tablet: una ficha legible junto a la lista, sin comprimir el selector. */
@media(min-width:701px) and (max-width:1100px) {
  .app-header { height:80px; min-height:80px; gap:18px; padding-inline:24px; }
  .dashboard,.editor-page { padding:30px 24px 42px; }
  .orders-detail-grid,.customers-detail-grid { grid-template-columns:250px minmax(0,1fr); gap:18px; }
  .panel-head { padding:22px 20px; }
  .detail-head,.detail-section,.info-grid { padding:24px 22px; }
  .order-title-status { flex-direction:column; align-items:stretch; gap:20px; }
  .status-picker-block { width:100%; min-width:0; }
  .info-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .orders-list-collapsed .order-title-status { flex-direction:row; }
  .orders-list-collapsed .status-picker-block { width:auto; min-width:205px; }
  .start-order-button { min-height:110px; }
}
@media(max-width:700px) {
  html { scroll-padding-top:130px; }
  .app-header { display:grid; grid-template-columns:minmax(0,1fr) 41px; grid-template-areas:'brand user' 'nav calendar'; height:auto; min-height:100px; padding:12px 16px 9px; gap:10px; }
  .app-brand { grid-area:brand; min-width:0; gap:10px; }
  .app-brand strong { font-size:1.32rem; }
  .app-brand small { font-size:.55rem; letter-spacing:.08em; }
  .brand-icon { flex:none; width:35px; height:35px; }
  .header-calendar { grid-area:calendar; justify-self:end; width:41px; height:41px; }
  .header-user { grid-area:user; justify-self:center; width:38px; height:38px; }
  .app-header .main-nav { grid-area:nav; justify-content:flex-start; margin-left:0; width:100%; height:auto; gap:4px; padding-top:0; }
  .main-nav button { min-height:40px; padding:9px 17px; font-size:.91rem; }
  .dashboard,.editor-page { padding:25px 16px 36px; }
  .dashboard-heading { margin-bottom:24px; gap:16px; }
  .dashboard-heading h1 { font-size:2.5rem; margin:9px 0 11px; }
  .dashboard-heading p { font-size:.92rem; }
  .panel-head { padding:21px 19px; }
  .start-order-button { min-height:104px; padding:18px 17px; gap:12px; margin-bottom:20px; }
  .start-order-icon { width:44px; height:44px; }
  .start-order-icon svg { width:24px; height:24px; }
  .start-order-button strong { font-size:1.5rem; }
  .start-order-button small { font-size:.88rem; }
  .start-order-button > svg { width:22px; }
  .detail-head,.detail-section,.info-grid,.editor-section { padding:23px 19px; }
  .order-title-status { flex-direction:column; align-items:stretch; gap:18px; }
  .status-picker-block { width:100%; min-width:0; }
  .read-measures section { padding:17px; }
  .start-choice { min-height:160px; padding:20px; }
  .welcome-card { padding:36px 28px; }
}
@media(max-width:360px) {
  .app-header { padding-inline:12px; gap:7px; }
  .app-brand small { display:none; }
  .app-brand strong { font-size:1.22rem; }
  .brand-icon { width:31px; height:31px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
