:root {
  --primary: #006b68;
  --primary-dark: #004f4c;
  --bg: #f4f7f9;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --danger: #b91c1c;
  --success: #047857;
  --warning: #b45309;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  background: var(--primary);
  color: white;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar span { margin-left: 10px; opacity: .85; }
.topbar a {
  color: white;
  text-decoration: none;
  margin-left: 12px;
  font-weight: 600;
}
.container {
  max-width: 1180px;
  margin: 24px auto;
  padding: 0 18px;
}
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  margin-bottom: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat {
  font-size: 38px;
  font-weight: bold;
  color: var(--primary);
}
label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 700;
}
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
}
button, .btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
}
button:hover, .btn:hover { background: var(--primary-dark); }
.btn-secondary { background: #374151; }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); }
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
th, td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
th { background: #eef6f6; }
.notice {
  padding: 12px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #065f46;
  margin-bottom: 14px;
}
.error {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  margin-bottom: 14px;
}
.login-box {
  max-width: 420px;
  margin: 80px auto;
}
/*.screen-body {
  background: #06161f;
  color: white;
  overflow: hidden;
}
.screen-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  height: 100vh;
}
.video-area {
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-area iframe, .video-area video {
  width: 100%;
  height: 100%;
  border: 0;
}
.call-area {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #064e4b, #06202e);
}
.call-title {
  font-size: 34px;
  font-weight: bold;
  text-transform: uppercase;
}
.current-call {
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 24px;
  padding: 24px;
  margin: 18px 0;
}
.current-call .patient {
  font-size: 46px;
  font-weight: bold;
}
.current-call .office {
  font-size: 36px;
  color: #a7f3d0;
  margin-top: 10px;
}
.current-call .doctor {
  font-size: 28px;
  margin-top: 10px;
}
.last-calls {
  background: rgba(0,0,0,.25);
  border-radius: 18px;
  padding: 16px;
}
.last-calls h3 { margin-top: 0; }
.last-calls li {
  margin: 10px 0;
  font-size: 18px;
}*/
.screen-body {
  background: #06161f;
  color: white;
  overflow: hidden;
  margin: 0;
}

.screen-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.video-area {
  background: black;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: block;
}

.video-area iframe,
.video-area video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
 /* object-fit: cover;  */
 object-fit: contain;
  object-position: center center;
}

.call-area {
  height: 100vh;
  overflow: hidden;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #064e4b, #06202e);
}

.screen-logo {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 16px;
  padding: 8px 14px;
  margin-bottom: 16px;
}

.call-title {
  font-size: 32px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.current-call {
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 22px;
  padding: 22px;
  margin: 0;
}

.current-call .patient {
  font-size: 42px;
  font-weight: bold;
  line-height: 1.1;
}

.current-call .office {
  font-size: 34px;
  color: #a7f3d0;
  margin-top: 12px;
}

.current-call .doctor {
  font-size: 26px;
  margin-top: 10px;
}

.call-time {
  font-size: 19px;
  color: #d1fae5;
  margin-top: 8px;
}

.last-calls {
  background: rgba(0,0,0,.25);
  border-radius: 18px;
  padding: 14px 16px;
  max-height: 250px;
  overflow: hidden;
}

.last-calls h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.last-calls li {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.25;
}
.voice-button {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: #f59e0b;
}
@media(max-width: 900px) {
  .grid, .screen-layout { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}


/* === Personalización Clínica San Vicente v2 === */
.logo-header {
  height: 58px;
  max-width: 360px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  margin-right: 14px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-title strong {
  display: block;
  font-size: 18px;
}
.topbar-title span {
  margin-left: 0;
  font-size: 13px;
}
.logo-login {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 18px auto;
}
.screen-logo {
  max-width: 420px;
  background: white;
  border-radius: 18px;
  padding: 10px 16px;
  margin-bottom: 18px;
}
.call-time {
  font-size: 20px;
  color: #d1fae5;
  margin-top: 8px;
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: end;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6f6;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.report-summary .card {
  margin-bottom: 0;
}
@media(max-width: 900px) {
  .logo-header { max-width: 260px; height: auto; }
  .filter-row, .report-summary { grid-template-columns: 1fr; }
}
