:root {
  color-scheme: light;
  --red: #d71920;
  --red-dark: #aa1017;
  --red-soft: #fff0f1;
  --ink: #172033;
  --muted: #687083;
  --line: #e7e9ef;
  --surface: #ffffff;
  --canvas: #f6f7f9;
  --green: #159447;
  --green-soft: #edf9f1;
  --orange: #ee8413;
  --orange-soft: #fff6e9;
  --blue: #1d72e8;
  --blue-soft: #edf5ff;
  --purple: #7440d5;
  --purple-soft: #f3efff;
  --shadow: 0 7px 28px rgba(24, 32, 51, 0.07);
  --radius: 18px;
  --sidebar: 250px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, select, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(29, 114, 232, 0.25); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-blue { color: var(--blue); }
.text-purple { color: var(--purple); }

.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ink); background: var(--surface); }
.spinner { width: 26px; height: 26px; border: 3px solid #f1d0d2; border-top-color: var(--red); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { font-size: 18px; }
.brand-lockup small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.brand-lockup--light small { color: rgba(255,255,255,.72); }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 0; border-radius: 15px; color: transparent; background: #d71920 url('/icons/icon-192.png') center / cover no-repeat; box-shadow: 0 6px 18px rgba(184,8,16,.16); }
.brand-mark span { opacity: 0; }
.brand-mark--large { width: 76px; height: 76px; border-radius: 24px 18px 24px 18px; }
.brand-mark--large span { font-size: 34px; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.08fr) minmax(420px, .92fr); background: #fff; }
.login-hero { position: relative; overflow: hidden; padding: 54px clamp(42px, 6vw, 94px); color: #fff; background: radial-gradient(circle at 20% 82%, rgba(255,255,255,.15), transparent 26%), linear-gradient(145deg, #b70810 0%, #d71920 52%, #ec3439 100%); }
.login-hero::before, .login-hero::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.login-hero::before { width: 480px; height: 480px; right: -210px; top: -120px; }
.login-hero::after { width: 640px; height: 640px; left: -330px; bottom: -390px; }
.login-hero__content { position: relative; z-index: 1; min-height: calc(100vh - 108px); display: flex; flex-direction: column; }
.login-copy { max-width: 680px; margin: auto 0; padding: 70px 0; }
.eyebrow { display: inline-block; margin-bottom: 12px; color: var(--red); font-weight: 800; font-size: 12px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; }
.login-copy .eyebrow { color: #ffd4d6; }
.login-copy h1 { max-width: 650px; margin: 0 0 22px; font-size: clamp(40px, 5vw, 68px); line-height: 1.04; letter-spacing: -.045em; }
.login-copy p { max-width: 570px; margin: 0; color: rgba(255,255,255,.82); font-size: 19px; line-height: 1.65; }
.login-benefits { display: flex; flex-wrap: wrap; gap: 18px 28px; color: rgba(255,255,255,.9); font-size: 14px; }
.login-panel { display: grid; place-items: center; padding: 44px; background: linear-gradient(180deg, #fff, #fbfbfc); }
.login-card { width: min(440px, 100%); }
.login-mobile-brand { display: none; }
.login-card h2 { margin: 0 0 8px; font-size: 42px; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 34px; color: var(--muted); }
.login-card form { display: grid; }
.login-card label { margin: 15px 0 8px; font-weight: 700; font-size: 14px; }
.input-wrap { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid #dcdfe6; border-radius: 12px; background: #fff; transition: border .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(215,25,32,.08); }
.input-wrap > span { color: var(--muted); }
.input-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.field-hint { margin: 6px 0 0; color: #8a91a0; }
.form-error { margin: 14px 0 0; padding: 10px 12px; color: #a80d14; border: 1px solid #fac7ca; border-radius: 10px; background: #fff2f3; font-size: 13px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 11px; background: #fff; cursor: pointer; font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button--primary { color: #fff; background: var(--red); box-shadow: 0 8px 22px rgba(215,25,32,.2); }
.button--primary:hover { background: var(--red-dark); }
.button--outline { color: var(--red); border-color: #ef9ca0; background: #fff; }
.button--soft { color: var(--red); background: var(--red-soft); }
.button--ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.button--full { width: 100%; margin-top: 24px; justify-content: space-between; padding: 0 22px; }
.button--small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.demo-access { display: grid; gap: 4px; margin-top: 24px; padding: 13px 15px; border: 1px dashed #e6a6a9; border-radius: 11px; color: #7c2327; background: #fff8f8; font-size: 12px; }
.security-note { display: block; margin-top: 18px; color: #8a91a0; text-align: center; }

.app-shell { min-height: 100vh; }
.desktop-sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 26px 18px; border-right: 1px solid var(--line); background: #fff; }
.desktop-sidebar .brand-lockup { padding: 0 10px 25px; border-bottom: 1px solid var(--line); }
.desktop-sidebar nav { display: grid; gap: 6px; margin-top: 24px; }
.nav-item { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 13px; padding: 0 14px; border: 0; border-radius: 12px; color: #525b6c; background: transparent; cursor: pointer; font-weight: 700; text-align: left; }
.nav-item span:first-child { width: 23px; font-size: 20px; text-align: center; }
.nav-item:hover { background: #f7f7f8; }
.nav-item.active { color: var(--red); background: var(--red-soft); }
.sidebar-emergency { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 13px; color: var(--red); border: 1px solid #f4c9cb; border-radius: 13px; background: #fff7f7; }
.sidebar-emergency strong, .sidebar-emergency small { display: block; }
.sidebar-emergency small { margin-top: 2px; color: #8b6264; }
.app-main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 25; top: 0; min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px clamp(24px, 4vw, 58px); border-bottom: 1px solid rgba(231,233,239,.9); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.topbar__identity { display: flex; align-items: center; gap: 12px; }
.topbar__identity h1 { margin: 0; font-size: clamp(26px, 2.5vw, 36px); line-height: 1.05; letter-spacing: -.035em; }
.topbar__identity p { margin: 6px 0 0; color: var(--muted); }
.mobile-brand { display: none; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.company-button, .icon-button { min-height: 44px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.company-button { display: flex; align-items: center; gap: 10px; padding: 0 15px; border-radius: 12px; }
.icon-button { min-width: 44px; display: inline-grid; place-items: center; padding: 0; border-radius: 12px; }
.notification-button { position: relative; color: var(--red); font-size: 22px; }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; color: #fff; border: 2px solid #fff; border-radius: 999px; background: var(--red); font-size: 11px; font-weight: 800; }
.header-logout { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; color: #8d1217; border: 1px solid #efc3c5; border-radius: 12px; background: #fff7f7; cursor: pointer; }
.header-logout:hover { color: #fff; border-color: var(--red); background: var(--red); }
.header-logout b { font-size: 11px; }
.content { width: min(1540px, 100%); margin: 0 auto; padding: 28px clamp(24px, 4vw, 58px) 64px; outline: 0; }
.mobile-nav { display: none; }

.page-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.filter-group, .action-group, .chips { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-select, .filter-button, .chip { min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: #3f4859; background: #fff; cursor: pointer; }
.filter-select { appearance: auto; }
.chip { display: inline-flex; align-items: center; gap: 7px; }
.chip.active { color: var(--red); border-color: #ef9ca0; background: var(--red-soft); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 15px; }
.section-heading h2, .section-heading h3 { margin: 0; letter-spacing: -.02em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.text-button { padding: 4px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.text-button:hover { color: var(--red); }
.panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel--flat { box-shadow: none; }

.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); margin-bottom: 18px; padding: 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.metric-card { min-height: 132px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 14px; text-align: center; border-right: 1px solid var(--line); }
.metric-card:last-child { border-right: 0; }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 2px; border-radius: 50%; font-size: 22px; }
.metric-card strong { font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.metric-card b { font-size: 13px; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-icon.red { color: var(--red); background: var(--red-soft); }
.metric-icon.orange { color: var(--orange); background: var(--orange-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.purple { color: var(--purple); background: var(--purple-soft); }

.priority-panel { margin-bottom: 18px; }
.priority-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.priority-card { min-height: 138px; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #fff, #fafafa); cursor: pointer; text-align: left; }
.priority-card:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(24,32,51,.06); }
.priority-card.critical { border-color: #f5d0d2; background: linear-gradient(145deg, #fff, #fff4f4); }
.priority-card.upcoming { border-color: #f6e3ca; background: linear-gradient(145deg, #fff, #fff9ef); }
.priority-card.attention { border-color: #e7dcfa; background: linear-gradient(145deg, #fff, #f8f5ff); }
.tag { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 6px; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.tag.red, .status-pill.red { color: var(--red); background: var(--red-soft); }
.tag.orange, .status-pill.orange { color: var(--orange); background: var(--orange-soft); }
.tag.green, .status-pill.green { color: var(--green); background: var(--green-soft); }
.tag.blue, .status-pill.blue { color: var(--blue); background: var(--blue-soft); }
.tag.purple, .status-pill.purple { color: var(--purple); background: var(--purple-soft); }
.priority-card h3 { margin: 11px 0 5px; font-size: 16px; }
.priority-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.priority-card time { margin-top: auto; padding-top: 11px; color: var(--red); font-size: 11px; }

.deadline-calendar-panel { margin-bottom: 18px; overflow: hidden; }
.deadline-calendar-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.deadline-alert { min-height: 70px; display: flex; align-items: center; gap: 11px; padding: 12px 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; cursor: pointer; text-align: left; }
.deadline-alert strong { min-width: 38px; font-size: 26px; text-align: center; }
.deadline-alert span { color: var(--muted); font-size: 11px; font-weight: 700; }
.deadline-alert.is-overdue { color: var(--red); border-color: #efb4b7; background: var(--red-soft); }
.deadline-alert.is-today { color: #a35600; border-color: #efcf9f; background: var(--orange-soft); }
.deadline-days { display: grid; grid-template-columns: repeat(14, minmax(72px, 1fr)); gap: 7px; overflow-x: auto; padding: 3px 1px 8px; }
.deadline-day { min-height: 94px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 8px 5px; color: #7a8291; border: 1px solid var(--line); border-radius: 11px; background: #fafbfc; }
.deadline-day:not(:disabled) { cursor: pointer; }
.deadline-day span { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.deadline-day strong { font-size: 22px; }
.deadline-day small { font-size: 8px; text-align: center; }
.deadline-day.is-today { box-shadow: inset 0 0 0 2px #dfe9f6; }
.deadline-day.has-items { color: #9b5500; border-color: #edc88f; background: #fff8eb; }
.deadline-day.has-critical { color: #a20e14; border-color: #ed9ca1; background: #fff1f2; }
.deadline-day:disabled { opacity: .72; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .85fr); gap: 18px; margin-bottom: 18px; }
.dashboard-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart-panel { min-height: 320px; }
.chart-wrap { position: relative; height: 235px; }
.chart-wrap canvas { width: 100%; height: 100%; }
.donut-layout { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 22px; }
.donut { --value: 82; position: relative; width: 168px; height: 168px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 54%, #8cc678 54% 82%, var(--orange) 82% 94%, var(--red) 94% 100%); }
.donut::after { content: ""; width: 100px; height: 100px; position: absolute; border-radius: 50%; background: #fff; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center strong { display: block; font-size: 30px; }
.donut-center span { color: var(--muted); font-size: 12px; }
.legend { display: grid; gap: 12px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; padding: 12px; }
.quick-action { min-height: 70px; display: flex; align-items: center; gap: 11px; padding: 10px 13px; border: 0; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.quick-action:hover { background: #fafafa; }
.quick-action > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--red); border-radius: 10px; background: var(--red-soft); font-size: 20px; }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { font-size: 12px; }
.quick-action small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.list-rows { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row__icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; }
.list-row__body { min-width: 0; flex: 1; }
.list-row__body strong, .list-row__body small { display: block; }
.list-row__body strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.list-row__body small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.segment { min-height: 43px; border: 0; border-bottom: 2px solid transparent; color: #60697a; background: transparent; cursor: pointer; }
.segment.active { color: var(--red); border-color: var(--red); font-weight: 800; }
.search-row { display: flex; gap: 12px; margin-bottom: 14px; }
.search-box { min-height: 49px; display: flex; align-items: center; gap: 10px; flex: 1; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.view-toggle button { width: 48px; border: 0; background: #fff; cursor: pointer; }
.view-toggle button.active { color: var(--red); background: var(--red-soft); }
.ticket-stats { grid-template-columns: repeat(4, 1fr); margin-top: 17px; }
.ticket-stats .metric-card { min-height: 110px; }
.ticket-list { display: grid; gap: 12px; margin-top: 16px; }
.ticket-card { display: grid; grid-template-columns: 62px 1fr auto; gap: 16px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 4px 16px rgba(24,32,51,.04); cursor: pointer; }
.ticket-card:hover { border-color: #d5d9e2; transform: translateY(-1px); }
.ticket-card--overdue { border-left: 5px solid var(--red); background: linear-gradient(90deg, #fff5f5, #fff 24%); }
.ticket-card--today,
.ticket-card--urgent { border-left: 5px solid var(--orange); background: linear-gradient(90deg, #fff9ee, #fff 24%); }
.ticket-card__icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 15px; font-size: 27px; }
.ticket-card__body { min-width: 0; }
.ticket-card__code { margin-bottom: 5px; color: var(--red); font-size: 12px; font-weight: 800; }
.ticket-card h3 { margin: 0 0 7px; font-size: 17px; }
.ticket-card p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.ticket-card__meta { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.ticket-card__side { display: grid; justify-items: end; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 8px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.deadline-pill { display: inline-flex; padding: 6px 9px; border-radius: 8px; color: #596273; background: #f1f3f6; font-size: 10px; font-weight: 800; white-space: nowrap; }
.deadline-pill--overdue,
.deadline-pill--today { color: var(--red); background: var(--red-soft); }
.deadline-pill--urgent,
.deadline-pill--soon { color: #9b5500; background: var(--orange-soft); }
.deadline-pill--complete { color: var(--green); background: var(--green-soft); }
.empty-state { display: grid; place-items: center; gap: 9px; min-height: 240px; padding: 32px; text-align: center; }
.empty-state span { font-size: 38px; }
.empty-state h3 { margin: 0; }
.empty-state p { max-width: 420px; margin: 0; color: var(--muted); }
.floating-create { position: fixed; right: 34px; bottom: 30px; z-index: 20; min-height: 55px; padding: 0 22px; border-radius: 28px; }

.ticket-detail-header { margin-bottom: 15px; padding: 24px; }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.detail-title-row small { color: var(--muted); text-transform: uppercase; }
.detail-code { margin: 5px 0; color: var(--red); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; }
.detail-title-row h3 { margin: 0; font-size: 20px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; margin-top: 22px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 13px; }
.detail-fact { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-fact:nth-last-child(-n+2) { border-bottom: 0; }
.detail-fact > span { color: var(--red); font-size: 22px; }
.detail-fact small, .detail-fact strong { display: block; }
.detail-fact small { color: var(--muted); }
.detail-fact strong { margin-top: 3px; font-size: 13px; }
.detail-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 15px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.evidence-image, .evidence-placeholder { width: 100%; aspect-ratio: 1.8; border-radius: 11px; object-fit: cover; background: linear-gradient(135deg, #e6e9ee, #c8ced7); }
.evidence-placeholder { display: grid; place-items: center; color: #737b8b; font-size: 12px; }
.timeline { position: relative; display: grid; gap: 20px; padding-left: 6px; }
.timeline::before { content: ""; position: absolute; left: 62px; top: 7px; bottom: 7px; width: 2px; background: #f0b7b9; }
.timeline-item { position: relative; display: grid; grid-template-columns: 48px 18px 1fr; gap: 8px; align-items: start; font-size: 12px; }
.timeline-item time { color: var(--red); font-weight: 800; }
.timeline-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #fff; }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item small { margin-top: 3px; color: var(--muted); }
.comment-list { display: grid; gap: 17px; }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: 11px; }
.comment-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--orange); background: var(--orange-soft); font-weight: 800; }
.comment strong { font-size: 12px; }
.comment time { float: right; color: var(--muted); font-size: 10px; }
.comment p { margin: 6px 0 0; color: #555e6f; font-size: 12px; line-height: 1.5; }
.sticky-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; margin-top: 14px; }

.wizard-steps { display: flex; align-items: center; margin-bottom: 18px; overflow-x: auto; }
.wizard-step { min-width: max-content; display: flex; align-items: center; gap: 8px; color: #9399a6; font-size: 12px; }
.wizard-step:not(:last-child)::after { content: ""; width: clamp(34px, 7vw, 95px); height: 1px; margin: 0 11px; background: var(--line); }
.wizard-step span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #cdd1da; border-radius: 50%; }
.wizard-step.active { color: var(--red); font-weight: 800; }
.wizard-step.active span { color: #fff; border-color: var(--red); background: var(--red); }
.ticket-form { display: grid; gap: 18px; }
.form-section { padding: 22px; }
.form-section h2 { margin: 0 0 17px; font-size: 16px; }
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.category-option { position: relative; min-height: 132px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: center; }
.category-option:hover, .category-option.selected { color: var(--red); border-color: #e86a70; background: #fffafa; }
.category-option input { position: absolute; opacity: 0; pointer-events: none; }
.category-option .category-icon { font-size: 28px; }
.category-option strong { font-size: 12px; }
.category-option small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; font-weight: 750; }
.form-field label.required::after { content: " *"; color: var(--red); }
.form-control { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #dde0e7; border-radius: 10px; color: var(--ink); background: #fff; }
textarea.form-control { min-height: 104px; resize: vertical; }
.priority-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.priority-option { position: relative; min-height: 43px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.priority-option input { position: absolute; opacity: 0; }
.priority-option.selected { color: var(--red); border-color: #e86a70; background: var(--red-soft); font-weight: 800; }
.file-drop { min-height: 120px; display: grid; place-items: center; padding: 18px; border: 1px dashed #eeaeb1; border-radius: 12px; color: var(--red); background: #fffafa; cursor: pointer; text-align: center; }
.file-drop input { display: none; }
.file-preview { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-top: 10px; }
.file-preview__item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #eee; }
.file-preview__item img { width: 100%; height: 100%; object-fit: cover; }
.form-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); box-shadow: 0 -8px 25px rgba(24,32,51,.06); }

.report-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.report-action { min-height: 48px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.bar-chart { display: grid; gap: 14px; padding: 8px 0; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 32px; gap: 10px; align-items: center; font-size: 11px; }
.bar-track { height: 16px; overflow: hidden; border-radius: 3px; background: #f0f2f5; }
.bar-value { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ef8d91, var(--red)); }
.insight { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.insight:last-child { border-bottom: 0; }
.insight > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; }
.insight strong, .insight small { display: block; }
.insight strong { font-size: 12px; }
.insight small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.notification-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 3px; }
.notification-tab { min-height: 39px; min-width: max-content; display: flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.notification-tab.active { color: var(--red); border-color: #e86a70; background: var(--red-soft); }
.notification-tab b { min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; color: #fff; border-radius: 10px; background: var(--red); font-size: 10px; }
.notification-list { display: grid; gap: 10px; }
.notification-card { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.notification-card.unread { border-left: 4px solid var(--red); }
.notification-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; font-size: 24px; }
.notification-card h3 { margin: 4px 0; font-size: 14px; }
.notification-card p, .notification-card time { margin: 0; color: var(--muted); font-size: 11px; }

.profile-card { display: grid; grid-template-columns: 130px 1fr auto; gap: 22px; align-items: center; margin-bottom: 18px; padding: 25px; }
.profile-avatar { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; color: #4a5363; background: #eef0f4; font-size: 48px; }
.profile-avatar-wrap { display: grid; justify-items: center; gap: 5px; }
.profile-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-info h2 { margin: 0 0 7px; }
.profile-info p { margin: 5px 0; color: var(--muted); font-size: 12px; }
.progress-row { display: flex; align-items: center; gap: 12px; margin-top: 15px; }
.progress-track { height: 6px; overflow: hidden; flex: 1; border-radius: 4px; background: #eceef2; }
.progress-bar { height: 100%; border-radius: 4px; background: var(--red); }
.profile-stats { grid-template-columns: repeat(4, 1fr); box-shadow: none; margin: 18px 0 0; }
.profile-stats .metric-card { min-height: 96px; }
.settings-groups { display: grid; gap: 14px; }
.settings-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--red); }
.settings-title h3 { margin: 0; font-size: 15px; }
.settings-list { margin: 0 -20px -20px; }
.setting-row { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 9px 18px; border: 0; border-top: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.setting-row:hover { background: #fafafa; }
.setting-row > span:first-child { width: 23px; font-size: 18px; text-align: center; }
.setting-row div { flex: 1; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 12px; }
.setting-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.toggle { width: 38px; height: 22px; display: inline-flex; align-items: center; padding: 2px; border-radius: 12px; background: #dfe2e8; }
.toggle::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.16); }
.toggle.on { justify-content: flex-end; background: var(--green); }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(15,22,36,.55); backdrop-filter: blur(5px); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 22px; border-radius: 18px; background: #fff; box-shadow: 0 25px 70px rgba(10,18,32,.24); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.modal__head .icon-button { flex: 0 0 auto; }
.modal__head h2 { margin: 0; font-size: 20px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-list { display: grid; gap: 8px; }
.modal-option { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.toast-region { position: fixed; z-index: 150; right: 20px; top: 20px; display: grid; gap: 9px; }
.toast { max-width: 360px; padding: 13px 16px; color: #fff; border-radius: 11px; background: #222b3d; box-shadow: 0 12px 35px rgba(0,0,0,.18); animation: toast-in .25s ease-out; font-size: 13px; }
.toast.success { background: #087d39; }
.toast.error { background: #a90d14; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { padding: 11px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.user-cell { min-width: 190px; display: flex; align-items: center; gap: 10px; }
.user-cell strong, .user-cell small { display: block; }
.user-cell small { margin-top: 3px; color: var(--muted); }
.permission-list { max-height: 55vh; display: grid; gap: 7px; overflow-y: auto; }
.permission-row { display: grid; grid-template-columns: 1fr 132px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.permission-row strong, .permission-row small { display: block; }
.permission-row small { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.permission-row .form-control { min-height: 38px; padding: 6px 8px; font-size: 11px; }
.modal-option.active { color: var(--red); border-color: #e86a70; background: var(--red-soft); }

.eyebrow { display: block; margin-bottom: 7px; color: var(--red); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.admin-command { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 25px 28px; overflow: hidden; color: #fff; border-radius: 20px; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 32%), linear-gradient(125deg, #a90810, #d71920 58%, #ef3b42); box-shadow: 0 18px 45px rgba(183,8,16,.2); }
.admin-command .eyebrow { color: rgba(255,255,255,.75); }
.admin-command h2 { margin: 0; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.035em; }
.admin-command p { max-width: 650px; margin: 8px 0 0; color: rgba(255,255,255,.83); }
.admin-command .button--outline, .admin-command .button--ghost { color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.1); }
.admin-command .button--primary { color: var(--red); background: #fff; }
.announcement-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.announcement-banner { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; padding: 15px 17px; border: 1px solid #d8e8f7; border-left: 4px solid var(--blue); border-radius: 14px; background: linear-gradient(100deg, #f5faff, #fff); box-shadow: 0 5px 16px rgba(19,56,93,.05); }
.announcement-banner--importante { border-color: #f1dbb8; border-left-color: var(--orange); background: linear-gradient(100deg, #fff9ef, #fff); }
.announcement-banner--critica { border-color: #f0c2c5; border-left-color: var(--red); background: linear-gradient(100deg, #fff3f4, #fff); }
.announcement-banner__icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); border-radius: 11px; background: #e8f3ff; font-weight: 850; }
.announcement-banner--importante .announcement-banner__icon { color: var(--orange); background: var(--orange-soft); }
.announcement-banner--critica .announcement-banner__icon { color: var(--red); background: var(--red-soft); }
.announcement-banner__meta { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.announcement-banner h2 { margin: 3px 0; font-size: 15px; }
.announcement-banner p { margin: 0; color: #596273; font-size: 12px; line-height: 1.5; }
.communication-panel { min-height: 430px; }
.announcement-admin-list { display: grid; gap: 9px; }
.announcement-admin-item { display: grid; grid-template-columns: 5px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fbfbfc; }
.announcement-status { width: 5px; height: 100%; min-height: 52px; border-radius: 99px; background: var(--blue); }
.announcement-status--importante { background: var(--orange); }
.announcement-status--critica { background: var(--red); }
.announcement-admin-item strong, .announcement-admin-item small { display: block; }
.announcement-admin-item strong { margin: 7px 0 4px; }
.announcement-admin-item small { color: var(--muted); font-size: 10px; }
.row-actions { display: flex; gap: 6px; }
.row-actions .icon-button { min-width: 36px; min-height: 36px; }
.admin-data-center, .audit-panel { margin-bottom: 18px; }
.catalog-sections { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.catalog-section { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fbfbfc; }
.catalog-section--wide { grid-column: 1 / -1; }
.catalog-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.catalog-section__head strong, .catalog-section__head small { display: block; }
.catalog-section__head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.catalog-items { max-height: 300px; display: grid; gap: 7px; overflow: auto; padding-right: 3px; }
.catalog-items--grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.catalog-item { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; color: var(--ink); border: 1px solid transparent; border-radius: 11px; background: #fff; cursor: pointer; text-align: left; }
.catalog-item:hover { border-color: #f0b8bb; background: #fff7f7; }
.catalog-item .metric-icon { width: 36px; height: 36px; margin: 0; font-size: 16px; }
.catalog-item strong, .catalog-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item strong { font-size: 12px; }
.catalog-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.catalog-item b { color: var(--red); font-size: 10px; white-space: nowrap; }
.modal--wide { width: min(780px, 100%); }
.form-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 5px; padding: 11px 0 5px; border-bottom: 1px solid var(--line); }
.form-section-title strong { color: var(--red); font-size: 13px; }
.form-section-title span { color: var(--muted); font-size: 10px; text-align: right; }
.admin-change-note { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; color: #785214; border: 1px solid #f2d8aa; border-radius: 11px; background: #fff9ec; font-size: 11px; }
.admin-change-note strong { flex: 0 0 auto; }

:root[data-text-size="small"] { font-size: 14px; }
:root[data-text-size="large"] { font-size: 18px; }
:root[data-theme="dark"] {
  --ink: #f2f4f8;
  --muted: #a9b0bf;
  --line: #303847;
  --surface: #1c2330;
  --canvas: #121722;
  --red-soft: #421d24;
  --green-soft: #173525;
  --orange-soft: #3b2b17;
  --blue-soft: #182d49;
  --purple-soft: #2c2345;
  --shadow: 0 8px 30px rgba(0,0,0,.2);
}
:root[data-theme="dark"] body,
:root[data-theme="dark"] html { background: var(--canvas); }
:root[data-theme="dark"] .desktop-sidebar,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .mobile-nav,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .metrics-grid,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .ticket-card,
:root[data-theme="dark"] .notification-card,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .filter-select,
:root[data-theme="dark"] .chip,
:root[data-theme="dark"] .button--ghost,
:root[data-theme="dark"] .button--outline,
:root[data-theme="dark"] .company-button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .setting-row,
:root[data-theme="dark"] .segment,
:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .modal-option,
:root[data-theme="dark"] .catalog-section,
:root[data-theme="dark"] .catalog-item,
:root[data-theme="dark"] .announcement-admin-item { color: var(--ink); background: var(--surface); }
:root[data-theme="dark"] .announcement-banner { color: var(--ink); background: var(--surface); }
:root[data-theme="dark"] .announcement-banner p { color: var(--muted); }
:root[data-theme="dark"] .admin-change-note { color: #f0c779; border-color: #705323; background: #332914; }
:root[data-theme="dark"] .donut::after { background: var(--surface); }
:root[data-theme="dark"] .topbar { background: rgba(28,35,48,.94); }
:root[data-theme="dark"] .mobile-nav { background: rgba(28,35,48,.97); }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #7e8797; }

@media (max-width: 1180px) {
  :root { --sidebar: 210px; }
  .metrics-grid { grid-template-columns: repeat(5, minmax(110px, 1fr)); overflow-x: auto; }
  .metric-card { min-width: 120px; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  html, body, .app-shell, .app-main { max-width: 100%; overflow-x: clip; }
  body { background: #fff; }
  .login-view { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; padding: 30px 22px; }
  .login-mobile-brand { display: flex; margin-bottom: 54px; }
  .login-card h2 { font-size: 36px; }
  .desktop-sidebar { display: none; }
  .app-main { margin-left: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 82px; padding: max(12px, env(safe-area-inset-top)) 18px 12px; }
  .mobile-brand { width: 44px; height: 44px; display: grid; border-radius: 13px 10px 13px 10px; }
  .mobile-brand span { font-size: 21px; }
  .topbar__identity h1 { font-size: 25px; }
  .topbar__identity p { margin-top: 3px; font-size: 12px; }
  .company-button { min-height: 40px; padding: 0 11px; }
  .company-button span:nth-child(2) { display: none; }
  .topbar__actions { gap: 7px; }
  .topbar .icon-button { min-width: 40px; min-height: 40px; }
  .header-logout { min-width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .header-logout b { display: none; }
  .content { padding: 18px 15px 34px; }
  .mobile-nav { position: fixed; z-index: 40; inset: auto 0 0; width: 100%; height: calc(70px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; padding: 7px 5px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(18px); }
  .mobile-nav .nav-item { min-width: 0; min-height: 56px; display: grid; place-items: center; align-content: center; gap: 3px; overflow: hidden; padding: 2px; border-radius: 9px; font-size: 9px; text-align: center; }
  .mobile-nav .nav-item span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav .nav-item span:first-child { width: auto; font-size: 21px; }
  .metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 15px; padding: 6px; border-radius: 15px; box-shadow: none; overflow: hidden; }
  .metric-card { min-width: 0; min-height: 112px; padding: 10px 7px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-card:nth-child(odd) { border-right: 1px solid var(--line); }
  .metric-card:last-child { border-bottom: 0; }
  .metric-card:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
  .metric-icon { width: 38px; height: 38px; }
  .metric-card strong { font-size: 26px; }
  .priority-grid { grid-template-columns: 1fr; overflow: visible; }
  .deadline-calendar-summary { grid-template-columns: 1fr; }
  .priority-card { min-height: 126px; }
  .dashboard-grid, .dashboard-grid.equal { grid-template-columns: 1fr; }
  .dashboard-grid .panel { min-width: 0; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .quick-action { padding: 8px; }
  .donut-layout { grid-template-columns: 155px 1fr; gap: 10px; }
  .donut { width: 145px; height: 145px; }
  .donut::after { width: 88px; height: 88px; }
  .floating-create { right: 18px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .ticket-card { grid-template-columns: 52px 1fr; gap: 12px; padding: 14px; }
  .ticket-card__icon { width: 50px; height: 50px; }
  .ticket-card__side { grid-column: 2; display: flex; justify-content: flex-start; }
  .detail-title-row { display: grid; }
  .detail-facts { grid-template-columns: 1fr; }
  .detail-fact:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .priority-options { grid-template-columns: repeat(2, 1fr); }
  .file-preview { grid-template-columns: repeat(3, 1fr); }
  .profile-card { grid-template-columns: 90px 1fr; padding: 18px; }
  .profile-avatar { width: 82px; height: 82px; font-size: 36px; }
  .profile-card > .button { grid-column: 1 / -1; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0 0; overflow: hidden; }
  .notification-card { grid-template-columns: 45px 1fr; }
  .notification-icon { width: 44px; height: 44px; }
  .notification-card > .button { grid-column: 2; justify-self: start; }
  .admin-command { display: grid; padding: 20px; }
  .admin-command .action-group { width: 100%; }
  .catalog-sections { grid-template-columns: 1fr; }
  .catalog-section--wide { grid-column: auto; }
  .catalog-items--grid { grid-template-columns: 1fr; }
  .announcement-banner { grid-template-columns: 38px 1fr; }
  .announcement-banner > .button { grid-column: 2; justify-self: start; }
}

@media (max-width: 520px) {
  .panel { padding: 16px; border-radius: 15px; }
  .section-heading h2 { font-size: 17px; }
  .page-toolbar { align-items: stretch; }
  .filter-group { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .filter-select { width: 100%; min-width: 0; }
  .action-group { width: 100%; }
  .action-group .button { flex: 1; }
  .chart-panel { min-height: 285px; }
  .chart-wrap { height: 205px; }
  .quick-actions { margin-left: -4px; margin-right: -4px; padding: 6px; }
  .quick-action > span { width: 34px; height: 34px; }
  .segmented { margin-left: -4px; margin-right: -4px; }
  .segment { font-size: 11px; }
  .chips { flex-wrap: nowrap; width: calc(100vw - 30px); padding-bottom: 4px; overflow-x: auto; }
  .chip { min-width: max-content; }
  .ticket-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 0; margin-right: 0; overflow: hidden; }
  .ticket-list { margin-left: -4px; margin-right: -4px; }
  .ticket-card h3 { font-size: 15px; }
  .detail-actions { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .sticky-actions { grid-template-columns: 1fr; }
  .wizard-steps { margin-right: -15px; }
  .form-section { padding: 16px; }
  .category-option { min-height: 120px; }
  .form-footer { margin: 0 -7px; }
  .report-actions { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 85px 1fr 24px; }
  .donut-layout { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr 1fr; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .permission-row { grid-template-columns: 1fr; }
  .admin-list-panel, .audit-panel { padding: 14px; }
  .admin-table--responsive, .admin-table--responsive tbody { display: block; width: 100%; }
  .admin-table--responsive thead { display: none; }
  .admin-table--responsive tr { display: grid; gap: 8px; margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 5px 15px rgba(18,30,50,.04); }
  .admin-table--responsive tr:last-child { margin-bottom: 0; }
  .admin-table--responsive td { min-width: 0; display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: center; gap: 9px; padding: 0; border: 0; word-break: break-word; }
  .admin-table--responsive td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .admin-table--responsive .user-cell { min-width: 0; }
  .admin-table--responsive td .action-group { width: 100%; }
  .admin-table--responsive td .action-group .button { flex: 1 1 auto; }
  .form-section-title { display: grid; }
  .form-section-title span { text-align: left; }
  .admin-change-note { display: grid; }
  .announcement-admin-item { grid-template-columns: 5px minmax(0,1fr); }
  .announcement-admin-item .row-actions { grid-column: 2; }
  .catalog-item { grid-template-columns: 36px minmax(0,1fr); }
  .catalog-item b { display: none; }
}

@media print {
  .desktop-sidebar, .topbar, .mobile-nav, .page-toolbar, .report-actions, .floating-create { display: none !important; }
  .app-main { margin: 0; }
  .content { width: 100%; max-width: none; padding: 0; }
  .panel, .metrics-grid { break-inside: avoid; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-presets {
  border-color: #b9d6f5;
  background: linear-gradient(135deg, #f7fbff, #eef6ff);
}

.ticket-presets h2 {
  margin-bottom: 4px;
}

.quick-date-row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 6px;
  gap: 10px;
}

.quick-date-row .text-button {
  color: #0750a3;
  font-size: 12px;
  font-weight: 800;
}
