:root {
  --bg-a: #e9f0ff;
  --bg-b: #d9e6ff;
  --panel: #ffffff;
  --line: #c7d6f2;
  --ink: #162748;
  --muted: #596d93;
  --brand: #1f62ff;
  --brand-2: #123d95;
  --danger: #b43a3a;
  --shadow: 0 22px 40px rgba(16, 45, 109, 0.12);
  --header-height: 88px;
  --filters-height: 0px;
  --bottom-nav-height: 0px;
  --content-top: 96px;
  --content-bottom: 16px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, #f5f8ff 0, var(--bg-a) 45%, transparent 48%),
    radial-gradient(circle at 90% 20%, #d5e4ff 0, transparent 35%),
    linear-gradient(165deg, #edf3ff, var(--bg-b));
}

.blob {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.blob-a {
  width: 260px;
  height: 260px;
  left: -90px;
  top: -60px;
  background: #d7e5ff;
}

.blob-b {
  width: 220px;
  height: 220px;
  right: -60px;
  top: 130px;
  background: #c7dcff;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 10px auto 16px;
  padding-inline: 8px;
  padding-top: var(--header-height);
  display: grid;
  gap: 10px;
  animation: enter 380ms ease both;
}

body.app-active {
  overflow: hidden;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.main-header h1,
.app-name {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  color: #f6f9ff;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(9, 26, 59, 0.32);
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: fixed;
  top: max(6px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 16px), 1224px);
  z-index: 50;
  background: linear-gradient(140deg, #245ee1, #133f9a);
  border-color: #1a4ba8;
  box-shadow: 0 18px 34px rgba(12, 41, 102, 0.28);
  backdrop-filter: blur(4px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #b9cbef;
  box-shadow: 0 6px 12px rgba(18, 61, 149, 0.12);
  object-fit: cover;
}

.header-user {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: #e4edff;
  text-align: right;
  overflow-wrap: anywhere;
}

.header-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  min-width: 0;
}

h2,
h3 {
  margin: 0;
}

.hint,
.muted {
  color: var(--muted);
}

.stack {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

#toggleEvidenceFormButton {
  margin-top: 8px;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
}

input,
textarea,
select,
button {
  font: inherit;
  border-radius: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: #fcfefd;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #94b8ff;
  outline-offset: 1px;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  width: 100%;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.secondary-button {
  background: #e8f0ff;
  color: #244d98;
  border: 1px solid #cad9f5;
}

#statusUpdateButton.is-dirty {
  background: linear-gradient(135deg, #2f7af7, #1d57b5);
  color: #ffffff;
  border-color: #2157b6;
}

#ticketStatus.is-dirty {
  border-color: #3f80ec;
  box-shadow: inset 0 0 0 1px rgba(37, 98, 206, 0.3);
  background: #eef5ff;
}

.status {
  min-height: 24px;
  margin: 0;
  color: #1f56b7;
}

.status.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.user-label {
  margin: 0;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.logout-link {
  width: auto;
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #eaf2ff;
  background: rgba(8, 32, 83, 0.34);
  border: 1px solid rgba(189, 213, 255, 0.55);
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.logout-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  display: block;
}

.app-panel {
  min-width: 0;
}

#appView {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 16px), 1224px);
  top: var(--content-top);
  bottom: var(--content-bottom);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

#appView > .app-panel {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: auto;
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: clamp(12px, 2vw, 18px);
  border-radius: 22px;
  border: 1px solid #8fb3f0;
  background:
    radial-gradient(circle at 12% 0%, rgba(143, 182, 252, 0.28), transparent 44%),
    radial-gradient(circle at 92% 90%, rgba(77, 132, 236, 0.25), transparent 48%),
    linear-gradient(148deg, #eff5ff, #dbe8ff 58%, #cfdef8);
}

.login-card#loginView {
  min-height: min(760px, calc(100dvh - var(--content-top) - 20px));
  display: grid;
  align-content: center;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(circle at 1px 1px, rgba(22, 57, 124, 0.14) 1px, transparent 1px);
  background-size: 14px 14px;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.login-hero {
  min-height: 150px;
  border-radius: 18px;
  border: 1px solid #1d4da9;
  background:
    linear-gradient(122deg, rgba(244, 248, 255, 0.1), transparent),
    radial-gradient(circle at 88% 0%, rgba(119, 165, 247, 0.36), transparent 46%),
    linear-gradient(140deg, #123483, #0c2b70 52%, #0c2357);
  color: #edf4ff;
  padding: clamp(14px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: 0 20px 40px rgba(12, 41, 102, 0.34);
}

.login-hero-logo {
  width: clamp(64px, 18vw, 90px);
  height: clamp(64px, 18vw, 90px);
  border-radius: 22px;
  border: 1px solid rgba(223, 235, 255, 0.62);
  background: #ffffff;
  padding: 6px;
  object-fit: cover;
  box-shadow: 0 14px 24px rgba(7, 30, 78, 0.34);
}

.login-hero-brand {
  margin: 0;
  color: #d5e6ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.73rem;
  font-weight: 700;
}

.login-hero-title {
  margin: 0;
  color: #f0f6ff;
  font-size: clamp(1.2rem, 3.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-form-panel {
  border-radius: 16px;
  border: 1px solid #b9ceef;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(7px);
  padding: clamp(12px, 3vw, 18px);
  box-shadow: 0 14px 30px rgba(17, 51, 115, 0.18);
}

.login-form-head {
  display: grid;
  gap: 5px;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-mini-logo {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid #b9cced;
  background: #ffffff;
  object-fit: cover;
}

.login-brand-row p {
  margin: 0;
  color: #436199;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.login-form-head h3 {
  margin: 0;
  color: #1d3f7f;
  font-size: 1.05rem;
}

.login-form-head p {
  margin: 0;
  color: #4f6693;
  font-size: 0.84rem;
  line-height: 1.4;
}

.login-form {
  margin-top: 8px;
}

.google-login-button {
  margin-top: 10px;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #bfcfee;
  background: #ffffff;
  color: #1d2d4c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(18, 45, 92, 0.1);
}

.google-login-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.google-login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18, 45, 92, 0.14);
}

.login-divider {
  margin-top: 10px;
  position: relative;
  text-align: center;
}

.login-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #c6d6f1;
}

.login-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 10px;
  background: rgba(252, 254, 255, 0.95);
  color: #5d739f;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-form label {
  color: #28497f;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-form input {
  border-radius: 12px;
  border: 1px solid #b9cef3;
  background: #f6f9ff;
  min-height: 44px;
}

.login-form input::placeholder {
  color: #6d80a7;
}

.login-form button {
  margin-top: 4px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 0.92rem;
  box-shadow: 0 10px 20px rgba(30, 82, 173, 0.25);
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(14, 29, 58, 0.45);
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 16px 12px;
}

.detail-card {
  width: min(760px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
}

.icon-back-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #c4d5f6;
  background: #eaf2ff;
  color: #2752a4;
  box-shadow: none;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 8px;
}

.icon-back-button svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.panel-head {
  display: grid;
  gap: 3px;
}

.home-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.kpi-card {
  border: 1px solid #d5e0f7;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

.kpi-card p {
  margin: 0;
  color: #4b6290;
  font-size: 0.78rem;
}

.kpi-card strong {
  display: block;
  margin-top: 6px;
  color: #163a7c;
  font-size: 1.15rem;
}

.home-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-card {
  border: 1px solid #d5e0f7;
  border-radius: 14px;
  padding: 10px;
  background: #fbfdff;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.home-card h3 {
  font-size: 0.95rem;
  color: #274884;
}

.bar-chart {
  display: grid;
  gap: 8px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(78px, 120px) minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.chart-label {
  font-size: 0.78rem;
  color: #3b5687;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-track {
  height: 10px;
  border-radius: 999px;
  background: #e6eeff;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #6e92da;
}

.bar-fill.bar-fill-neutral {
  background: #3f6bc0;
}

.bar-fill.status-pendiente {
  background: #e5a645;
}

.bar-fill.status-en-progreso {
  background: #4b84e8;
}

.bar-fill.status-en-espera {
  background: #7b62cd;
}

.bar-fill.status-resuelto {
  background: #44a772;
}

.bar-fill.status-cerrado {
  background: #71809a;
}

.chart-value {
  font-size: 0.78rem;
  color: #2b477f;
  text-align: right;
  font-weight: 700;
}

.home-list {
  display: grid;
  gap: 8px;
}

.home-row {
  border: 1px solid #dce5f8;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  background: #f8fbff;
}

.home-row strong {
  font-size: 0.8rem;
  color: #234072;
}

.home-row p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #4a5f87;
  overflow-wrap: anywhere;
}

.home-row-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.home-row-meta small {
  color: #5a719b;
}

#iaSection {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  gap: 8px;
}

.ia-messages {
  margin: 0;
  border: 1px solid #d2dcf3;
  border-radius: 16px;
  padding: 10px;
  background:
    radial-gradient(circle at 12px 12px, rgba(170, 188, 223, 0.18) 1px, transparent 1px),
    radial-gradient(circle at 26px 26px, rgba(170, 188, 223, 0.18) 1px, transparent 1px),
    #efeae2;
  background-size: 36px 36px;
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
}

.ia-msg {
  display: flex;
  width: 100%;
  align-self: flex-start;
}

.ia-msg p {
  margin: 0;
  max-width: 84%;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.88rem;
  line-height: 1.35;
  border: 1px solid rgba(170, 184, 208, 0.55);
  box-shadow: 0 1px 1px rgba(22, 34, 55, 0.06);
}

.ia-msg.user {
  justify-content: flex-end;
}

.ia-msg.user p {
  background: linear-gradient(145deg, #2d79f5, #1e58b5);
  color: #f5f9ff;
  border-color: rgba(47, 105, 209, 0.52);
}

.ia-msg.assistant {
  justify-content: flex-start;
}

.ia-msg.assistant p {
  background: #ffffff;
  color: #1f2f4b;
}

.ia-form {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  border: 1px solid #cfdbf4;
  border-radius: 999px;
  padding: 6px 6px 6px 10px;
  background: #f8fbff;
}

.ia-form textarea {
  min-height: 40px;
  max-height: 140px;
  resize: none;
  border: 0;
  padding: 9px 4px;
  background: transparent;
}

.ia-form textarea:focus {
  outline: none;
}

.ia-send-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: linear-gradient(145deg, #1f77f2, #0f52be);
}

.ia-status {
  margin: 0;
  min-height: 16px;
  font-size: 0.78rem;
  color: #4a6393;
}

.ia-status.error {
  color: #b43a3a;
}

.mobile-bottom-nav {
  display: grid;
  position: relative;
  left: auto;
  transform: none;
  width: 100%;
  bottom: auto;
  z-index: 30;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 10px 14px 10px;
  background: linear-gradient(180deg, rgba(237, 244, 255, 0.98), rgba(222, 234, 255, 0.98));
  border: 1px solid #c7d6f2;
  border-radius: 18px;
  backdrop-filter: blur(6px);
  flex: 0 0 auto;
}

.nav-item {
  width: 100%;
  border: 1px solid #ccdaf5;
  border-radius: 12px;
  padding: 9px 8px;
  color: #486296;
  background: #f0f5ff;
  display: grid;
  gap: 3px;
  justify-items: center;
  font-size: 0.84rem;
  line-height: 1.1;
  font-weight: 700;
}

.nav-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.nav-item.is-active {
  color: #1f4ca3;
  border: 1px solid #7ba2f3;
  box-shadow: inset 0 0 0 1px #7ba2f3;
  background: #e8f0ff;
}

.workspace {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  min-width: 0;
}

.kanban-card h2 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.status-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(106px, 1fr));
  gap: 6px;
  overflow: hidden;
  padding: 6px;
  margin-bottom: 8px;
  max-width: 100%;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 16;
  border: 1px solid #d5e0f7;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 12px rgba(22, 55, 117, 0.08);
}

.filter-chip {
  --chip-bg: #eef3ff;
  --chip-text: #2a4f94;
  --chip-border: #d0dbf5;
  --chip-count-bg: #dfe8fc;
  width: 100%;
  white-space: normal;
  background: var(--chip-bg);
  color: var(--chip-text);
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.filter-chip span {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--chip-count-bg);
  color: inherit;
  font-size: 0.8rem;
}

.filter-chip.active {
  box-shadow: inset 0 0 0 1px rgba(19, 39, 78, 0.22);
}

.ticket-list {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow: visible;
  min-width: 0;
}

.ticket-row {
  text-align: left;
  width: 100%;
  border: 1px solid #d0dcf5;
  background: #f8faff;
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 8px;
  min-width: 0;
}

.ticket-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ticket-row .ticket-number {
  font-size: 0.77rem;
  color: #2e59ab;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-pill {
  --pill-bg: #e6eeff;
  --pill-text: #2751a0;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--pill-bg);
  color: var(--pill-text);
  flex: 0 0 auto;
}

.filter-chip.status-all {
  --chip-bg: #eef3ff;
  --chip-text: #23498f;
  --chip-border: #cbd9f6;
  --chip-count-bg: #dce8ff;
}

.filter-chip.status-pendiente {
  --chip-bg: #fff4e0;
  --chip-text: #875100;
  --chip-border: #f3d29b;
  --chip-count-bg: #ffe4bb;
}

.filter-chip.status-en-progreso {
  --chip-bg: #e8f1ff;
  --chip-text: #1f4da4;
  --chip-border: #b8cff8;
  --chip-count-bg: #d6e7ff;
}

.filter-chip.status-en-espera {
  --chip-bg: #efeaff;
  --chip-text: #5d32a4;
  --chip-border: #d0c2f5;
  --chip-count-bg: #e2d7ff;
}

.filter-chip.status-resuelto {
  --chip-bg: #e6f8ec;
  --chip-text: #1f6b44;
  --chip-border: #b7e3ca;
  --chip-count-bg: #d5f1e2;
}

.filter-chip.status-cerrado {
  --chip-bg: #edf1f8;
  --chip-text: #425a7f;
  --chip-border: #c8d2e4;
  --chip-count-bg: #dde5f2;
}

.status-pill.status-pendiente {
  --pill-bg: #fff1d6;
  --pill-text: #8c4c00;
}

.status-pill.status-en-progreso {
  --pill-bg: #dfeaff;
  --pill-text: #1f4ea6;
}

.status-pill.status-en-espera {
  --pill-bg: #ebe5ff;
  --pill-text: #5b34a0;
}

.status-pill.status-resuelto {
  --pill-bg: #ddf6e6;
  --pill-text: #1c6a41;
}

.status-pill.status-cerrado {
  --pill-bg: #e8edf5;
  --pill-text: #3f5b85;
}

.ticket-row p {
  margin: 0;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.ticket-row.active {
  border-color: #7ca3f3;
  box-shadow: inset 0 0 0 1px #7ca3f3;
  background: #edf3ff;
}

.ticket-row strong {
  line-height: 1.2;
}

.empty-col {
  margin: 4px;
}

.ticket-detail {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ticket-detail p {
  margin: 0;
  overflow-wrap: anywhere;
}

.ticket-detail.empty {
  color: var(--muted);
}

.preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.evidence-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.support-history-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.history-item {
  border: 1px solid #d4e0f6;
  border-radius: 12px;
  padding: 8px;
  background: #f8fbff;
  display: grid;
  gap: 4px;
}

.history-item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.evidence-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
  background: #fbfcff;
  min-width: 0;
}

.evidence-item img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
}

.evidence-item div {
  padding: 7px 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.evidence-item p {
  margin: 0;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

@keyframes enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (min-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  .main-header {
    align-items: flex-start;
    top: max(4px, env(safe-area-inset-top));
    width: calc(100% - 12px);
  }

  .app-logo {
    width: 30px;
    height: 30px;
  }

  .header-user {
    max-width: 48%;
    font-size: 0.78rem;
  }

  .blob {
    display: none;
  }

  .app-shell {
    margin: 10px auto 14px;
    padding-inline: 6px;
  }

  #appView {
    width: calc(100% - 12px);
  }

  .card {
    padding: 10px;
  }

  .login-card {
    padding: 10px;
    border-radius: 18px;
  }

  .login-card#loginView {
    min-height: auto;
    align-content: start;
  }

  .login-layout {
    gap: 10px;
  }

  .login-hero {
    min-height: 124px;
    padding: 12px;
    border-radius: 14px;
  }

  .login-hero-logo {
    width: 62px;
    height: 62px;
  }

  .login-hero-title {
    font-size: 1.08rem;
  }

  .login-form-panel {
    padding: 11px;
    border-radius: 13px;
  }

  .login-form-head h3 {
    font-size: 1rem;
  }

  .login-form-head p {
    font-size: 0.8rem;
  }

  .login-form input,
  .login-form button {
    min-height: 42px;
  }

  .google-login-button {
    min-height: 42px;
    font-size: 0.86rem;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: minmax(68px, 96px) minmax(0, 1fr) 24px;
    gap: 6px;
  }

  .ia-messages {
    max-height: none;
    min-height: 0;
    height: auto;
    padding-bottom: 4px;
  }

  .ia-msg p {
    max-width: 92%;
  }

  .ia-form {
    position: static;
    margin: 0;
    box-shadow: none;
  }

  .ia-status {
    position: static;
    margin: 0;
    min-height: 0;
  }

  .mobile-bottom-nav {
    display: grid !important;
    width: 100%;
    border-radius: 14px;
  }

  .kanban-card,
  .detail-card {
    width: 100%;
  }

  .detail-overlay {
    top: var(--header-height);
    left: 6px;
    right: 6px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    padding: 0;
    inset: unset;
    background: transparent;
    align-items: stretch;
  }

  .detail-card {
    height: 100%;
    max-height: 100%;
    border-radius: 16px;
  }

  .status-filters {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 5px;
    top: 0;
  }

  .filter-chip {
    padding: 6px 6px;
    font-size: 0.72rem;
  }

  .app-shell * {
    max-width: 100%;
  }

  .evidence-item {
    grid-template-columns: 1fr;
  }

  .evidence-item img {
    min-height: 150px;
    max-height: 220px;
  }
}

@media (min-width: 1220px) {
  .login-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: stretch;
  }

  .login-form-panel {
    align-self: stretch;
  }
}
