*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.6 var(--font)}button,input{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}button,a{ -webkit-tap-highlight-color:transparent}a{color:var(--primary-text);text-underline-offset:3px}button{color:inherit}button:disabled{cursor:default;opacity:.5}h1,h2,p{margin-top:0}h1,h2{color:var(--strong)}h1{font-size:28px;line-height:1.25;font-weight:400;letter-spacing:-.02em}h2{font-size:20px;line-height:1.4;font-weight:600}p{max-width:72ch}form{margin:0}.small{font-size:12px}.muted{color:var(--muted)}strong{font-weight:600}.icon{width:18px;height:18px;flex-shrink:0;stroke-width:1.75;vertical-align:middle}.brand{display:inline-flex}.brand img{width:125px;height:34px;object-fit:contain}.logo-dark{display:none}:root[data-theme=dark] .logo-light{display:none}:root[data-theme=dark] .logo-dark{display:block}.button,.icon-button,.text-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:var(--radius);border:1px solid transparent;text-decoration:none;font-size:13px;font-weight:500;background:transparent;line-height:20px}.button{min-height:36px;padding:8px 16px}.button.primary{background:var(--primary);color:#fff}.button.primary:hover{background:var(--primary-hover)}.button.ghost:hover,.icon-button:hover{background:var(--hover)}.icon-button{width:44px;height:44px;padding:0;flex-shrink:0}.text-button{color:var(--primary-text);padding:0;min-height:32px}.text-button:hover{text-decoration:underline}.wide{width:100%}.small .icon{width:14px;height:14px}.badge{display:inline-flex;align-items:center;background:var(--sunken);color:var(--muted);border:1px solid var(--border);border-radius:999px;font-size:11px;font-weight:500;padding:3px 9px;white-space:nowrap}::selection{background:var(--selected);color:var(--strong)}:focus-visible{outline:2px solid var(--focus);outline-offset:3px}input{caret-color:var(--primary-text)}*{scrollbar-width:thin;scrollbar-color:var(--input-border) transparent}dialog{background:var(--raised);color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow)}dialog::backdrop{background:rgb(0 0 0 / .4)}.dialog{width:min(440px,calc(100% - 32px));padding:24px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.dialog-heading h2{margin:0}.dialog p{color:var(--muted)}dt{font-size:12px;color:var(--muted)}dd{margin:0 0 16px;overflow-wrap:anywhere}.skip-link{position:fixed;left:16px;top:-100px;z-index:10;padding:10px;background:var(--surface)}.skip-link:focus{top:10px}
/* Login: same two-panel composition as the current CRM. */
.auth-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:100dvh}.auth-context,.auth-form-panel{padding:40px clamp(24px,4vw,72px);min-width:0}.auth-context{background:var(--sunken);border-right:1px solid var(--border);display:flex;flex-direction:column;justify-content:space-between;gap:40px}.auth-story h1{font-size:40px;max-width:20ch;line-height:1.15;font-weight:400;margin-bottom:20px}.auth-story>p{max-width:44ch;color:var(--muted);font-size:16px}.process-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:32px;font-size:12px;color:var(--muted)}.process-line span{padding:4px 9px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.process-line .icon{width:14px;height:14px}.auth-context>p{margin:0}.auth-form-panel{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px}.auth-card{width:min(420px,100%);padding:32px;background:var(--surface);border:1px solid var(--border);border-radius:16px}.auth-card h2{margin-bottom:8px}.auth-card>p{margin-bottom:0}.login-form{display:flex;flex-direction:column;gap:18px;margin-top:28px}.login-form label{display:block;font-size:13px;font-weight:500}.input-wrap{display:flex;align-items:center;position:relative;margin-top:8px}.input-wrap>svg{position:absolute;left:12px;color:var(--muted);pointer-events:none}.input-wrap input{width:100%;height:44px;padding:0 44px 0 40px;background:var(--surface);border:1px solid var(--input-border);border-radius:8px;color:var(--text);font-size:14px}.input-wrap input::placeholder{color:var(--muted)}.password-toggle{position:absolute;right:0;top:0}.field-hint{font-size:12px;color:var(--muted);margin:-12px 0 0}.forgot{align-self:flex-end;margin-top:-10px}.login-form .primary{min-height:44px}.demo-note{display:grid;gap:4px;font-size:12px;padding:16px;margin-top:24px;background:var(--sunken);border:1px solid var(--border);border-radius:8px;overflow-wrap:anywhere}.demo-note>span{color:var(--muted)}.demo-note button{justify-self:start;font-size:12px}.form-error{padding:12px;background:var(--danger-bg);color:var(--danger);border-radius:8px;margin-top:16px}.auth-foot{margin:0}
/* Organization selection. */
.selection-header{height:80px;display:flex;align-items:center;justify-content:space-between;padding:0 var(--gutter);border-bottom:1px solid var(--border);background:var(--surface);gap:16px}.account-actions{display:flex;align-items:center;gap:20px}.selection-main{max-width:820px;margin:64px auto;padding:0 24px}.selection-heading{margin-bottom:32px}.selection-heading h1{margin-bottom:12px}.selection-heading p{margin:0;max-width:60ch}.organization-list{border:1px solid var(--border);border-radius:12px;background:var(--surface);overflow:hidden}.organization-list form+form{border-top:1px solid var(--border)}.organization-choice{display:flex;align-items:center;gap:20px;width:100%;text-align:left;border:0;background:transparent;color:var(--text);padding:22px 24px;min-height:100px}.organization-choice:hover{background:var(--hover)}.organization-choice:focus-visible{outline-offset:-3px;background:var(--selected)}.organization-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:10px;background:var(--sunken);border:1px solid var(--border);color:var(--primary-text);flex-shrink:0}.organization-icon .icon{width:22px;height:22px}.organization-copy{display:grid;gap:3px;flex:1}.organization-title{font-size:15px;font-weight:600}.organization-description{font-size:13px;color:var(--muted)}.choice-arrow{color:var(--muted)}.selection-note{display:flex;align-items:center;gap:8px;margin-top:24px}
/* Shared authenticated shell. */
.app-shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);max-width:1920px;margin:auto;min-height:100dvh}.sidebar{position:sticky;top:0;height:100dvh;border-right:1px solid var(--border);background:var(--bg)}.sidebar-inner{display:flex;flex-direction:column;height:100%;padding:20px 12px 16px;min-height:0}.sidebar-brand{display:flex;justify-content:center;padding:0 12px 20px;flex-shrink:0}.sidebar-brand img{height:28px;width:110px}.main-nav{flex:1;min-height:0;overflow-y:auto;margin-bottom:16px;overscroll-behavior:contain}.nav-group{margin-bottom:4px}.nav-group summary{display:grid;grid-template-columns:18px minmax(0,1fr) 14px;gap:12px;align-items:center;min-height:36px;padding:8px 12px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;list-style:none;color:var(--strong)}.nav-group summary::-webkit-details-marker{display:none}.nav-group summary>.icon{color:var(--muted)}.nav-group summary:hover{background:var(--hover)}.nav-group .chevron{width:14px;height:14px;transform:rotate(-90deg)}.nav-group[open] .chevron{transform:rotate(0)}.nav-links{display:grid;gap:4px;padding-bottom:8px}.nav-item{display:flex;align-items:center;min-height:36px;padding:4px 12px 4px 42px;font-size:13px;line-height:20px;color:var(--text);text-decoration:none;border-radius:8px}.nav-item:hover{background:var(--hover)}.nav-item.is-active{background:var(--selected);color:var(--primary-text);font-weight:600}.workspace-switcher{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface);flex-shrink:0;overflow-wrap:anywhere}.workspace-switcher strong{font-size:13px}.workspace-identity{display:grid;gap:4px;min-width:0}
.workspace-switch-link{display:grid;place-items:center;width:36px;height:36px;border:1px solid currentColor;border-radius:50%;color:var(--primary-text);text-decoration:none}
.workspace-switch-link:hover{background:var(--selected)}
.workspace-switch-link .icon{width:calc(14px + 1pt);height:calc(14px + 1pt)}.app-area{min-width:0}.topbar{height:var(--topbar);display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);padding:0 var(--gutter);background:var(--surface)}.section-heading,.topbar-actions{display:flex;align-items:center;gap:4px;min-width:0}.section-heading h1{font-size:16px;font-weight:600;letter-spacing:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.help-button{color:var(--muted)}.profile-button{display:flex;align-items:center;gap:12px;border:1px solid transparent;border-radius:8px;background:transparent;min-height:44px;padding:4px 8px}.profile-button:hover{background:var(--hover)}.profile-text{display:grid;text-align:right;line-height:18px}.profile-text strong{font-size:13px}.profile-text small{font-size:11px;color:var(--muted)}.profile-button>.icon{width:14px;height:14px;color:var(--muted)}.profile-initials{display:none}.mobile-menu-button{display:none}.workspace{padding:32px var(--gutter) 16px;min-height:calc(100dvh - var(--topbar));display:flex;flex-direction:column}.planned-section{min-height:440px;flex:1;border:1px solid var(--border);border-radius:12px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px}.planned-icon{display:grid;place-items:center;width:56px;height:56px;border:1px solid var(--border);border-radius:12px;color:var(--muted);background:var(--sunken);margin-bottom:20px}.planned-icon .icon{width:24px;height:24px}.planned-section .badge{margin-bottom:16px}.planned-section h2{margin-bottom:12px}.planned-section>p{max-width:53ch;color:var(--muted);margin-bottom:8px}.planned-section>.small{max-width:60ch;margin-top:12px}.workspace-foot{display:flex;justify-content:space-between;gap:16px;font-size:11px;color:var(--muted);padding-top:16px}.user-popover,.help-popover{background:var(--raised);color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:20px;position:fixed;margin:0}.user-popover{inset:60px 20px auto auto;width:min(332px,calc(100vw - 24px))}.help-popover{inset:64px auto auto calc(var(--sidebar) + var(--gutter));max-width:min(360px,calc(100vw - 32px))}.help-popover p{margin:0;font-size:13px;color:var(--muted)}.profile-identity{display:grid;gap:2px;overflow-wrap:anywhere}.notification-empty{display:flex;gap:12px;border-bottom:1px solid var(--border);margin-top:20px;padding-bottom:16px}.notification-empty>.icon{color:var(--muted);margin-top:3px}.notification-empty strong{font-size:13px}.notification-empty p{margin:4px 0 0}.profile-actions{display:grid;margin:8px 0}.profile-actions .button,.logout-form .button{justify-content:flex-start;padding-left:8px;width:100%}.theme-choice{display:flex;padding:0;border:0;gap:4px;margin:16px 0}.theme-choice legend{font-size:12px;color:var(--muted);margin-bottom:10px}.theme-choice button{display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center;min-height:64px;flex:1;border:1px solid var(--border);border-radius:8px;background:var(--surface);font-size:12px}.theme-choice button[aria-pressed=true]{color:var(--primary-text);background:var(--selected);border-color:var(--primary-text)}.logout-form{padding-top:12px;border-top:1px solid var(--border)}.nav-dialog{inset:0 0 0 auto;margin:0;padding:0;width:min(300px,calc(100vw - 32px));height:100dvh;max-height:100dvh;border-radius:0;max-width:100vw}.nav-dialog[open]{display:flex;flex-direction:column}.mobile-nav-heading{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);font-weight:600}.nav-dialog .sidebar-inner{flex:1;overflow:hidden}
@media(width<960px){.auth-layout{grid-template-columns:1fr}.auth-context{padding:24px;border-right:0;border-bottom:1px solid var(--border);gap:24px}.auth-story h1{font-size:28px;max-width:25ch}.auth-story>p{font-size:14px}.process-line,.auth-context>p{display:none}.auth-form-panel{padding:32px 24px}.app-shell{display:block}.sidebar{display:none}.mobile-menu-button{display:inline-flex}.profile-text,.profile-button>.icon{display:none}.profile-initials{display:grid;place-items:center;font-size:13px;font-weight:600;width:36px;height:36px;border-radius:50%;background:var(--selected);color:var(--primary-text)}.profile-button{padding:3px}.help-popover{left:16px}.nav-item{min-height:44px}.nav-group summary{min-height:44px}.workspace{padding-top:20px}.selection-main{margin-top:40px}.input-wrap input{font-size:16px}}
@media(width<640px){.selection-header{height:64px}.selection-header .brand img{width:100px}.account-actions>span{display:none}.selection-main{padding:0 16px;margin:32px auto}.selection-heading h1{font-size:26px}.organization-choice{gap:12px;padding:18px 16px;flex-wrap:wrap}.organization-icon{width:36px;height:36px}.organization-copy{flex-basis:calc(100% - 74px)}.organization-choice .badge{margin-left:48px;order:3}.choice-arrow{width:14px}.organization-description{font-size:12px}.selection-note{align-items:flex-start}.auth-card{padding:24px}.auth-context{padding:24px}.auth-form-panel{padding:24px 16px}.auth-story h1{font-size:26px}.auth-story p{margin-bottom:0}.planned-section{padding:32px 20px;min-height:430px}.planned-section h2{font-size:18px}.workspace-foot{flex-wrap:wrap;gap:4px}.topbar{gap:8px}.workspace{min-height:calc(100dvh - 64px)}.section-heading h1{max-width:190px}.section-heading .icon-button{width:32px}.selection-header .button{padding:8px}}
@media(prefers-reduced-motion:no-preference){button,a{transition:background-color .15s ease,color .15s ease}.organization-choice .choice-arrow{transition:transform .15s ease}.organization-choice:hover .choice-arrow{transform:translateX(3px)}}
/* Fidelity pass: existing CRM shell and supplied reference, 15 November 2026. */
.brand img{height:32px;width:auto;max-width:160px}.brand .logo-holawa{display:none}
:root[data-brand=holawa] .brand .logo-light,:root[data-brand=holawa] .brand .logo-dark{display:none}
:root[data-brand=holawa] .brand .logo-holawa{display:block;max-width:120px}
.sidebar-brand img{height:32px;width:auto;max-width:160px}
.topbar{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(8px)}
.profile-button{position:relative;max-width:280px;min-height:44px;padding:8px 12px;border:1px solid var(--input-border);border-radius:12px;background:var(--surface)}
.profile-button.has-notifications{border-color:var(--primary)}
.profile-text{text-align:left;min-width:0;line-height:20px}.profile-text small{line-height:16px}.profile-text strong,.profile-text small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.notification-badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;display:grid;place-items:center;padding:0 4px;border-radius:999px;background:var(--primary);color:#fff;font-size:11px;line-height:16px}.notification-badge[hidden]{display:none}
.user-popover{width:min(360px,calc(100vw - 24px));inset:calc(var(--topbar) + 4px) calc(max(0px,(100vw - 1920px)/2) + var(--gutter)) auto auto;padding:8px;max-height:calc(100dvh - 80px);overflow-y:auto}
.user-popover hr{border:0;border-top:1px solid var(--border);margin:12px 0}
.notification-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;margin-bottom:10px;font-size:13px}.notification-header .text-button{font-size:12px}
.notification-list{display:grid;gap:4px;padding:0;margin:0;list-style:none}
.notification-list li{position:relative;display:grid;gap:4px;padding:12px 12px 12px 20px;border:1px solid var(--border);border-radius:8px;font-size:12px;overflow-wrap:anywhere}
.notification-list strong{font-size:13px;font-weight:500;line-height:20px}.notification-list li>span:not(.unread-dot){font-size:12px;line-height:20px;color:var(--muted)}
.notification-list .is-unread{background:var(--selected)}.notification-list .is-unread>span:not(.unread-dot){color:var(--primary-text)}
.unread-dot{position:absolute;top:20px;left:8px;width:6px;height:6px;border-radius:50%;background:var(--primary)}
.notification-list li:not(.is-unread) .unread-dot{display:none}
.profile-actions{gap:4px;margin:0}.profile-actions .button{background:var(--sunken);border:1px solid var(--border);padding:7px 16px;min-height:36px;color:var(--muted)}.profile-actions .button:disabled{opacity:.65}
.theme-choice,.brand-choice{display:grid;gap:8px;margin:0;padding:8px 0;grid-template-columns:repeat(3,minmax(0,1fr))}
.theme-choice button,.brand-choice button{display:flex;align-items:center;justify-content:center;height:44px;min-height:44px;border:1px solid var(--button-border);border-radius:8px;background:var(--surface);color:var(--text)}
.theme-choice button[aria-pressed=true]{border-color:var(--primary);color:var(--primary-text);background:var(--selected)}
.brand-choice{grid-template-columns:repeat(2,minmax(0,1fr))}.brand-choice img{height:24px;width:24px;object-fit:contain}.brand-choice button[aria-pressed=false] img{filter:grayscale(1);opacity:.4}.brand-choice button:hover,.theme-choice button:hover{background:var(--hover)}
:root[data-theme=dark] .brand-choice button[aria-pressed=false] img{filter:grayscale(1) brightness(1.75);opacity:.8}
.logout-form{padding:0;border:0}.logout-form .button{justify-content:center;background:var(--sunken);border:1px solid var(--border);color:var(--muted)}.logout-form .button:hover{background:var(--primary);border-color:var(--primary);color:#fff}
.workspace-switcher{box-shadow:0 1px 2px rgb(0 43 54 / .05)}.workspace-switcher strong{line-height:20px}.workspace-switcher .small{line-height:16px}
:root[data-theme=dark] .workspace-switcher{box-shadow:none}
@media(width<960px){.profile-button{width:44px;height:44px;padding:0;justify-content:center;border-radius:50%}.profile-initials{background:transparent;color:var(--text)}.user-popover{right:calc(var(--gutter) + 48px)}.nav-dialog .sidebar-brand img{max-width:110px}.theme-choice button,.brand-choice button{min-height:44px}}
@media(width<640px){.user-popover{right:12px}.selection-header .brand img{height:28px;width:auto;max-width:120px}}

/* Shared outline for light action buttons. */
.button.outline{border-color:var(--button-border);background:var(--surface)}

.badge.client-label{background:var(--primary);color:#fff;border-color:var(--primary)}

/* Navigation alerts follow the active brand in every section. */
.nav-item .nav-alert-badge,
.nav-item.is-active .nav-alert-badge{background:var(--primary);color:#fff}

.switch-field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  min-height: 44px;
  cursor: pointer;
}

input[type="checkbox"][role="switch"] {
  appearance: none;
  flex: none;
  width: 40px;
  height: 22px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background-color: var(--muted);
  background-image: radial-gradient(circle closest-side, #fff calc(100% - .5px), transparent);
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: left 2px center;
  cursor: pointer;
}

input[type="checkbox"][role="switch"]:checked {
  border-color: var(--primary-text);
  background-color: var(--primary);
  background-position: right 2px center;
}

input[type="checkbox"][role="switch"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

input[type="checkbox"][role="switch"]:disabled,
.switch-field:has(input:disabled) {
  cursor: not-allowed;
}

input[type="checkbox"][role="switch"]:disabled {
  opacity: .55;
}

@media (forced-colors: active) {
  input[type="checkbox"][role="switch"] {
    forced-color-adjust: none;
    border-color: ButtonText;
    background-color: ButtonFace;
    background-image: radial-gradient(circle closest-side, ButtonText calc(100% - .5px), transparent);
  }

  input[type="checkbox"][role="switch"]:checked {
    border-color: Highlight;
    background-color: Highlight;
    background-image: radial-gradient(circle closest-side, HighlightText calc(100% - .5px), transparent);
  }

  input[type="checkbox"][role="switch"]:focus-visible {
    outline-color: Highlight;
  }
}

.rule-grip {
  display: inline-block;
  margin-inline-end: 10px;
  color: var(--muted);
  cursor: grab;
  font-size: 12px;
  user-select: none;
}
.rule-grip:active { cursor: grabbing; }

norkut-label-chip.badge {
  color: var(--label-text, var(--text));
  background-color: var(--label-background, var(--sunken));
}
norkut-label-chip.badge.client-label {
  color: var(--label-text, #fff);
  background-color: var(--label-background, var(--primary));
}

[data-nav-section="presupuestos"][hidden] { display: none; }
