* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  background: #eef1f5;
  color: #444c59;
  min-height: 100vh;
}

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  padding: 2.2rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(50, 55, 65, 0.12);
  max-width: 420px;
  width: 100%;
  border-top: 3px solid #4a8df8;
}

.login-card h2 {
  text-align: center;
  margin-top: 0;
  color: #323c50;
  font-weight: 600;
  font-size: 22px;
}

input {
  margin: 10px 0;
  padding: 12px 14px;
  width: 100%;
  border: 1px solid #d4d9e0;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: #323c50;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: #4a8fd8;
  box-shadow: 0 0 0 3px rgba(74, 143, 216, 0.15);
}

button {
  background: #4a8fd8;
  border: none;
  padding: 12px 15px;
  color: #fff;
  cursor: pointer;
  width: 100%;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  margin: 7px 0;
  transition: background 0.2s;
}

button:hover {
  background: #3f7fc2;
}

button:active {
  background: #3670ad;
}

.error {
  color: #e6492f;
  font-size: 0.9em;
  margin-top: 10px;
  text-align: center;
}

/* ===== Tema login: tarjeta dividida (colores del proyecto) ===== */
body.login-page {
  background: linear-gradient(135deg, #dfe4f2 0%, #eef1f6 100%);
}

.login-card-theme {
  display: flex;
  width: 880px;
  max-width: 96vw;
  min-height: 470px;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(40, 45, 60, 0.28);
  border: none;
  padding: 0;
}

.login-left {
  flex: 0 0 44%;
  background: linear-gradient(145deg, #4a8fd8 0%, #3f7fc2 55%, #3670ad 100%);
  color: #ffffff;
  padding: 44px 40px;
  border-radius: 26px 0 0 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.login-left h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.login-left .login-left-sub {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.9;
  margin: 0 0 12px;
}

.login-left p {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.92;
  margin: 0 auto;
  max-width: 380px;
}

.login-left .btn-login-left {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  width: auto;
  margin: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.login-left .btn-login-left:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #ffffff;
}

.login-credits {
  margin-top: auto;
  align-self: flex-end;
  font-size: 11px;
  color: #98a6ad;
  line-height: 1.5;
}

.login-right {
  flex: 1;
  background: #ffffff;
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.login-right .login-logo {
  font-size: 30px;
  font-weight: 800;
  color: #323c50;
  margin: 0 0 4px;
  text-align: center;
}
.login-right .login-logo span {
  color: #4a8fd8;
}

.login-right .login-logo .brand-anio {
  color: #98a6ad;
  font-size: 0.5em;
  margin-left: 6px;
}

.login-right .login-sub {
  font-size: 13px;
  color: #98a6ad;
  margin: 0 0 28px;
  text-align: center;
}

.login-right input {
  margin: 9px 0;
  padding: 13px 16px;
  width: 100%;
  border: 1px solid #e3e5ea;
  border-radius: 10px;
  font-size: 14px;
  background: #f5f6f8;
  color: #323c50;
}
.login-right input:focus {
  outline: none;
  border-color: #4a8fd8;
  box-shadow: 0 0 0 3px rgba(74, 143, 216, 0.16);
  background: #ffffff;
}

.btn-primary-purple {
  background: linear-gradient(135deg, #4a8fd8 0%, #3670ad 100%);
  border: none;
  color: #ffffff;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  margin: 22px 0 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary-purple:hover {
  background: linear-gradient(135deg, #3f7fc2 0%, #2e5f94 100%);
}

.btn-secondary-login {
  background: #ffffff;
  border: 2px solid #4a8fd8;
  color: #4a8fd8;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  margin: 0 0 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-secondary-login:hover {
  background: #e8f0fb;
  color: #3670ad;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 300px;
  min-width: 300px;
  background: #30353e;
  color: #a4abb7;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: auto;
  min-height: 100vh;
}

.sidebar .brand {
  padding: 18px 20px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  border-bottom: 1px solid #3a404c;
}

.sidebar .brand span {
  color: #4a8fd8;
}

.sidebar .brand .brand-anio {
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
  margin-left: 4px;
}

.topbar-sub {
  font-size: 13px;
  color: #98a6ad;
  font-weight: 400;
}

.sidebar nav a {
  display: block;
  padding: 12px 20px;
  color: #a4abb7;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: #3a404c;
  border-left-color: #4a8fd8;
  color: #ffffff;
}

.sidebar .user-box {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid #3a404c;
  font-size: 13px;
}

.sidebar .user-box strong {
  color: #ffffff;
  display: block;
}

.topbar .logout-btn {
  background: transparent;
  border: 1px solid #d4d9e0;
  color: #e6492f;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  width: auto;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.topbar .logout-btn:hover {
  background: #fce8e6;
  color: #ff6b5a;
}

.main-content {
  flex: 1;
  padding: 24px;
}

.topbar {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(50, 55, 65, 0.08);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  color: #323c50;
  font-weight: 600;
}

.topbar-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hamburger {
  width: 40px;
  height: 40px;
  padding: 10px 8px;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #323c50;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #ffffff;
  border-radius: 2px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 8px);
  left: 16px;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #d4d9e0;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(50, 55, 65, 0.15);
  z-index: 100;
  padding: 6px 0;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  margin: 0;
  font-size: 14px;
  color: #323c50;
  background: transparent;
  border: none;
  cursor: pointer;
}

.dropdown-menu button:hover {
  background: #eef1f5;
  color: #4a8fd8;
}

.topbar-sub {
  font-size: 13px;
  color: #98a6ad;
  font-weight: 400;
}

.panel {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(50, 55, 65, 0.08);
  padding: 20px;
  margin-bottom: 16px;
}

.panel h2 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #323c50;
  font-weight: 600;
}

.panel p {
  font-size: 0.95rem;
  color: #6c757d;
  margin: 8px 0;
}

.error-box {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(50, 55, 65, 0.08);
  padding: 20px;
  text-align: center;
}

.error-box h2 {
  color: #e6492f;
}

.error-box a {
  color: #4a8fd8;
}

.hidden {
  display: none;
}

.panel-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-col {
  flex: 1;
  min-width: 280px;
}

.panel-col label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #6c757d;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #323c50;
  font-weight: 600;
}

.cal-header button {
  width: 30px;
  padding: 4px 0;
  margin: 0;
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.cal-table th {
  font-size: 12px;
  color: #6c757d;
  padding: 4px;
}

.cal-table td {
  padding: 2px;
}

.cal-dia {
  width: 100%;
  padding: 6px 0;
  margin: 0;
  background: transparent;
  color: #323c50;
  font-weight: 400;
  border-radius: 3px;
}

.cal-dia:hover {
  background: #4a8fd8;
  color: #fff;
}

.cal-table td.hoy .cal-dia {
  background: #4a8fd8;
  color: #fff;
}

.cal-table td.seleccion .cal-dia {
  outline: 2px solid #3670ad;
}

.agenda-list-col {
  width: 360px;
  min-width: 300px;
}

.agenda-dash-col {
  flex: 1;
  min-width: 320px;
}

.sidebar-agenda-row {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  align-items: stretch;
}

.sidebar-agenda-row .sidebar-agenda {
  flex: 1 1 0;
  min-width: 0;
  min-height: 260px;
  max-height: 300px;
  margin: 0;
}

.calendar-widget {
  border: 1px solid #d4d9e0;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 16px;
  background: #fff;
}

.agenda-control {
  border: 1px solid #d4d9e0;
  border-radius: 4px;
  padding: 0;
  min-height: 160px;
  color: #6c757d;
  font-size: 14px;
  background: #fff;
}

.agenda-layout {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.agenda-title {
  background: #eef1f5;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  color: #323c50;
  border-bottom: 1px solid #d4d9e0;
  border-radius: 4px 4px 0 0;
}

.agenda-empty {
  padding: 16px 12px;
  color: #98a6ad;
  font-size: 13px;
}

.cita-info {
  overflow: hidden;
  min-width: 0;
}

.cita-paciente {
  font-size: 13px;
  font-weight: 600;
  color: #323c50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cita-meta {
  font-size: 11px;
  color: #98a6ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-control {
  border: 1px solid #d4d9e0;
  border-radius: 4px;
  padding: 16px;
  background: #fff;
  min-height: 90px;
}

.dash-title {
  font-weight: 600;
  font-size: 15px;
  color: #323c50;
  margin-bottom: 14px;
}

.dash-total-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 12px 16px;
  background: #eef1f5;
  border-radius: 4px;
}

.dash-total-label {
  font-size: 15px;
  font-weight: 600;
  color: #323c50;
}

.dash-total-val {
  font-size: 22px;
  font-weight: 700;
  color: #4a8fd8;
}

.dash-suc-block {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  padding: 6px 10px;
  border-left: 4px solid #4a8fd8;
  background: #ffffff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(50, 55, 65, 0.08);
}

.dash-suc-label {
  font-size: 13px;
  color: #6c757d;
}

.dash-suc-nombre {
  font-size: 13px;
  font-weight: 600;
  color: #323c50;
}

.schedule-control {
  border: 1px solid #d4d9e0;
  border-radius: 4px;
  padding: 0;
  background: #fff;
  margin-top: 16px;
  overflow-x: auto;
}

.sched-title {
  font-weight: 600;
  font-size: 15px;
  color: #323c50;
  padding: 12px 16px;
  border-bottom: 1px solid #d4d9e0;
  background: #eef1f5;
}

.sched-scroll {
  overflow: auto;
  max-height: 720px;
}

.sched-table {
  border-collapse: collapse;
  font-size: 12px;
}

.sched-table th,
.sched-table td {
  border: 1px solid #e4e8ee;
  padding: 0;
  min-width: 90px;
  vertical-align: top;
  text-align: left;
}

.sched-table th.sched-head {
  width: 90px;
  min-width: 90px;
}

.sched-table td.sched-citas {
  width: 90px;
  min-width: 90px;
}

.sched-citas {
  overflow: hidden;
}

.sched-cita {
  width: 100%;
  height: 100%;
  min-height: 22px;
  box-sizing: border-box;
  overflow: hidden;
}

.sched-cita .sched-paciente {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.sched-cita .sched-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-table tr.sched-shade td {
  background: #e9ebf0;
}

.sched-time-head,
.sched-time {
  background: #fafbfc;
  color: #6c757d;
  font-weight: 600;
  white-space: nowrap;
}

.sched-head {
  background: #eef1f5;
  color: #323c50;
  font-weight: 600;
  white-space: nowrap;
}

.sched-table th,
.sched-table td.sched-time {
  position: sticky;
  top: 0;
}

.sched-citas {
  min-height: 40px;
}

.sched-cita {
  background: #f4f7fa;
  background-image: linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  border-left: 3px solid #4a8fd8;
  border-radius: 3px;
  padding: 2px 4px;
}

.sched-paciente {
  font-size: 12px;
  font-weight: 600;
  color: #323c50;
}

.sched-meta {
  font-size: 11px;
  color: #98a6ad;
}

.ficha-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 35, 45, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ficha-modal {
  min-width: 320px;
  max-width: 460px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  padding: 0;
}

.ficha-head {
  background: #323c50;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 6px 6px 0 0;
}

.ficha-body {
  padding: 16px;
  font-size: 13px;
  color: #323c50;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ficha-close {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 0;
  background: #4a8fd8;
  color: #fff;
  border: none;
  border-radius: 0 0 6px 6px;
  font-size: 14px;
  cursor: pointer;
}

.ficha-close:hover {
  background: #3a7bc2;
}

.btn-reporte-emitir {
  float: none;
  display: inline-block;
  margin-top: 10px;
}

.reporte-modal .ficha-body {
  max-height: 60vh;
  overflow-y: auto;
}

.reporte-modal label {
  display: block;
  font-size: 12px;
  color: #6c757d;
  margin: 8px 0 4px;
}

.reporte-modal select,
.reporte-modal input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #d4d9e0;
  border-radius: 4px;
  box-sizing: border-box;
}

#rep-resultado {
  margin-top: 14px;
}

.rep-titulo {
  font-weight: 700;
  font-size: 15px;
  color: #323c50;
  padding: 6px 0 10px;
}

.rep-scroll {
  overflow: auto;
  max-height: 380px;
}

.rep-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.rep-tabla th,
.rep-tabla td {
  border: 1px solid #e4e8ee;
  padding: 4px 6px;
  text-align: left;
  white-space: nowrap;
}

.rep-tabla th {
  background: #eef1f5;
  color: #323c50;
  font-weight: 600;
}

.rep-medico {
  background: #323c50;
  color: #ffffff;
  font-weight: 600;
}

.rep-periodo {
  background: #fafbfc;
  color: #6c757d;
  font-style: italic;
  font-weight: 600;
}

.dash-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.dash-donut {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-donut-hole {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dash-donut-total {
  font-size: 30px;
  font-weight: 700;
  color: #323c50;
  line-height: 1;
}

.dash-donut-label {
  font-size: 12px;
  color: #98a6ad;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.dash-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 16px;
}

.dash-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  min-width: 12px;
}

.dash-legend-nombre {
  color: #6c757d;
}

.dash-legend-valor {
  margin-left: auto;
  font-weight: 600;
  color: #323c50;
}

.slot-row {
  display: flex;
  border-bottom: 1px solid #eef1f5;
}

.slot-time {
  width: 48px;
  min-width: 48px;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #98a6ad;
  border-right: 1px solid #eef1f5;
  background: #fafbfc;
  text-align: center;
}

.slot-body {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
}

.slot-cita {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 8px;
  border-left: 3px solid #4a8fd8;
  margin: 2px 0;
  cursor: pointer;
  background: #f4f7fa;
  border-radius: 3px;
}

.slot-cita:hover {
  background: #eaf1f8;
}

.slot-empty {
  height: 26px;
}

.cita-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: #4a8fd8;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-fecha {
  padding: 14px 20px 6px;
}

.side-fecha label {
  display: block;
  font-size: 11px;
  color: #98a6ad;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.side-fecha input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #434a57;
  background: #3a404c;
  color: #ffffff;
  border-radius: 4px;
}

.side-fecha input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.calendar-widget {
  margin: 6px 12px 0;
  border: 1px solid #434a57;
  border-radius: 4px;
  padding: 10px;
  background: #3a404c;
}

.calendar-widget .cal-header {
  color: #ffffff;
}

.calendar-widget .cal-header button {
  background: transparent;
  color: #a4abb7;
  border: 1px solid #434a57;
}

.calendar-widget .cal-header button:hover {
  background: #4a8fd8;
  color: #fff;
}

.calendar-widget .cal-table th {
  color: #98a6ad;
}

.calendar-widget .cal-dia {
  background: transparent;
  color: #d5dae1;
}

.calendar-widget .cal-dia:hover {
  background: #4a8fd8;
  color: #fff;
}

.calendar-widget .cal-table td.hoy .cal-dia {
  background: #4a8fd8;
  color: #fff;
}

.calendar-widget .cal-table td.feriado .cal-dia {
  background: #dcdcdc;
  color: #6c757d;
}

.calendar-widget .cal-table td.seleccion .cal-dia {
  outline: 2px solid #5b8ee0;
}

.sidebar-agenda {
  margin: 6px 12px 0;
  border: 1px solid #434a57;
  border-radius: 4px;
  background: #3a404c;
  color: #a4abb7;
  font-size: 13px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
}

.sidebar-agenda .agenda-title {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #333842;
  color: #ffffff;
  border-bottom: 1px solid #434a57;
  border-radius: 4px 4px 0 0;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-agenda .agenda-empty {
  padding: 12px;
  color: #98a6ad;
  font-size: 12px;
}

.sidebar-agenda .slot-row {
  border-bottom: 1px solid #3a404c;
}

.sidebar-agenda .slot-time {
  background: #333842;
  color: #98a6ad;
  border-right: 1px solid #434a57;
}

.sidebar-agenda .slot-cita {
  background: #363c48;
  color: #d5dae1;
}

.sidebar-agenda .slot-cita:hover {
  background: #434a57;
}

.sidebar-agenda .slot-empty {
  height: 22px;
}

.sidebar-agenda .cita-paciente {
  color: #ffffff;
}

.sidebar-agenda .cita-meta {
  color: #98a6ad;
}

.proc-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-bottom: 1px solid #3a404c;
  font-size: 12px;
}

.proc-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proc-nombre {
  color: #d5dae1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.proc-valor {
  font-weight: 700;
  color: #ffffff;
}

/* ===== Vista citas (mobile-first) ===== */
.citas-mobile {
  padding: 16px;
  min-height: 100vh;
}

.citas-mobile .topbar {
  margin-bottom: 12px;
}

.citas-mobile .topbar h1 {
  font-size: 16px;
}

.citas-topbar {
  padding: 12px 14px;
}
.citas-medico {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.citas-medico-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.citas-medico-info h1 {
  font-size: 15px;
  margin: 0;
}
.citas-medico-nombre {
  font-weight: 700;
  font-size: 14px;
  color: #323c50;
}
.citas-medico-foto {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(50, 55, 65, 0.25);
  flex-shrink: 0;
}

.citas-medico-foto-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.citas-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #323c50;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  padding: 0 8px;
  box-shadow: 0 1px 4px rgba(50, 55, 65, 0.2);
}

.citas-datebar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #d4d9e0;
  border-radius: 10px;
  padding: 4px 6px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(50, 55, 65, 0.08);
}
.citas-datebar label {
  font-size: 11px;
  font-weight: 600;
  color: #323c50;
  white-space: nowrap;
}
.citas-datebar input {
  padding: 4px 6px;
  border: 1px solid #d4d9e0;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  color: #323c50;
}

.citas-datebar .logout-btn {
  background: transparent;
  border: 1px solid #d4d9e0;
  color: #e6492f;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  width: auto;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.citas-datebar .logout-btn:hover {
  background: #fce8e6;
  color: #ff6b5a;
}

.switch-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eef1f5;
  border: 1px solid #d4d9e0;
  border-radius: 20px;
  height: 26px;
  width: 92px;
  padding: 0 4px;
  cursor: pointer;
  user-select: none;
  position: relative;
  flex-shrink: 0;
}
.switch-record .switch-option {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #98a6ad;
  z-index: 2;
  padding: 0 2px;
  transition: color 0.2s;
}
.switch-record .switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 44px;
  height: 20px;
  background: #4a8fd8;
  border-radius: 16px;
  transition: left 0.2s ease;
}
.switch-record[data-value="SIN"] .switch-thumb {
  left: 44px;
}
.switch-record[data-value="CON"] .switch-option[data-value="CON"] {
  color: #ffffff;
}
.switch-record[data-value="SIN"] .switch-option[data-value="SIN"] {
  color: #ffffff;
}
.citas-datebar input:focus {
  outline: none;
  border-color: #4a8fd8;
  box-shadow: 0 0 0 3px rgba(74, 143, 216, 0.15);
}

.citas-lista {
  width: 100%;
}
.citas-empty {
  text-align: center;
  color: #98a6ad;
  padding: 24px 0;
  font-size: 14px;
}

.citas-hora {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eef1f5;
  color: #4a8fd8;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 6px;
}

.cita-item {
  background: #ffffff;
  border: 1px solid #e3e5ea;
  border-left: 3px solid #4a8fd8;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 6px 0;
  box-shadow: 0 1px 4px rgba(50, 55, 65, 0.06);
}
.cita-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-size: 14px;
  color: #323c50;
  gap: 8px;
}
.cita-row.cita-top .cita-ficha {
  font-weight: 700;
}
.cita-codigo {
  color: #4a4f5e;
  font-weight: 400;
  font-size: 13px;
}
.cita-row .cita-paciente {
  font-weight: 600;
  color: #1d2733;
  text-align: right;
  flex: 1;
}
.cita-row.cita-bottom .cita-proc {
  color: #4a4f5e;
  flex: 1;
}
.cita-row .cita-dur {
  color: #323c50;
  font-weight: 700;
  white-space: nowrap;
}
.cita-row.cita-horas {
  background: #eef1f5;
  border-radius: 5px;
  padding: 4px 8px;
  margin: 3px 0;
}
.cita-dur-m {
  font-weight: 400;
  font-size: 12px;
  color: #4a4f5e;
}
.cita-medico {
  color: #4a8fd8;
  font-size: 12px;
  font-weight: 600;
}
.cita-hora-ini {
  color: #4a4f5e;
  font-size: 12px;
}
.cita-hora-fin {
  color: #4a4f5e;
  font-size: 12px;
  text-align: right;
}

/* ===== Responsive: pantallas medianas (tablets) ===== */
@media (max-width: 820px) {
  .login-card-theme {
    flex-direction: column;
    width: 94vw;
    min-height: 0;
  }
  .login-left {
    flex: none;
    border-radius: 26px 26px 0 0;
    padding: 28px 24px;
  }
  .login-left h1 {
    font-size: 26px;
  }
  .login-right {
    padding: 32px 24px;
  }
}

/* ===== Responsive: celulares ===== */
@media (max-width: 600px) {
  body.login-page {
    align-items: flex-start;
    padding: 16px 0;
    overflow-y: auto;
  }

  .login-card-theme {
    width: 100vw;
    max-width: 100vw;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .login-left {
    border-radius: 0;
    padding: 26px 20px;
  }
  .login-left .login-left-sub,
  .login-left p {
    font-size: 13px;
  }
  .login-left h1 {
    font-size: 24px;
  }
  .login-right {
    padding: 26px 20px 20px;
  }
  .login-right .login-logo {
    font-size: 26px;
  }
  .login-right input {
    padding: 12px 14px;
    font-size: 16px;
  }
  .login-credits {
    align-self: center;
  }

  /* ===== Pantalla Citas (móvil) ===== */
  .citas-mobile {
    padding: 0;
  }
  .citas-mobile .topbar {
    margin-bottom: 0;
  }
  .citas-topbar {
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid #e3e5ea;
  }
  .citas-medico {
    gap: 10px;
  }
  .citas-medico-info h1 {
    font-size: 14px;
  }
  .citas-medico-nombre {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw;
  }
  .citas-medico-foto {
    width: 48px;
    height: 48px;
  }
  .citas-count {
    font-size: 16px;
    min-width: 32px;
    height: 32px;
  }
  .citas-datebar {
    flex-wrap: wrap;
    padding: 10px;
    margin: 10px;
    border-radius: 10px;
  }
  .citas-datebar label {
    font-size: 12px;
  }
  .citas-datebar input {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    padding: 8px;
  }
  .citas-datebar .logout-btn {
    width: 100%;
    justify-content: center;
    padding: 8px;
    font-size: 12px;
    margin-top: 4px;
  }
  .citas-lista {
    padding: 0 10px 16px;
  }
  .switch-record {
    margin-left: auto;
  }

  /* Ajustes de tarjetas de citas */
  .cita-item {
    padding: 10px;
  }
  .cita-row {
    font-size: 13px;
  }
  .cita-row.cita-horas {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .cita-hora-fin {
    text-align: left;
  }
}

/* ===== Responsive: pantallas muy estrechas ===== */
@media (max-width: 380px) {
  .citas-datebar {
    flex-direction: column;
    align-items: stretch;
  }
  .citas-datebar input,
  .citas-datebar .switch-record {
    width: 100%;
  }
  .switch-record {
    margin-left: 0;
  }
  .citas-datebar .logout-btn {
    margin-top: 6px;
  }
}

/* ===== Responsive: Agenda (sidebar deslizante + layout móvil) ===== */
.sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    min-width: 300px;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 1200;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  body.sidebar-active {
    overflow: hidden;
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 32, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease;
    z-index: 1190;
  }
  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  .main-content {
    padding: 14px;
  }
  .agenda-layout {
    gap: 14px;
  }
  .agenda-dash-col {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 10px;
  }
  .topbar-menu {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
  }
  .topbar-menu h1 {
    font-size: 15px;
    flex: 1;
    min-width: 0;
  }
  .topbar .logout-btn {
    margin-left: auto;
  }
  .hamburger {
    width: 36px;
    height: 36px;
  }
  .sidebar-agenda-row {
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar-agenda-row .sidebar-agenda {
    min-height: 0;
    max-height: none;
  }
  .dashboard-control {
    padding: 12px;
  }
  .dash-total-val {
    font-size: 20px;
  }
  .schedule-control {
    margin-top: 12px;
  }
  .sched-title {
    font-size: 14px;
    padding: 10px 12px;
  }
  .dropdown-menu {
    left: 8px;
    right: 8px;
    min-width: 0;
  }
}