/* Libralto workspace. Legacy styles keep the specialized layouts; this layer
   owns the shared visual language and the responsive application shell. */
:root {
  color-scheme: light;
  --bg: #f5f7fa; --bg-2: #f5f7fa; --surface: #fff;
  --panel: #fff; --panel-solid: #fff; --ink: #243248; --muted: #66758a;
  --soft: #f0f5fc; --line: #e3e8ef; --brand: #2663d7; --brand-dark: #1c50b3;
  --brand2: #37829a; --accent: #ad6a1b; --pink: #66758a;
  --danger: #ba343d; --warning: #946009; --success: #207854;
  --shadow: 0 12px 40px #13203914; --shadow-soft: 0 2px 5px #13203904;
  --radius-xl: 12px; --radius-lg: 10px; --radius-md: 8px;
  --sidebar-width: 232px; --header-height: 72px;
}
html { scroll-padding-top: 90px; }
body { background: var(--bg); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body::before, .card::before, .stat::after { display: none; }
button, input, select, textarea { font: inherit; }
a { font-weight: 550; }
button, .button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #558ff0; outline-offset: 3px; }
[hidden] { display: none !important; }
.ui-icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 3000; padding: 12px 18px; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* Navigation */
.app-sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; z-index: 80; display: flex; flex-direction: column; background: #142238; color: #c1ccdd; border-right: 1px solid #ffffff08; }
.sidebar-brand, .auth-brand { display: flex; align-items: center; gap: 11px; }
.sidebar-brand { height: 85px; flex: 0 0 auto; padding: 20px 24px; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 34px; height: 37px; border-radius: 9px; color: #fff; background: #3277e6; font-size: 28px; font-weight: 750; line-height: 1; padding-right: 3px; }
.logo-mark span { position: absolute; width: 7px; height: 7px; right: 5px; top: 8px; background: #c6ddff; border-radius: 2px; }
.logo-word { color: #f5f8ff; font-size: 24px; font-weight: 650; letter-spacing: -.9px; line-height: 1.05; }
.logo-word > span { display: block; font-size: 9px; letter-spacing: 2.9px; color: #a5b5ce; margin-top: 6px; font-weight: 500; }
.workspace-label { display: flex; align-items: center; gap: 10px; margin: 8px 16px 24px; padding: 12px 10px; border: 1px solid #ffffff13; border-radius: 8px; color: #e1e7f1; font-size: 12px; font-weight: 600; }
.workspace-label small { display: block; font-size: 10px; color: #9caec7; font-weight: 400; margin-top: 2px; }
.workspace-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: #ffffff0b; border: 1px solid #ffffff15; color: #b6cff6; font-size: 14px; }
.sidebar-navigation { flex: 1; overflow-y: auto; padding: 0 12px 16px; scrollbar-width: thin; scrollbar-color: #394861 transparent; }
.nav-group + .nav-group { margin-top: 26px; }
.nav-group-label { margin: 0 12px 9px; font-size: 10px; letter-spacing: 1.25px; text-transform: uppercase; color: #91a3bc; font-weight: 600; }
.sidebar-link { display: flex; align-items: center; gap: 11px; min-height: 41px; margin: 3px 0; padding: 10px 12px; border-radius: 7px; color: #b9c6d9; font-size: 12px; font-weight: 450; position: relative; }
.sidebar-link .ui-icon { width: 18px; height: 18px; color: #94a8c4; }
.sidebar-link:hover { background: #ffffff09; color: #fff; }
.sidebar-link.is-active { color: #fff; background: #285fd1; font-weight: 600; }
.sidebar-link.is-active .ui-icon { color: #e5efff; }
.sidebar-footer { padding: 15px 16px 13px; border-top: 1px solid #ffffff10; }
.profile-link { display: flex; align-items: center; gap: 10px; padding: 5px 0; color: #e1e8f3; }
.profile-link:hover { color: #fff; }
.user-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; background: #d9e7fb; color: #2e5689; border-radius: 50%; font-size: 13px; font-weight: 650; }
.profile-copy { flex: 1; min-width: 0; }
.profile-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 550; }
.profile-copy small { display: block; color: #9cacc2; font-size: 10px; }
.profile-link > .ui-icon { width: 14px; color: #97a9c2; }
.sidebar-footer .logout-button { min-height: 30px; background: transparent; color: #adbed5; padding: 6px 0 0 44px; font-size: 10px; border: 0; box-shadow: none; }
.logout-button .ui-icon { width: 13px; height: 13px; }
.sidebar-close, .nav-toggle, .sidebar-backdrop { display: none; }
.app-topbar { position: sticky; top: 0; margin-left: var(--sidebar-width); height: var(--header-height); padding: 0 34px; display: flex; align-items: center; gap: 24px; background: #fff; border-bottom: 1px solid var(--line); z-index: 35; }
.breadcrumb { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 12px; color: #7a879a; }
.breadcrumb .ui-icon { width: 12px; }
.breadcrumb strong { color: #3e4a5e; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.global-search { display: flex; align-items: center; gap: 9px; margin-left: auto; width: 275px; background: #f7f9fc; border: 1px solid #e8edf3; border-radius: 7px; height: 36px; padding: 0 11px; }
.global-search .ui-icon { width: 16px; color: #8391a5; }
.global-search input { background: transparent; box-shadow: none; border: 0; padding: 0; min-width: 0; font-size: 11px; height: 100%; }
.global-search:focus-within { outline: 2px solid #75a5ee; outline-offset: 2px; }
.global-search input:focus { box-shadow: none; outline: none; background: transparent; }
.global-search kbd { font: 10px inherit; border: 1px solid #e0e6ee; padding: 0 5px; border-radius: 3px; color: #8692a4; }
.topbar-account { color: #576a85; border: 1px solid var(--line); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; margin-left: auto; }
.global-search + .topbar-account { margin-left: 0; }
.topbar-account .ui-icon { width: 17px; }
.app-shell > .container { width: auto; max-width: none; margin: 0 0 0 var(--sidebar-width); padding: 31px 34px 50px; min-height: calc(100vh - var(--header-height)); }
.container:focus { outline: none; }
.preview-notice { display: inline-flex; margin: -10px 0 21px; font-size: 10px; color: #7a8aa0; padding: 5px 9px; border: 1px dashed #d8e1ed; border-radius: 5px; background: #fafbfd; }

/* Shared components, including the existing account and administration forms. */
h1 { font-size: 27px; line-height: 1.25; letter-spacing: -.8px; font-weight: 650; margin: 0 0 9px; color: #1a2a41; overflow-wrap: anywhere; }
h2 { font-size: 15px; line-height: 1.4; letter-spacing: -.15px; font-weight: 650; margin: 0 0 16px; }
h3 { font-size: 14px; letter-spacing: -.1px; font-weight: 650; }
p { margin-top: 0; }
.container > h1 + .muted { margin-bottom: 25px; font-size: 13px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 27px; }
.page-heading p { margin: 0; font-size: 12px; color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.3px; text-transform: uppercase; color: #758398; margin: 0 0 7px; }
.page-heading .eyebrow { font-size: 10px; margin-bottom: 7px; }
.page-heading .actions { flex-shrink: 0; }
.card, .stat { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft); border-radius: 10px; padding: 22px; backdrop-filter: none; margin-bottom: 20px; }
.card { min-width: 0; }
.card > * { position: relative; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; }
.panel-heading p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.text-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11px; }
.text-link .ui-icon { width: 14px; height: 14px; }
.grid { gap: 17px; }
.grid-2 { gap: 20px; min-width: 0; }
.grid > *, .grid-2 > * { min-width: 0; }
.stat .number { font-size: 30px; font-weight: 650; letter-spacing: -.7px; color: #243248; }
.stat .label { font-size: 12px; font-weight: 500; color: var(--muted); }
label { color: #425068; font-weight: 550; font-size: 12px; margin: 15px 0 6px; }
input, select, textarea { border: 1px solid #dce3eb; background: #fff; border-radius: 6px; padding: 9px 11px; font-size: 13px; min-height: 39px; color: #334258; }
input::placeholder, textarea::placeholder { color: #8591a3; opacity: 1; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: #729ce9; box-shadow: 0 0 0 3px #2763d710; outline: none; }
input[disabled], select[disabled], textarea[disabled] { background: #f2f4f7; color: #6b778b; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--brand); vertical-align: middle; margin-right: 6px; box-shadow: none; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { display: flex; gap: 7px; align-items: baseline; }
label > input[type="checkbox"], label > input[type="radio"] { flex: 0 0 auto; }
textarea { min-height: 120px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 18px 0; min-width: 0; }
legend { color: #44536b; font-weight: 600; padding: 0 7px; font-size: 12px; }
button, .button { border: 1px solid transparent; border-radius: 6px; padding: 9px 14px; min-height: 37px; background: var(--brand); font-size: 12px; line-height: 1.4; font-weight: 550; box-shadow: 0 1px 2px #15336810; transition: background .15s, border-color .15s; }
button:hover, .button:hover { background: var(--brand-dark); color: #fff; transform: none; filter: none; box-shadow: none; }
button .ui-icon, .button .ui-icon { width: 16px; height: 16px; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.button.secondary, button.secondary, .button.light, button.light { background: #fff; color: #47556a; border: 1px solid #dce3eb; box-shadow: 0 1px 2px #14223804; }
.button.secondary:hover, button.secondary:hover, .button.light:hover, button.light:hover { background: #f4f7fb; color: #253c5e; border-color: #bbc9db; }
.button.danger, button.danger { background: #b93540; box-shadow: none; }
.icon-button { padding: 7px; background: transparent; color: #596980; border-color: var(--line); }
.badge { font-size: 10px; font-weight: 550; line-height: 1.45; padding: 4px 8px; background: #edf3fe; color: #3562ad; border: 1px solid #dee8fb; border-radius: 5px; white-space: nowrap; }
.badge.p1 { background: #fff0f0; color: #b13c43; border-color: #fadede; }
.badge.p2, .badge.wait { background: #fff7e8; color: #8e631c; border-color: #f4e8cd; }
.badge.p3, .badge.closed { background: #edf8f2; color: #277354; border-color: #d8ede1; }
.badge.p4 { background: #f1f4f8; color: #647286; border-color: #e3e8ef; }
.badge.status-new { background: #edf3fe; color: #3562ad; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #52637b; font-size: 11px; }
.flash { font-weight: 500; border: 1px solid var(--line); border-radius: 7px; box-shadow: none; font-size: 13px; }
.flash.error { color: #b93540; background: #fff0f0; }
.small { font-size: 12px; }
.actions { gap: 9px; }
.actions > h1 { margin-bottom: 18px; }
.container > .actions { margin-bottom: 20px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 20px; gap: 9px; text-align: center; color: #78879c; font-size: 12px; }
.empty-state .ui-icon { width: 28px; height: 28px; color: #94a9c6; }
.empty-state strong { color: #4a5c76; font-weight: 550; }
.empty-state p { margin: 0; }
.table-responsive { border-radius: 0; overscroll-behavior-x: contain; }
.table-responsive table { min-width: 0; }
table { width: 100%; border-spacing: 0; border-collapse: collapse; background: transparent; font-size: 12px; }
th, td { padding: 13px 12px; border-bottom: 1px solid #edf0f5; text-align: left; }
thead th { background: #f8fafc; color: #758297; font-size: 10px; text-transform: none; letter-spacing: .1px; font-weight: 550; white-space: nowrap; }
tbody tr { background: transparent; box-shadow: none; }
tbody td:first-child, tbody td:last-child { border-radius: 0; }
tbody tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f8faff; }
td { color: #516077; }
.ticket-table { table-layout: auto; min-width: 820px !important; }
.ticket-table th, .ticket-table td { white-space: nowrap; }
.ticket-table :is(th,td):nth-child(n) { min-width: auto; max-width: none; width: auto; }
.ticket-table .ticket-subject { white-space: normal; min-width: 220px; }
.ticket-subject a { display: block; font-size: 12px; color: #2b3c55; font-weight: 550; }
.ticket-subject a:hover { color: var(--brand); text-decoration: underline; }
.ticket-subject .ticket-reference { display: block; color: #8591a2; font-size: 10px; margin-bottom: 3px; font-weight: 450; letter-spacing: .2px; }
.table-footer { border-top: 1px solid var(--line); margin: 5px -22px -22px; padding: 13px 22px; color: #78869b; font-size: 10px; display: flex; justify-content: space-between; gap: 12px; }
.filter-card { padding: 18px 22px; }
.ticket-filters { display: grid; grid-template-columns: minmax(180px,2fr) repeat(3,minmax(100px,1fr)) auto; align-items: end; gap: 14px; }
.ticket-filters label { margin-top: 0; font-size: 11px; }
.filter-actions { display: flex; align-items: center; gap: 12px; }
.filter-actions a { font-size: 11px; color: #67758a; }

/* Overview */
.metrics-grid { margin-bottom: 26px; }
.metric-card { margin: 0; padding: 19px 21px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; background: #edf3fe; color: #4b78c9; }
.metric-icon .ui-icon { width: 17px; height: 17px; }
.metric-card .number { margin: 7px 0 3px; }
.metric-card .metric-note { color: #8591a3; font-size: 10px; }
.metric-card.critical .metric-icon { background: #fff0ef; color: #c36b6b; }
.metric-card.waiting .metric-icon { background: #fff6e7; color: #b68b47; }
.metric-card.resolved .metric-icon { background: #edf8f1; color: #408b67; }
.dashboard-main { grid-template-columns: minmax(0,1fr) 310px; gap: 22px; }
.dashboard-side { gap: 0; }
.dashboard-main .ticket-table { min-width: 560px !important; }
.dashboard-main .ticket-table .ticket-subject { min-width: 170px; }
.dashboard-main .tickets-card { padding-bottom: 22px; }
.workload-list { display: grid; gap: 21px; }
.workload-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: start; column-gap: 10px; }
.workload-row .user-avatar { width: 30px; height: 30px; font-size: 11px; background: #eff3f8; color: #697e9f; }
.workload-name strong { display: block; font-size: 12px; font-weight: 550; }
.workload-name small { display: block; font-size: 10px; color: #8290a4; }
.workload-count { background: #f2f5f9; color: #506681; border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.workload-meter { grid-column: 2 / 4; height: 4px; border-radius: 3px; background: #eef2f7; margin-top: 10px; overflow: hidden; }
.workload-meter > span { display: block; height: 100%; border-radius: 3px; background: #6f98df; }
.upcoming-item { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf0f5; }
.upcoming-item:last-child { border-bottom: 0; padding-bottom: 0; }
.upcoming-item > .ui-icon { width: 18px; color: #6e8fbe; margin-top: 3px; }
.upcoming-item strong { display: block; font-size: 12px; font-weight: 550; color: #3b4e69; }
.upcoming-item small { display: block; color: #8390a3; font-size: 10px; margin-top: 3px; }
.upcoming-item a { font-size: 10px; }
.ticket-context-grid { grid-template-columns: minmax(280px,.85fr) minmax(0,1.5fr); }
.ticket-context-grid table { font-size: 12px; }
.ticket-context-grid th { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: #79869a; width: 32%; }
.ticket-context-grid .table-responsive table { min-width: 0; }
.ticket-context-grid .card { align-self: start; }
.comment { border-left: 3px solid #96b5e6; background: #f8faff; border-radius: 7px; padding: 16px 18px; }
.comment.internal { border-left-color: #d8b774; background: #fffaf0; }

/* Administration and shared dialogs. */
.admin-layout { grid-template-columns: 204px minmax(0,1fr); gap: 24px; margin-top: 26px; }
.admin-sidebar { top: 95px; padding: 16px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: none; backdrop-filter: none; }
.admin-sidebar h2 { font-size: 12px; padding: 0 6px; margin-bottom: 14px; }
.admin-sidebar a { padding: 9px 10px; font-size: 11px; font-weight: 500; background: transparent; color: #637189; border-radius: 6px; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: #edf3fc; border-color: transparent; color: #245db5; box-shadow: none; }
.organization-subnav { background: #eef2f7; border: 1px solid #e6ebf2; padding: 4px; border-radius: 7px; gap: 3px; }
.organization-subnav a { font-size: 11px; border: 0; border-radius: 5px; background: transparent; padding: 8px 12px; }
.organization-subnav a.active { background: #fff; color: #245db5; box-shadow: 0 1px 4px #24324810; }
.section-title-row h2 { font-size: 15px; }
.memo, .connector-test-panel { border-color: var(--line); background: #f7f9fc; border-radius: 8px; }
.info-trigger { border: 1px solid #dce4f0; color: #7a8da8; background: #f6f8fc; box-shadow: none; width: 20px; height: 20px; min-height: 0; font-size: 12px; padding: 0; margin-left: 7px; }
.info-trigger:hover { background: #e8f0fc; color: #2d609f; box-shadow: none; }
.org-chart-node { border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.org-chart-node.chief { background: #285bb0; }
.org-chart-node.referent { background: #eff7f6; border-color: #d6e8e4; }
.org-chart-node.supervisor { background: #f7f4ee; border-color: #ebe2d3; }
.org-chart-connector { background: #c4d4e9; }
.permission-profile-card.protected { background: #edf3fc; }
.permission-category-row th { background: #eaf0f9; color: #46618a; letter-spacing: .4px; font-weight: 600; }
.permission-toggle input:checked + span, .permission-toggle input:disabled + span { background: #3672d6; }
.icon-action.edit.active { background: #2c66cb; }
.info-trigger:focus-visible { background: #e8f0fc; color: #2d609f; }
.modal-backdrop, .modal-form-root .modal-form-backdrop { background: #15223870; backdrop-filter: blur(3px); }
.admin-modal, .modal-form-window { background: #fff; border: 1px solid #e0e6ee; border-radius: 12px; box-shadow: 0 25px 90px #13203935; }
.admin-modal-header, .modal-form-header { background: #fff; border-bottom: 1px solid var(--line); padding: 20px 24px; }
.admin-modal-header h2, .modal-form-header h1 { font-size: 19px; }
.modal-kicker { font-size: 10px; color: #7b8ba1; }
.admin-modal-body { padding: 22px 24px; }
.modal-close { background: #f2f5f9; color: #667b96; border: 1px solid var(--line); box-shadow: none; border-radius: 6px; min-height: 30px; }
.modal-close:hover { background: #eaf0f9; color: #31557f; }
.modal-detail-row { border-color: var(--line); background: #f8fafc; border-radius: 7px; }
dialog { width: min(660px,calc(100% - 32px)); max-width: 660px; max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 25px 90px #13203935; padding: 26px; color: var(--ink); background: #fff; }
dialog::backdrop { background: #15223880; backdrop-filter: blur(3px); }
dialog[open] { position: fixed; inset: 0; margin: auto; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 17px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 20px; margin-bottom: 0; }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.dialog-actions .secondary { margin-left: auto; }

/* Planning: all 24 hours remain reachable in day and week views. */
.planning-tabs { display: flex; gap: 25px; border-bottom: 1px solid #dde5ef; margin-bottom: 24px; overflow-x: auto; }
.planning-tabs a { white-space: nowrap; font-size: 12px; font-weight: 500; color: #738198; padding: 0 2px 14px; border-bottom: 2px solid transparent; }
.planning-tabs a:hover { color: #235db8; }
.planning-tabs a[aria-current] { color: #255eb7; border-bottom-color: #306ccd; font-weight: 600; }
.planning-workspace { display: grid; grid-template-columns: minmax(0,1fr) 258px; gap: 22px; align-items: start; }
.calendar-panel { padding: 0; overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px; }
.calendar-toolbar h2 { font-size: 14px; margin: 0; }
.calendar-date-nav { display: flex; align-items: center; gap: 5px; }
.calendar-date-nav .icon-button { width: 27px; height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; font-size: 20px; }
.calendar-date-nav .button { font-size: 10px; min-height: 30px; padding: 5px 9px; }
.calendar-view-switch { display: flex; margin-left: auto; background: #f0f3f8; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.calendar-view-switch a { font-size: 10px; padding: 4px 9px; color: #7b889b; border-radius: 4px; }
.calendar-view-switch a[aria-current] { background: #fff; color: #3c6196; box-shadow: 0 1px 3px #1c334517; }
.planning-team-filter { display: flex; align-items: center; gap: 10px; padding: 0 18px 15px; }
.planning-team-filter label { margin: 0; font-size: 11px; }
.planning-team-filter select { max-width: 250px; font-size: 11px; min-height: 31px; padding: 5px 8px; }
.planning-team-filter button { min-height: 31px; font-size: 10px; padding: 5px 9px; }
.calendar-scroll { height: 590px; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scroll-behavior: auto; }
.time-calendar { min-width: 650px; }
.time-calendar.day { min-width: 280px; }
.time-calendar-heading { display: grid; grid-template-columns: 55px repeat(7,minmax(0,1fr)); height: 66px; position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.time-calendar.day .time-calendar-heading, .time-calendar.day .time-calendar-body { grid-template-columns: 55px minmax(0,1fr); }
.calendar-zone { font-size: 8px; color: #8e9bad; padding: 22px 5px 0; overflow-wrap: anywhere; text-align: center; line-height: 1.3; }
.calendar-day-label { display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 1px; border-left: 1px solid #edf0f5; padding: 8px; color: #78869b; }
.calendar-day-label > span { font-size: 9px; }
.calendar-day-label strong { font-size: 17px; font-weight: 500; width: 27px; height: 27px; display: grid; place-items: center; }
.calendar-day-label.is-today { color: #336bc8; }
.calendar-day-label.is-today strong { background: #2e69d6; color: #fff; border-radius: 50%; font-size: 14px; }
.time-calendar-body { display: grid; grid-template-columns: 55px repeat(7,minmax(0,1fr)); height: 1536px; }
.calendar-hours { position: relative; background: #fff; }
.calendar-hours > span { position: absolute; right: 9px; font-size: 9px; color: #91a0b4; padding-top: 4px; }
.calendar-day-track { position: relative; border-left: 1px solid #edf0f5; background: repeating-linear-gradient(to bottom,transparent 0,transparent 31px,#f2f5f9 31px,#f2f5f9 32px,transparent 32px,transparent 63px,#e7edf4 63px,#e7edf4 64px); }
.calendar-day-track.is-today { background-color: #fafcff; }
.calendar-event { position: absolute; left: 3px; right: 3px; display: block; min-height: 24px; overflow: hidden; padding: 6px 7px; text-align: left; background: #edf3fe; color: #446995; border: 1px solid #e0e9f9; border-left: 3px solid #7298d5; border-radius: 4px; box-shadow: none; font-size: 10px; }
.calendar-event:hover { background: #e1ecfd; color: #214e8d; z-index: 3; }
.calendar-event strong, .calendar-event small { display: block; font-size: 10px; line-height: 1.4; font-weight: 550; }
.calendar-event small { font-size: 9px; font-weight: 400; margin-top: 4px; }
.calendar-event-time { font-size: 9px; font-weight: 450; display: block; margin-bottom: 3px; }
.calendar-event.kind-CONGE, .calendar-event.kind-ABSENCE, .event-card.kind-CONGE, .event-card.kind-ABSENCE { background: #fff7e9; border-color: #efdcb4; border-left-color: #cca354; color: #85652c; }
.calendar-event.kind-PERMANENCE_HOTLINE, .calendar-event.kind-ASTREINTE, .event-card.kind-PERMANENCE_HOTLINE, .event-card.kind-ASTREINTE { background: #eef8f2; border-color: #dcece1; border-left-color: #70aa86; color: #4c7c61; }
.calendar-legend { display: flex; align-items: center; gap: 18px; padding: 15px 18px; flex-wrap: wrap; color: #8190a4; font-size: 9px; }
.calendar-legend span { display: inline-flex; gap: 6px; align-items: center; }
.calendar-legend i { width: 7px; height: 7px; background: #7598d1; border-radius: 2px; }
.calendar-legend .legend-green { background: #76a487; }
.calendar-legend .legend-amber { background: #c9a768; }
.unscheduled-panel { padding: 18px; }
.unscheduled-panel h2 { font-size: 14px; }
.unscheduled-panel .panel-heading > .ui-icon { color: #8ba0bd; width: 17px; }
.unscheduled-card { display: block; width: 100%; padding: 14px; margin: 0 0 12px; text-align: left; background: #fff; color: #485c77; border: 1px solid #e2e8f0; border-left: 3px solid #a9bfdf; border-radius: 7px; box-shadow: none; }
.unscheduled-card:hover { background: #f7faff; color: #254f8e; border-color: #a8c2ea; }
.unscheduled-kind { display: block; color: #8495ad; font-size: 9px; margin-bottom: 7px; }
.unscheduled-card strong { display: block; font-size: 12px; font-weight: 550; margin-bottom: 7px; }
.unscheduled-card small { display: block; font-size: 10px; font-weight: 400; }
.schedule-link { margin-top: 14px; padding-top: 10px; border-top: 1px solid #edf0f5; font-size: 10px; color: #4873b7; display: flex; align-items: center; justify-content: space-between; }
.planning-hint { color: #8593a7; font-size: 10px; margin: 18px 0 0; }
.month-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); min-width: 560px; border-top: 1px solid var(--line); }
.calendar-panel:has(.month-calendar) { overflow: auto; }
.month-day { min-height: 130px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.month-day h3 { font-size: 10px; color: #8290a4; font-weight: 400; margin: 0 0 10px; }
.month-day.is-today { background: #f3f7ff; }
.month-empty { color: #c8d1df; font-size: 11px; }
.event-card { width: 100%; display: block; text-align: left; background: #edf3fd; color: #4e709d; border: 1px solid #dce6f5; border-left: 3px solid #789bd1; border-radius: 4px; padding: 6px 7px; margin: 6px 0; box-shadow: none; }
.event-card small, .event-card strong { display: block; font-size: 9px; font-weight: 500; }
.event-card:hover { background: #e3edfc; color: #2e548c; }
#event-error { color: #b93540; font-size: 12px; }
#event-form textarea { min-height: 75px; }
.event-advanced { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fafbfd; }
#event-error:not(:empty) { padding: 12px; background: #fff1f2; border: 1px solid #f5d9dd; border-radius: 6px; }
summary { cursor: pointer; color: #526a8d; font-size: 12px; font-weight: 550; }
details[open] > summary { margin-bottom: 18px; }
@media (max-width: 1200px) { .planning-workspace { grid-template-columns: 1fr; } .unscheduled-panel { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; } .unscheduled-panel > .panel-heading, .unscheduled-panel > .planning-hint { grid-column: 1 / -1; } .unscheduled-card { margin: 0; } }
@media (max-width: 560px) { .planning-tabs { gap: 20px; } .calendar-toolbar { gap: 12px; padding: 14px; } .calendar-toolbar h2 { order: -1; width: 100%; } .calendar-scroll { height: 520px; } .calendar-view-switch a { padding: 4px 7px; } .unscheduled-panel { grid-template-columns: 1fr; } .planning-team-filter { flex-wrap: wrap; } }

/* Authentication */
.auth-shell { background: #f5f7fa; }
.auth-brand { justify-content: center; padding-top: 44px; }
.auth-brand .logo-word { color: #233a5a; }
.auth-brand .logo-word > span { color: #8191a7; }
.auth-shell > .container { width: min(100% - 32px,520px); margin: 28px auto; padding: 0; }
.auth-shell .card { padding: 32px; border: 1px solid #e0e7f1; box-shadow: 0 8px 30px #18345b06; border-radius: 12px; }
.auth-shell h1 { font-size: 24px; margin-bottom: 10px; }
.auth-shell p { color: #76849a; font-size: 12px; }
.auth-shell form button { width: 100%; margin-top: 10px; min-height: 42px; }
.auth-shell .auth-intro { margin-bottom: 24px; }
.auth-footnote { text-align: center; font-size: 11px; margin-top: 23px; }
.auth-lock { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; background: #edf3fd; color: #4a76bd; margin-bottom: 22px; }
.login-actions { margin: 18px 0 0; text-align: center; }
.login-actions a { font-size: 12px; }

@media (min-width: 1750px) { .app-shell > .container { padding-left: 46px; padding-right: 46px; } .dashboard-main { grid-template-columns: minmax(0,1fr) 350px; } }
@media (max-width: 1250px) { .app-shell > .container { padding: 26px 24px 40px; } .app-topbar { padding: 0 24px; } .dashboard-main { grid-template-columns: 1fr; } .dashboard-side { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; } .ticket-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .filter-actions { grid-column: 1 / -1; } .admin-layout { grid-template-columns: 180px minmax(0,1fr); gap: 18px; } }
@media (max-width: 1050px) { :root { --sidebar-width: 208px; } .sidebar-brand { padding-left: 20px; } .metrics-grid, .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .metric-card { padding: 18px; } .ticket-context-grid, .ticket-create-layout { grid-template-columns: 1fr; } .ticket-requester-history { position: static; } .page-heading { align-items: start; } }
@media (max-width: 800px) {
  :root { --header-height: 60px; --sidebar-width: 248px; }
  .app-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .nav-open .app-sidebar { transform: translateX(0); }
  .sidebar-close { display: grid; place-items: center; min-height: 28px; width: 28px; padding: 4px; background: #ffffff0d; color: #becce0; margin-left: auto; }
  .sidebar-brand { padding: 20px; }
  .nav-toggle { display: inline-flex; flex-shrink: 0; min-height: 34px; }
  .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 70; border: 0; border-radius: 0; padding: 0; background: #101e3266; }
  body.nav-open { overflow: hidden; }
  .app-topbar { margin: 0; padding: 0 18px; gap: 14px; }
  .breadcrumb { gap: 8px; }
  .breadcrumb > span, .breadcrumb > .ui-icon { display: none; }
  .breadcrumb strong { max-width: 200px; }
  .global-search { width: 210px; }
  .app-shell > .container { margin: 0; padding: 25px 20px 40px; }
  h1 { font-size: 25px; }
  .page-heading { margin-bottom: 22px; }
  .admin-layout { grid-template-columns: 1fr; margin-top: 20px; }
  .admin-sidebar { position: static; display: flex; overflow: auto; gap: 4px; padding: 8px; border-radius: 8px; }
  .admin-sidebar h2 { display: none; }
  .admin-sidebar a { white-space: nowrap; margin: 0; }
}
@media (max-width: 560px) {
  .app-topbar { gap: 12px; }
  .global-search { width: auto; flex: 1; min-width: 90px; }
  .global-search input { font-size: 11px; }
  .global-search kbd, .breadcrumb { display: none; }
  .topbar-account { flex-shrink: 0; }
  .app-shell > .container { padding: 23px 16px 36px; }
  .page-heading { flex-direction: column; gap: 16px; }
  .page-heading .actions { width: 100%; }
  .metrics-grid { gap: 12px; }
  .metric-card { padding: 15px; }
  .metric-icon { width: 27px; height: 27px; }
  .metric-card .label { font-size: 10px; }
  .metric-card .number { font-size: 28px; }
  .metric-note { font-size: 9px; }
  .dashboard-side, .grid-2 { grid-template-columns: 1fr; }
  .dashboard-side { gap: 0; }
  .card { padding: 18px; }
  .table-footer { margin: 5px -18px -18px; padding: 13px 18px; }
  .ticket-filters { grid-template-columns: 1fr; }
  .table-responsive .ticket-table, .dashboard-main .ticket-table { min-width: 0 !important; }
  .ticket-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .ticket-table tbody { display: block; }
  .ticket-table tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; padding: 5px; }
  .ticket-table tbody tr:last-child { margin-bottom: 6px; }
  .ticket-table tbody td { display: block; white-space: normal; overflow-wrap: anywhere; border: 0; padding: 8px; font-size: 11px; }
  .ticket-table tbody td::before { content: attr(data-label); display: block; font-size: 9px; color: #8492a6; margin-bottom: 4px; }
  .ticket-table tbody .ticket-subject { grid-column: 1 / -1; min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 4px; }
  .ticket-table tbody .ticket-subject::before { display: none; }
  .ticket-table tbody td[colspan] { grid-column: 1 / -1; }
  .ticket-filters > :first-child { grid-column: auto; }
  .panel-heading { gap: 10px; }
  .panel-heading h2 { font-size: 14px; }
  .auth-brand { padding-top: 30px; }
  .auth-shell .card { padding: 26px; }
  .organization-subnav { flex-wrap: nowrap; overflow: auto; }
  .organization-subnav a { white-space: nowrap; }
  .admin-modal-header, .modal-form-header, .admin-modal-body { padding: 18px; }
  dialog { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .app-sidebar, .app-topbar, .sidebar-backdrop, .skip-link { display: none !important; } .app-shell > .container { margin: 0; padding: 0; } body { background: #fff; } .card { box-shadow: none; } .table-responsive { overflow: visible; } }
