:root {
  --bg-page: #f3f7fb;
  --bg-surface: #ffffff;
  --bg-soft: #eef5ff;
  --bg-muted: #f8fafc;
  --primary: #1d4ed8;
  --primary-strong: #173ea8;
  --primary-soft: rgba(29, 78, 216, 0.08);
  --accent: #14b8a6;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --text: #162033;
  --muted: #64748b;
  --line: #dfeaf5;
  --success: #0f9f6e;
  --warning: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

html, body {
  background: linear-gradient(180deg, #eef5ff 0%, var(--bg-page) 100%);
  color: var(--text);
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

#contenedor {
  width: min(1380px, calc(100% - 28px));
  margin: 24px auto 40px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

#mybody {
  padding: 22px 20px 26px;
  background: transparent;
}

#mainTabs {
  border: none;
  background: transparent;
}

#mainTabs .ui-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

#mainTabs .ui-tabs-nav li {
  margin: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  transition: all 0.2s ease;
}

#mainTabs .ui-tabs-nav li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 12px;
  text-decoration: none;
}

#mainTabs .ui-tabs-nav li.ui-tabs-active {
  background: linear-gradient(135deg, var(--primary-soft), rgba(20, 184, 166, 0.08));
  border-color: rgba(29, 78, 216, 0.18);
}

#mainTabs .ui-tabs-nav li.ui-tabs-active a {
  color: var(--primary-strong);
}

#mainTabs .ui-tabs-panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

#mainTabs .ui-tabs-panel table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

#mainTabs .ui-tabs-panel td {
  vertical-align: middle;
}

.divContent {
  background: transparent;
}

.editInsert,
.table-result-grid {
  width: min(980px, 100%);
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.03);
}

.editInsert th,
.table-result-grid th {
  background: linear-gradient(180deg, #f6faff 0%, #edf5ff 100%);
  color: var(--primary-strong);
  font-weight: 700;
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.editInsert td,
.table-result-grid td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text);
}

.table-result-grid tr:last-child td,
.editInsert tr:last-child td {
  border-bottom: none;
}

.table-result-grid tbody tr:nth-child(even) td {
  background: rgba(148, 163, 184, 0.03);
}

.table-result-grid tbody tr:hover td {
  background: rgba(29, 78, 216, 0.03);
}

.agenda-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.agenda-header-panel {
  width: min(100%, 980px);
  margin: 0 auto 18px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.06), rgba(20, 184, 166, 0.08));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.agenda-header-panel th {
  text-align: center;
  font-size: 1.15rem;
  color: var(--primary-strong);
  padding: 0;
  background: transparent !important;
  border: none !important;
}

.agenda-table {
  width: min(100%, 1200px);
  margin: 0 auto;
}

.agenda-table th {
  white-space: nowrap;
  font-size: 0.9rem;
}

.agenda-table td {
  font-size: 0.96rem;
}

.calendar-board {
  width: min(100%, 1180px);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.05);
  padding: 18px;
}

.calendar-day-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.07), rgba(20, 184, 166, 0.08));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  color: var(--primary-strong);
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.session-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 180px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.session-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.session-card.current-psi {
  background: linear-gradient(180deg, #fffce9 0%, #fffaf0 100%);
  border-color: rgba(245, 158, 11, 0.28);
}

.session-time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 88px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.86rem;
}

.session-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.session-patient {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.session-meta span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
}

.session-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.session-actions a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.session-actions a:hover {
  text-decoration: underline;
}

.empty-calendar {
  padding: 28px 18px;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.03);
  color: var(--muted);
  font-weight: 600;
}

.agenda-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
}

.home-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.home-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(20, 184, 166, 0.12), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.home-hero-copy {
  flex: 1 1 380px;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero h2 {
  margin: 12px 0 8px;
  color: var(--primary-strong);
  font-size: clamp(1.7rem, 2vw, 2.6rem);
  line-height: 1.2;
}

.home-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 12px;
  flex: 1 1 260px;
  min-width: 220px;
}

.home-stat-chip {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.home-stat-chip strong {
  display: block;
  font-size: 1.3rem;
  color: var(--primary-strong);
}

.home-stat-chip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.home-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.home-card-link {
  display: block;
  padding: 18px 18px 16px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  text-decoration: none;
}

.home-card-link .text1Bold {
  display: block;
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.home-card-link .text1Gray {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.04), rgba(20, 184, 166, 0.05));
  padding: 12px 14px;
  color: var(--muted);
  line-height: 1.5;
}

.home-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 22px 18px 10px;
}

.home-landing .links-legais {
  width: min(820px, 100%);
  justify-content: center;
  gap: 24px;
  margin: 0;
}

.home-landing .privacy-link img {
  filter: drop-shadow(0 10px 18px rgba(29, 78, 216, 0.18));
}

.botoes-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-width: 170px;
}

.botoes-login input[type="submit"],
.botoes-login .btn-inscricao,
.botoes-login button.btn-inscricao {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  min-height: 42px;
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: 0 10px 18px rgba(29, 78, 216, 0.16);
}

.botoes-login input[type="submit"] {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #ffffff;
}

.botoes-login .btn-inscricao,
.botoes-login button.btn-inscricao {
  background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
  color: #ffffff;
}

.botoes-login input[type="submit"]:hover,
.botoes-login .btn-inscricao:hover,
.botoes-login button.btn-inscricao:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(29, 78, 216, 0.2);
  filter: brightness(1.02);
}

.botoes-login input[type="submit"]:active,
.botoes-login .btn-inscricao:active,
.botoes-login button.btn-inscricao:active {
  transform: translateY(0);
  box-shadow: 0 8px 12px rgba(29, 78, 216, 0.14);
}

.editInsert input,
.editInsert textarea,
.editInsert select,
.table-result-grid input,
.table-result-grid textarea,
.table-result-grid select {
  width: 100%;
  min-width: 180px;
}

.editInsert td:first-child,
.table-result-grid th:first-child,
.table-result-grid td:first-child {
  font-weight: 600;
}

.text1Bold,
.text1Gray,
.redText,
.title2,
.text1 {
  color: var(--text);
}

.text1Bold {
  font-weight: 700;
  color: var(--primary-strong);
}

.text1Bold a {
  color: var(--primary-strong);
  text-decoration: none;
}

.text1Gray {
  color: var(--muted);
  background: var(--bg-muted) !important;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.redText {
  color: #b42318;
  font-weight: 600;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn,
.ui-button {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 16px;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover,
.ui-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(29, 78, 216, 0.22);
}

img {
  max-width: 100%;
}

form table td,
form table th {
  padding: 8px 10px;
}

#tabs-1 .text1Bold a,
#tabs-1 .text1Gray,
#tabs-1 .redText,
#tabs-1 .title2 {
  border-radius: 12px;
}

#tabs-1 .text1Bold {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  #contenedor {
    width: min(100% - 14px, 100%);
    margin: 12px auto 20px;
    border-radius: 18px;
  }

  #mybody {
    padding: 14px 12px 18px;
  }

  #mainTabs .ui-tabs-nav {
    padding: 10px;
  }

  #mainTabs .ui-tabs-nav li a {
    font-size: 0.82rem;
    padding: 8px 12px;
  }
}
