﻿/* ============================================================
   Vet Suite (VetCare) — Design System
   ============================================================ */

:root {
  --brand-50: #f0fdf9;
  --brand-100: #ecfdf5;
  --brand-200: #d1fae5;
  --brand-300: #a7f3d0;
  --brand-400: #6ee7b7;
  --brand-500: #34d399;
  --brand-600: #10b981;
  --brand-700: #059669;
  --brand-800: #047857;
  --brand-900: #065f46;

  --ink-900: #282566;
  --ink-800: #34317c;
  --ink-700: #423f8f;
  --ink-600: #4f4ba3;

  --surface: #f4f5fa;
  --card: #ffffff;
  --line: #e6e8f0;
  --text-1: #1c2030;
  --text-2: #5a6072;
  --text-3: #8b91a5;

  /* Estados de habitación */
  --st-green: #16a34a;   --st-green-bg: #ecfdf3;  --st-green-line: #bbe9cd;
  --st-blue: #2563eb;    --st-blue-bg: #eff4ff;   --st-blue-line: #c4d7fc;
  --st-orange: #ea700b;  --st-orange-bg: #fff5ec; --st-orange-line: #fcd7b2;
  --st-purple: #8b5cf6;  --st-purple-bg: #f6f2ff; --st-purple-line: #ddd0fb;
  --st-red: #dc2626;     --st-red-bg: #fef1f1;    --st-red-line: #f6c6c6;
  --st-gray: #64748b;    --st-gray-bg: #f1f4f8;   --st-gray-line: #d5dbe5;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgb(18 20 31 / .04), 0 6px 20px -6px rgb(18 20 31 / .07);
  --shadow-pop: 0 12px 40px -8px rgb(18 20 31 / .25);
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--surface);
  color: var(--text-1);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; }
h1:focus { outline: none; }
p { margin: 0; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cdd2e0; border-radius: 8px;
  border: 2px solid transparent; background-clip: content-box;
}

/* ============ Shell ============ */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 26px 30px 40px;
}

/* ============ Sidebar ============ */

.sidebar {
  background: linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 100%);
  color: #c9cddc;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar-thumb { background: #3a4059; background-clip: content-box; border: 2px solid transparent; border-radius: 8px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
}
.brand-logo {
  width: 42px; height: 42px; flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 6px 16px -4px rgb(16 185 129 / .5);
}
.brand-name { font-size: 15.5px; font-weight: 800; color: #fff; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: #8f95ab; margin-top: 1px; }

.nav-section { padding: 10px 14px 4px; }
.nav-section-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: #6d7390;
  padding: 8px 12px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9.5px 12px;
  border-radius: 10px;
  color: #b6bbce;
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover { background: #423f8f; color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px -6px rgb(79 70 229 / .55);
}
.nav-item .icon { opacity: .85; flex: none; }
.nav-item.active .icon { opacity: 1; }

.sidebar-footer { margin-top: auto; padding: 16px; }
.occupancy-card {
  background: rgb(255 255 255 / .05);
  border: 1px solid rgb(255 255 255 / .08);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.occupancy-card .oc-label { font-size: 11.5px; color: #9298ad; font-weight: 600; }
.occupancy-card .oc-value { font-size: 26px; font-weight: 800; color: #fff; margin: 2px 0 8px; }
.oc-bar { height: 6px; border-radius: 99px; background: rgb(255 255 255 / .12); overflow: hidden; }
.oc-bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-400), var(--brand-500)); }
.occupancy-card .oc-sub { font-size: 11px; color: #8f95ab; margin-top: 8px; }

/* ============ Topbar ============ */

.topbar {
  height: 66px; flex: none;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px;
  padding: 0 26px;
}
.topbar-hotel { display: flex; align-items: center; gap: 10px; }
.topbar-hotel .h-name { font-weight: 700; font-size: 15px; }
.topbar-hotel .h-sub { font-size: 11.5px; color: var(--text-3); }
.topbar-spacer { flex: 1; }

.topbar-chip {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--brand-300); color: var(--brand-600); }
.icon-btn .dot {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 99px;
  display: grid; place-items: center;
  border: 2px solid var(--card);
}

.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
.topbar-user .u-name { font-weight: 700; font-size: 13px; }
.topbar-user .u-role { font-size: 11px; color: var(--text-3); }

/* ============ Page header ============ */

.page-head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 22px;
}
.page-head h1 { font-size: 23px; font-weight: 800; letter-spacing: -.3px; }
.page-head .subtitle { color: var(--text-2); margin-top: 4px; font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; }

/* ============ Buttons ============ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px;
  font-weight: 600; font-size: 13.5px;
  padding: 10px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: #fff;
  box-shadow: 0 6px 18px -6px rgb(16 185 129 / .5);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost {
  background: var(--card); color: var(--text-2);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brand-300); color: var(--brand-600); }
.btn-danger { background: var(--st-red-bg); color: var(--st-red); border-color: var(--st-red-line); }
.btn-danger:hover { filter: brightness(.97); }
.btn-success { background: var(--st-green-bg); color: var(--st-green); border-color: var(--st-green-line); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }

/* ============ Cards ============ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 20px; }
.card-title { font-size: 15px; font-weight: 700; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head .actions { margin-left: auto; }

/* ============ Stat cards ============ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
}
.stat-value { font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

.t-green  { color: var(--st-green); }  .bg-green  { background: var(--st-green-bg); }
.t-blue   { color: var(--st-blue); }   .bg-blue   { background: var(--st-blue-bg); }
.t-orange { color: var(--st-orange); } .bg-orange { background: var(--st-orange-bg); }
.t-purple { color: var(--st-purple); } .bg-purple { background: var(--st-purple-bg); }
.t-red    { color: var(--st-red); }    .bg-red    { background: var(--st-red-bg); }
.t-gray   { color: var(--st-gray); }   .bg-gray   { background: var(--st-gray-bg); }
.t-brand  { color: var(--brand-600); } .bg-brand  { background: var(--brand-50); }

/* ============ Inputs ============ */

.input, .select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 0 13px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-1);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.input:focus, .select:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgb(16 185 129 / .16);
}
textarea.input { height: auto; padding: 10px 13px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6072' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.search-box { position: relative; }
.search-box .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.search-box .input { padding-left: 38px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }

/* ============ Filter bar ============ */

.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 13px 16px;
  margin-bottom: 20px;
}
.filter-bar .select, .filter-bar .search-box { width: auto; }
.filter-bar .select { min-width: 160px; }
.filter-bar .search-box .input { width: 240px; }
.filter-bar .spacer { flex: 1; }

/* ============ Badges ============ */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .4px;
  padding: 4px 10px;
  border-radius: 7px;
  text-transform: uppercase;
}
.badge .b-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green  { background: var(--st-green-bg);  color: var(--st-green); }
.badge-blue   { background: var(--st-blue-bg);   color: var(--st-blue); }
.badge-orange { background: var(--st-orange-bg); color: var(--st-orange); }
.badge-purple { background: var(--st-purple-bg); color: var(--st-purple); }
.badge-red    { background: var(--st-red-bg);    color: var(--st-red); }
.badge-gray   { background: var(--st-gray-bg);   color: var(--st-gray); }

/* ============ Room grid ============ */

.floor-section { margin-bottom: 26px; }
.floor-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 800; letter-spacing: 1px;
  color: var(--text-2);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 14px;
}

.room-card {
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--card);
  padding: 14px 15px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  position: relative;
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.room-card .rc-top { display: flex; align-items: center; justify-content: space-between; }
.room-card .rc-number { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.room-card .rc-type { font-size: 12px; color: var(--text-2); margin-top: 9px; font-weight: 500; }
.room-card .rc-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); margin-top: 5px; }
.room-card .badge { margin-top: 7px; }

.room-card.rs-0 { background: var(--st-green-bg);  border-color: var(--st-green-line); }
.room-card.rs-1 { background: var(--st-blue-bg);   border-color: var(--st-blue-line); }
.room-card.rs-2 { background: var(--st-orange-bg); border-color: var(--st-orange-line); }
.room-card.rs-3 { background: var(--st-purple-bg); border-color: var(--st-purple-line); }
.room-card.rs-4 { background: var(--st-red-bg);    border-color: var(--st-red-line); }
.room-card.rs-5 { background: var(--st-gray-bg);   border-color: var(--st-gray-line); }
.room-card.rs-0 .rc-number, .room-card.rs-0 .rc-icon { color: var(--st-green); }
.room-card.rs-1 .rc-number, .room-card.rs-1 .rc-icon { color: var(--st-blue); }
.room-card.rs-2 .rc-number, .room-card.rs-2 .rc-icon { color: var(--st-orange); }
.room-card.rs-3 .rc-number, .room-card.rs-3 .rc-icon { color: var(--st-purple); }
.room-card.rs-4 .rc-number, .room-card.rs-4 .rc-icon { color: var(--st-red); }
.room-card.rs-5 .rc-number, .room-card.rs-5 .rc-icon { color: var(--st-gray); }

/* ============ Layout helpers ============ */

.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }

/* Legend */
.legend-item { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: none; }
.legend-item .l-name { font-weight: 700; font-size: 13px; }
.legend-item .l-desc { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

/* ============ Tables ============ */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafafd; }
.table tbody tr:last-child td { border-bottom: none; }
.td-strong { font-weight: 700; }
.td-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ============ Modal ============ */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgb(16 18 28 / .5);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  z-index: 100;
  animation: fade .18s ease;
  padding: 24px;
}
.modal {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-lg { max-width: 680px; }
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px 14px;
}
.modal-head h3 { font-size: 17px; font-weight: 800; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 6px 24px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }

.animate-fade-up { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ Kanban (Housekeeping) ============ */

.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.kanban-col {
  background: #eef0f6;
  border-radius: var(--radius);
  padding: 12px;
}
.kanban-col-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px;
  padding: 4px 6px 12px;
}
.kanban-col-head .count {
  margin-left: auto;
  background: var(--card);
  border-radius: 8px;
  min-width: 26px; height: 22px;
  display: grid; place-items: center;
  font-size: 12px;
  padding: 0 6px;
  border: 1px solid var(--line);
}
.kanban-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.kanban-card .k-room { font-weight: 800; font-size: 14.5px; }
.kanban-card .k-meta { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.kanban-card .k-actions { display: flex; gap: 8px; margin-top: 11px; }

/* ============ Misc ============ */

.empty-state {
  text-align: center;
  color: var(--text-3);
  padding: 46px 20px;
}
.empty-state .icon { margin-bottom: 10px; opacity: .5; }

.pill-tabs { display: inline-flex; background: #eef0f6; border-radius: 11px; padding: 4px; gap: 4px; }
.pill-tabs button {
  border: none; background: transparent;
  border-radius: 8px;
  padding: 7px 15px;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
}
.pill-tabs button.active { background: var(--card); color: var(--brand-600); box-shadow: var(--shadow-card); }

.statusbar {
  height: 34px; flex: none;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 22px;
  padding: 0 26px;
  font-size: 11.5px;
  color: var(--text-3);
}
.statusbar .row { gap: 6px; }
.statusbar .spacer { flex: 1; }
.statusbar .online { color: var(--st-green); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.statusbar .online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-green); }

.construction {
  display: grid; place-items: center;
  min-height: 60vh;
  text-align: center;
}
.construction .icon-wrap {
  width: 84px; height: 84px;
  border-radius: 24px;
  background: var(--brand-50);
  color: var(--brand-500);
  display: grid; place-items: center;
  margin: 0 auto 18px;
}
.construction h2 { font-size: 20px; font-weight: 800; }
.construction p { color: var(--text-2); margin-top: 8px; }

/* ============ Dashboard ============ */

.dash-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.9fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1280px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.quick-btn {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.quick-btn:hover { background: var(--brand-50); }

/* ============ Charts (Reportes) ============ */

.chart-cols {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 190px;
}
.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  min-width: 0;
}
.chart-col-track {
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: #f1f2f8;
  border-radius: 4px;
}
.chart-col-fill {
  width: 100%;
  background: var(--brand-500);
  border-radius: 4px 4px 0 0;
  transition: height .3s ease;
}
.chart-col:hover .chart-col-fill { background: var(--brand-700); }
.chart-col-label {
  font-size: 10px;
  color: var(--text-3);
  text-align: center;
  height: 16px;
  margin-top: 4px;
}

.hbar-row {
  display: grid;
  grid-template-columns: 110px 1fr 70px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.hbar-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 14px; background: #f1f2f8; border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--brand-500); border-radius: 4px; transition: width .3s ease; }
.hbar-row:hover .hbar-fill { background: var(--brand-700); }
.hbar-value { font-size: 12.5px; font-weight: 800; text-align: right; }

/* ============ Login ============ */

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(800px 500px at 15% 10%, rgb(16 185 129 / .35), transparent 60%),
    radial-gradient(700px 480px at 90% 90%, rgb(16 185 129 / .25), transparent 55%),
    linear-gradient(160deg, var(--ink-800), var(--ink-900));
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-pop);
  padding: 36px 34px 26px;
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand .brand-logo { margin: 0 auto 14px; }
.login-brand h1 { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.login-brand p { color: var(--text-3); font-size: 12.5px; margin-top: 4px; }
.login-error {
  display: flex; align-items: center; gap: 8px;
  background: var(--st-red-bg);
  color: var(--st-red);
  border: 1px solid var(--st-red-line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px; font-weight: 600;
  margin-bottom: 16px;
}
.login-foot {
  text-align: center;
  color: var(--text-3);
  font-size: 11px;
  margin-top: 22px;
}

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff3cd; padding: 12px 24px; z-index: 999; box-shadow: 0 -2px 12px rgb(0 0 0 / .1); }

@media (max-width: 1100px) {
  .two-col { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 72px 1fr; }
  .sidebar .brand-name, .sidebar .brand-sub, .sidebar .nav-section-title,
  .sidebar .nav-item span, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; }
}

/* ============================================================
   Extensiones Clinic Suite
   ============================================================ */

/* --- Tabs de ficha del paciente --- */
.tab-bar { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab-bar button {
  border: 0; background: none; cursor: pointer; padding: 10px 16px; font-size: 13.5px; font-weight: 600;
  color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tab-bar button:hover { color: var(--brand-600); }
.tab-bar button.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }

/* --- Agenda médica (grilla horaria) --- */
.agenda-wrap { overflow-x: auto; }
.agenda-grid { display: grid; min-width: 900px; }
.agenda-head, .agenda-row { display: contents; }
.agenda-cell {
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  min-height: 54px; padding: 4px; position: relative; background: var(--card);
}
.agenda-cell.hour-label {
  background: var(--surface); font-size: 11.5px; font-weight: 600; color: var(--text-3);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 6px;
}
.agenda-prof {
  background: var(--surface); padding: 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
}
.agenda-prof .p-name { font-weight: 700; font-size: 13px; }
.agenda-prof .p-esp { font-size: 11.5px; color: var(--text-3); }
.agenda-chip {
  border-radius: 8px; padding: 5px 8px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  border: 1px solid; margin-bottom: 3px; line-height: 1.25; overflow: hidden;
}
.agenda-chip .c-time { font-size: 10.5px; opacity: .75; font-weight: 500; }
.ac-0 { background: var(--st-blue-bg); border-color: var(--st-blue-line); color: var(--st-blue); }      /* Reservada */
.ac-1 { background: var(--st-green-bg); border-color: var(--st-green-line); color: var(--st-green); }   /* Confirmada */
.ac-2 { background: var(--st-orange-bg); border-color: var(--st-orange-line); color: var(--st-orange); }/* En espera */
.ac-3 { background: var(--st-purple-bg); border-color: var(--st-purple-line); color: var(--st-purple); }/* Atendida */
.ac-4 { background: var(--st-red-bg); border-color: var(--st-red-line); color: var(--st-red); }         /* Cancelada */
.ac-5 { background: var(--st-gray-bg); border-color: var(--st-gray-line); color: var(--st-gray); }      /* No asistió */

/* --- Timeline de historia clínica --- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: var(--line); border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand-500); border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--brand-200);
}
.tl-date { font-size: 12px; font-weight: 700; color: var(--brand-600); }
.tl-title { font-weight: 700; font-size: 13.5px; margin-top: 2px; }
.tl-sub { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }

/* --- Gráfico circular (conic-gradient) --- */
.pie-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pie { width: 150px; height: 150px; border-radius: 50%; flex: 0 0 auto; position: relative; }
.pie::after {
  content: ""; position: absolute; inset: 34px; background: var(--card); border-radius: 50%;
}

/* --- Signos vitales --- */
.vitals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.vital-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.vital-box label { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); margin-bottom: 4px; }

/* --- Impresión (recetas, historia) --- */
.print-shell {
  max-width: 800px; margin: 0 auto; padding: 30px; background: #fff; color: #16181f;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif; font-size: 13px; min-height: 100vh;
}
.print-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #16181f; padding-bottom: 14px; margin-bottom: 18px; }
.print-head h1 { font-size: 19px; }
.print-head .clinic-info { font-size: 11.5px; color: #555; text-align: right; }
.print-section { margin-bottom: 16px; }
.print-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin-bottom: 8px; }
.print-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.print-table th, .print-table td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; }
.print-table th { background: #f2f3f7; }
.print-firma { margin-top: 60px; text-align: center; }
.print-firma .linea { border-top: 1px solid #16181f; width: 220px; margin: 0 auto 4px; }
.no-print { margin: 18px 0; display: flex; gap: 10px; justify-content: center; }
@media print {
  .no-print { display: none !important; }
  .print-shell { padding: 0; }
}

/* --- Utilidades varias --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.text-right { text-align: right; }
.w-100 { width: 100%; }

/* ============================================================
   Extensiones Vet Suite
   ============================================================ */

/* --- Ticket 80mm (comprobantes) --- */
.ticket {
  max-width: 300px;
  margin: 0 auto;
  background: #fff;
  color: #111;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.35;
  padding: 12px 8px;
}
.ticket table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
  font-size: 11.5px;
}
.ticket table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  border-top: 1px dashed #111;
  border-bottom: 1px dashed #111;
  padding: 3px 2px;
}
.ticket table td { padding: 2px; vertical-align: top; }
.ticket-head {
  text-align: center;
  border-bottom: 1px dashed #111;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.ticket-head h1, .ticket-head h2, .ticket-head h3 { font-size: 14px; font-weight: 700; margin: 0; }
.ticket-section { border-top: 1px dashed #111; margin-top: 8px; padding-top: 8px; }
.ticket-total { font-weight: 700; font-size: 13px; }
.ticket .sep { border: none; border-top: 1px dashed #111; margin: 8px 0; }

/* --- WhatsApp --- */
.wa-link { color: #25d366; font-weight: 600; }

