:root {
  --ink: #1f2730;
  --muted: #68747e;
  --line: #cfd8e2;
  --header: #a5a5a5;
  --row-blue: #eaf2fb;
  --canvas: #f3f5f7;
  --surface: #fff;
  --red: #c8101e;
  --red-soft: #fae9eb;
  --green: #23734d;
  --amber: #9a6a10;
  font-family: Calibri, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.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; }

.topbar { min-height: 72px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 32px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-logo { display: block; width: 104px; height: 51px; object-fit: contain; object-position: center; }
.brand-title { border-left: 1px solid var(--line); padding-left: 16px; color: #48535d; font-size: 15px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.role-switcher { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.role-switcher select { min-width: 155px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); padding: 7px 10px; font-size: 12px; }
.avatar { width: 31px; height: 31px; border: 0; border-radius: 50%; background: #3c4650; color: #fff; font-size: 10px; font-weight: 700; }

.layout { min-height: calc(100vh - 72px); }
.main-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 30px 34px 56px; }
.page-heading { min-height: 47px; margin-bottom: 25px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-heading h1 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -.01em; }
.summary-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: -10px 0 18px; }
.summary-card { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--header); border-radius: 3px; padding: 10px 12px; }
.summary-card span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.summary-card strong { display: block; margin-top: 3px; font-size: 20px; }
.summary-pending { border-left-color: #2a668e; }
.summary-progress { border-left-color: #7654a7; }
.summary-finished { border-left-color: var(--green); }
.compact-heading { display: block; min-height: 0; }
.compact-heading h1 { margin-top: 6px; }
.back-link { display: inline-block; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 6px; }.back-link:hover { color: var(--red); }
.button { border: 1px solid transparent; border-radius: 3px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.button-primary { background: var(--red); color: #fff; }.button-primary:hover { background: #a50d19; }.button-secondary { color: var(--ink); background: #fff; border-color: #bbc6d0; }.button-secondary:hover { background: #f0f3f6; }

.section-toolbar { border: 1px solid var(--line); border-bottom: 0; background: #fff; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }.section-toolbar h2 { margin: 0 0 3px; font-size: 15px; }.muted { color: var(--muted); font-size: 11px; }.toolbar-controls { display: flex; align-items: center; gap: 8px; }.search-box { display: flex; align-items: center; gap: 6px; width: min(280px, 30vw); border: 1px solid var(--line); background: #fff; border-radius: 3px; padding: 0 8px; }.search-box span { color: var(--muted); font-size: 17px; }.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 7px 0; color: var(--ink); font-size: 11px; }.select-control { border: 1px solid var(--line); border-radius: 3px; padding: 7px 9px; background: #fff; color: var(--ink); font-size: 11px; }
.ticket-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-top: 0; background: #fff; }.ticket-table { width: 100%; min-width: 1100px; border-collapse: collapse; table-layout: fixed; }.ticket-table th { height: 32px; padding: 6px 9px; border-right: 1px solid #b9b9b9; background: var(--header); color: #fff; text-align: center; font-size: 10px; font-weight: 700; white-space: nowrap; }.ticket-table th:last-child { border-right: 0; }.ticket-table th:nth-child(1) { width: 88px; }.ticket-table th:nth-child(2) { width: 92px; }.ticket-table th:nth-child(3) { width: 175px; }.ticket-table th:nth-child(4) { width: 245px; }.ticket-table th:nth-child(5) { width: 130px; }.ticket-table th:nth-child(6) { width: 130px; }.ticket-table th:nth-child(7) { width: 80px; }.ticket-table th:nth-child(8) { width: 158px; }.ticket-table th:nth-child(9) { width: 105px; }.ticket-table th:nth-child(10) { width: 84px; }
.ticket-table td { min-height: 34px; padding: 7px 9px; border-right: 1px solid #d5dee7; border-bottom: 1px solid #d5dee7; color: #2c3741; font-size: 11px; vertical-align: middle; }.ticket-table td:last-child { border-right: 0; }.ticket-table tbody tr:nth-child(even) { background: var(--row-blue); }.ticket-table tbody tr:hover { background: #fff5f5; cursor: pointer; }.ticket-id { color: var(--red); font-weight: 700; }.ticket-subject { font-weight: 600; line-height: 1.25; }.ticket-customer { display: block; }.strong-cell { font-weight: 600; }.updated { color: #56636e; white-space: nowrap; }.priority { font-weight: 700; }.priority.Crítica, .priority.Alta { color: var(--red); }.priority.Media { color: var(--amber); }.priority.Baja { color: var(--green); }.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }.status-badge:before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #7b8791; }.status-new { color: #2a668e; }.status-new:before { background: #2a668e; }.status-systems { color: var(--red); }.status-systems:before { background: var(--red); }.status-analysis { color: #7654a7; }.status-analysis:before { background: #7654a7; }.status-resolved { color: var(--green); }.status-resolved:before { background: var(--green); }.status-verification { color: var(--amber); }.status-verification:before { background: #d79713; }.status-closed { color: #68737d; }.status-closed:before { background: #68737d; }.verified { font-weight: 700; }.verified.yes { color: var(--green); }.verified.no { color: var(--red); }.empty-state { background: #fff; text-align: center; padding: 46px 20px; }.empty-state h3 { margin: 0 0 7px; font-size: 15px; }.empty-state p { margin: 0 0 17px; color: var(--muted); font-size: 12px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 255px; align-items: start; gap: 16px; }.form-card, .info-card { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 20px; }.form-card-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }.form-card-heading h2 { margin: 0; font-size: 16px; }.form-card-heading p { display: none; }.step-badge { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 2px; color: #fff; background: var(--header); font-size: 10px; font-weight: 700; }.form-grid { display: grid; gap: 15px 12px; }.two-col { grid-template-columns: 1fr 1fr; }.field { display: grid; gap: 5px; min-width: 0; }.field > span { color: #44505b; font-size: 11px; font-weight: 700; }.field em { color: var(--red); font-style: normal; }.field input, .field select, .field textarea { width: 100%; border: 1px solid #bbc6d0; border-radius: 2px; color: var(--ink); background: #fff; outline: 0; padding: 8px 9px; font-size: 12px; }.field textarea { min-height: 76px; resize: vertical; line-height: 1.4; }.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }.field-span-2 { grid-column: span 2; }.form-side { display: grid; gap: 16px; }.compact-card { padding: 18px; }.compact-card .form-card-heading { margin-bottom: 16px; }.compact-card .field + .field { margin-top: 14px; }.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

.detail-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 19px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }.detail-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }.detail-title-row h1 { margin: 0; font-size: 23px; }.detail-meta { display: flex; gap: 17px; color: var(--muted); font-size: 11px; }.detail-meta strong { color: var(--ink); }.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 16px; }.detail-main, .side-stack { display: grid; gap: 16px; }.info-card { border-radius: 3px; padding: 18px; }.info-card h2 { margin: 0 0 16px; font-size: 14px; }.info-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.field-readonly { padding-top: 13px; margin-top: 13px; border-top: 1px solid #e1e6eb; }.field-readonly:first-child { padding-top: 0; margin-top: 0; border-top: 0; }.read-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }.read-value { line-height: 1.45; font-size: 12px; white-space: pre-wrap; }.read-value.large { font-size: 12px; }.read-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 19px; }.read-grid .field-readonly { margin-top: 13px; }.read-grid .field-readonly:nth-child(-n+2) { margin-top: 0; padding-top: 0; border-top: 0; }.response-card { border-top: 3px solid var(--red); }.systems-icon { display: none; }.next-step { border-left: 3px solid var(--red); background: #fafafa; padding: 10px 12px; color: #46525c; font-size: 11px; line-height: 1.4; }.next-step strong { display: block; margin-bottom: 4px; color: var(--ink); }.timeline-card { padding-bottom: 9px; }.timeline { position: relative; }.timeline:before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 11px; border-left: 1px solid #d4dce4; }.timeline-item { position: relative; display: flex; gap: 12px; padding-bottom: 15px; }.timeline-item:last-child { padding-bottom: 0; }.timeline-dot { z-index: 1; flex-shrink: 0; width: 17px; height: 17px; border: 2px solid var(--red); border-radius: 50%; background: #fff; }.timeline-item.complete .timeline-dot { background: var(--red); box-shadow: inset 0 0 0 4px #fff; }.timeline-copy strong { display: block; margin-bottom: 3px; font-size: 11px; }.timeline-copy p { margin: 0; color: #52606a; font-size: 11px; line-height: 1.4; white-space: pre-wrap; }.timeline-copy time { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }.side-card { padding: 18px; }.side-card h2 { margin-bottom: 13px; }.assignee { display: flex; align-items: center; gap: 9px; }.mini-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #47535d; font-size: 9px; font-weight: 700; }.mini-avatar.system { background: #3c718e; }.assignee strong, .assignee span { display: block; }.assignee strong { font-size: 12px; }.assignee span { margin-top: 2px; color: var(--muted); font-size: 10px; }.side-card .sidebar-divider { margin: 16px 0; border-top: 1px solid var(--line); }.side-details { display: grid; gap: 11px; }.side-detail { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }.side-detail span { color: var(--muted); }.side-detail strong { text-align: right; }.internal-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; }

.toast { position: fixed; left: 50%; bottom: 23px; z-index: 40; border-radius: 3px; padding: 10px 14px; background: #28333c; color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 5px 18px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .2s ease; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; padding: 20px; background: rgba(20,27,35,.48); }.modal { width: min(560px,100%); max-height: 90vh; overflow-y: auto; padding: 22px; border-radius: 3px; background: #fff; box-shadow: 0 20px 60px rgba(20,27,35,.23); }.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }.modal-header h2 { margin: 0; font-size: 17px; }.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }.modal-form { display: grid; gap: 13px; }.modal-form .field textarea { min-height: 95px; }.field-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }.form-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; }
.ticket-table th:nth-child(1) { width: 75px; }.ticket-table th:nth-child(2) { width: 80px; }.ticket-table th:nth-child(3) { width: 145px; }.ticket-table th:nth-child(4) { width: 205px; }.ticket-table th:nth-child(5) { width: 100px; }.ticket-table th:nth-child(6) { width: 105px; }.ticket-table th:nth-child(7) { width: 68px; }.ticket-table th:nth-child(8) { width: 135px; }.ticket-table th:nth-child(9) { width: 92px; }.ticket-table th:nth-child(10) { width: 68px; }

.section-toolbar { flex-wrap: wrap; padding-bottom: 10px; }
.toolbar-controls { flex-wrap: wrap; }
.table-filters { width: 100%; display: flex; align-items: center; gap: 7px; padding-top: 9px; border-top: 1px solid #e7ebef; flex-wrap: wrap; }
.filter-label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.filter-clear { padding: 7px 10px; font-size: 10px; }
.ticket-table th { padding: 0; }
.table-sort { width: 100%; height: 32px; padding: 6px 7px; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; }
.table-sort:hover { background: rgba(0,0,0,.1); }
.sort-arrow { display: inline-block; min-width: 8px; margin-left: 3px; color: #fff; font-size: 10px; }

@media (max-width: 980px) { .main-content { padding-inline: 22px; }.detail-grid { grid-template-columns: 1fr; }.side-stack { grid-template-columns: 1fr 1fr; }.form-layout { grid-template-columns: 1fr; }.form-side { grid-template-columns: 1fr 1fr; }.form-actions { grid-column: span 2; } }
@media (max-width: 680px) { .summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }.topbar { padding: 8px 15px; }.brand-logo { width: 86px; height: 43px; }.brand-title { padding-left: 10px; font-size: 12px; }.role-switcher span, .avatar { display: none; }.role-switcher select { min-width: 142px; }.main-content { padding: 22px 13px 40px; }.page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }.page-heading .button { align-self: stretch; }.section-toolbar { align-items: stretch; flex-direction: column; }.toolbar-controls { width: 100%; }.search-box { width: 100%; }.table-filters { align-items: stretch; }.table-filters .select-control, .table-filters .filter-clear { flex: 1 1 145px; }.select-control { flex: 0 0 155px; }.two-col { grid-template-columns: 1fr; }.field-span-2 { grid-column: span 1; }.form-side { grid-template-columns: 1fr; }.form-actions { grid-column: span 1; }.detail-top { align-items: flex-start; flex-direction: column; }.detail-actions { justify-content: flex-start; }.read-grid { grid-template-columns: 1fr; }.read-grid .field-readonly:nth-child(2) { margin-top: 13px; padding-top: 13px; border-top: 1px solid #e1e6eb; }.side-stack { grid-template-columns: 1fr; } }
