/* 
  VerOS Therapy - Clinical Management System
  Color Palette: Soft Aqua Greens, Calm Teals, Pure Whites
*/

:root {
  /* Therapy Aqua Green Palette */
  --primary: #264653; /* Deep professional teal */
  --accent: #2A9D8F;  /* Principal Aqua Green */
  --primary-hover: #1D353F;
  --secondary: #4DB6AC;
  --background: #F1F8F7;
  --surface: #FFFFFF;
  --text-main: #1A1C1E;
  --text-muted: #64748B;
  --error: #E11D48;
  --success: #10B981;
  --warning: #F59E0B;
  --border: #E2E8F0;

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 80px;

  /* Glassmorphism & Effects */
  --glass: rgba(255, 255, 255, 0.8);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

/* App Shell */
.app-container,
#app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-menu {
  list-style: none;
  flex: 1;
}

.nav-item {
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item:hover {
  background: var(--background);
  color: var(--primary);
}

.nav-item.active {
  background: rgba(42, 157, 143, 0.1);
  color: var(--accent);
  font-weight: 600;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.header {
  height: var(--header-height);
  background: var(--glass);
  backdrop-filter: blur(20px);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.content-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Typography */
h1 { font-size: 1.8rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 16px; }

/* Components */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 12px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.tab {
  padding: 12px 0;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.tab:hover {
  color: var(--primary);
}

.active-tab {
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* Status Badges */
.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-borrador { background: #E2E8F0; color: #475569; }
.badge-enviado { background: #DBEAFE; color: #1D4ED8; }
.badge-aceptado { background: #DCFCE7; color: #15803D; }
.badge-rechazado { background: #FEE2E2; color: #B91C1C; }
.badge-pendiente { background: #FEF3C7; color: #92400E; }
.badge-pagado { background: #D1FAE5; color: #065F46; }

/* Evolution Detail Accordion */
.evolution-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: #f8fafc;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid transparent;
}

.evolution-detail.expanded {
    max-height: 500px;
    padding: 16px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 24px;
  margin-bottom: 24px;
  border-left: 2px solid var(--border);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
}
/* --- Login View --- */
.login-container {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.login-box {
    max-width: 400px;
    width: 90%;
    padding: 48px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 32px;
}

.login-footer {
    margin-top: 32px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
