@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #1a3a3a;
  --primary-light: #2c5353;
  --accent: #c5a059;
  --accent-light: #d4b77a;
  --bg-gradient: linear-gradient(135deg, #1a3a3a 0%, #2c5353 50%, #1a3a3a 100%);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --card-bg: rgba(255, 255, 255, 0.88);
  --text-dark: #0f2020;
  --text-medium: #3d5555;
  --text-light: #6a8080;
  --sand: #f5efe6;
  --dove: #e6ecec;
  --gold-gradient: linear-gradient(135deg, #c5a059 0%, #d4b77a 50%, #c5a059 100%);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

nav {
  background: linear-gradient(180deg, rgba(26, 58, 58, 0.95) 0%, rgba(26, 58, 58, 0.85) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--accent);
  margin-bottom: 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav strong {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--accent);
  font-size: 1.4rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.glass-container {
  background: var(--glass-bg);
  padding: 3rem;
  border-radius: 1.5rem;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(197, 160, 89, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  margin-bottom: 4rem;
  backdrop-filter: blur(10px);
}

.luxury-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  letter-spacing: 1px;
}

.subtitle {
  font-style: italic;
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 400;
}

fieldset {
  border: 1px solid rgba(197, 160, 89, 0.3);
  padding: 1.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--sand) 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

fieldset:hover {
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.1);
}

fieldset legend {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  padding: 0.4rem 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 4px;
}

fieldset hr {
  margin: 1.25rem 0;
  border: 0;
  border-top: 1px solid rgba(197, 160, 89, 0.2);
}

fieldset p {
  margin-bottom: 0.75rem;
  color: var(--text-medium);
  font-weight: 500;
}

fieldset label {
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

fieldset label:hover {
  color: var(--primary);
}

fieldset input[type="radio"],
fieldset input[type="checkbox"] {
  accent-color: var(--accent);
  transform: scale(1.1);
}

select, input[type="text"], input[type="number"] {
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: white;
  transition: all 0.3s ease;
}

select:focus, input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
  outline: none;
}

button {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--gold-gradient);
  border: none;
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
  background: linear-gradient(135deg, #d4b77a 0%, #c5a059 100%);
}

button:active {
  transform: translateY(0);
}

#export-pdf, #nad-export-pdf {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  box-shadow: none;
}

#export-pdf:hover, #nad-export-pdf:hover {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

article#results, article#nad-results {
  margin-top: 2rem;
  border-left: 5px solid var(--accent);
  background: linear-gradient(135deg, #fff9f0 0%, #ffffff 100%);
  border-radius: 0 1rem 1rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#recommendation {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0;
}

.recommendation-card {
  margin-top: 2rem;
  border: 2px solid var(--accent);
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(197, 160, 89, 0.1);
  transition: all 0.3s ease;
}

.recommendation-card:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(197, 160, 89, 0.2);
}

.card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 1rem 1.5rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--sand) 100%);
}

.plan-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
}

.plan-text strong {
  color: var(--accent);
  font-weight: 700;
}

.plan-type-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-medium);
  font-size: 1.1rem;
}

.plan-badge-inline {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(26, 58, 58, 0.3);
}

footer small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.clinic-signature {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
  text-align: center;
  margin: 1rem 0;
  letter-spacing: 1px;
}

.pdf-signature {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary);
}

.tab-container {
  display: flex;
  gap: 0;
  margin-bottom: 2.5rem;
  padding: 6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 16px;
  box-shadow: 
    0 4px 20px rgba(26, 58, 58, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.95);
}

.tab-btn:hover::before {
  opacity: 1;
}

.tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
}

.tab-btn.active::before {
  display: none;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-content.active {
  display: block;
}

.warning-text {
  color: #b33030;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(192, 64, 64, 0.08);
  border-radius: 0.5rem;
  border-left: 3px solid #c04040;
}

.denial-card {
  margin-top: 2rem;
  border: 2px solid #c04040;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
  box-shadow: 0 10px 30px rgba(192, 64, 64, 0.15);
}

.denial-header {
  background: linear-gradient(135deg, #c04040 0%, #d45050 100%);
  color: white;
  font-family: 'Playfair Display', Georgia, serif;
}

.denial-text {
  color: #a03030;
  font-size: 1.15rem;
  font-weight: 600;
}

.treatment-option {
  background: linear-gradient(180deg, #ffffff 0%, var(--sand) 100%) !important;
  border: 1px solid rgba(197, 160, 89, 0.3) !important;
  transition: all 0.3s ease;
}

.treatment-option:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.15);
}

.treatment-option h4 {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: var(--primary) !important;
  font-size: 1.1rem !important;
}

.treatment-option p {
  color: var(--text-dark) !important;
}

.treatment-option p[id$="-dose"] {
  color: var(--text-light) !important;
}

h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary);
}

strong {
  color: var(--text-dark);
}

.score-display {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 2px 4px rgba(197, 160, 89, 0.2);
}

@media print {
  :root {
    --primary: #000000;
    --accent: #000000;
    --text-dark: #000000;
    --text-medium: #333333;
    --text-light: #666666;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .glass-container {
    box-shadow: none !important;
    background: white !important;
  }
  
  .luxury-title, .card-header, .plan-badge-inline,
  fieldset legend, button, h3, h4, h5, strong,
  .plan-text, .plan-text strong, #recommendation {
    color: black !important;
    background: white !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  .recommendation-card, fieldset, .treatment-option {
    border-color: #333 !important;
    background: white !important;
    box-shadow: none !important;
  }
  
  .card-header {
    background: #f0f0f0 !important;
    border-bottom: 1px solid #333 !important;
  }
  
  .plan-badge-inline {
    background: #f0f0f0 !important;
    border: 1px solid #333 !important;
  }
}

.pdf-export,
.pdf-export * {
  color: black !important;
  background: white !important;
  border-color: #333 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.pdf-export .card-header,
.pdf-export .plan-badge-inline,
.pdf-export fieldset legend {
  background: #f0f0f0 !important;
  color: black !important;
}

/* LOGIN PAGE STYLES */
.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f2424 0%, #1a3a3a 30%, #2c5353 70%, #1a3a3a 100%);
  background-attachment: fixed;
  padding: 2rem;
}

.login-container {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,248,245,0.98) 100%);
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(197, 160, 89, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.login-logo {
  margin-bottom: 1rem;
  padding: 0;
}

.login-logo img {
  max-width: 220px;
  height: auto;
  mix-blend-mode: multiply;
  filter: contrast(1.05);
}

.login-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  letter-spacing: 0.5px;
}

.login-subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
  font-weight: 400;
}

#login-form label {
  text-align: left;
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

#login-form input {
  margin-bottom: 1.25rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  transition: all 0.25s ease;
  background: #fff;
}

#login-form input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(26, 58, 58, 0.1);
}

#login-form input::placeholder {
  color: #aaa;
}

.login-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(26, 58, 58, 0.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(26, 58, 58, 0.45);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.login-btn:active {
  transform: translateY(-1px);
}

.login-error {
  background: linear-gradient(135deg, #fff0f0 0%, #ffe8e8 100%);
  color: #c00;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border: 1px solid #fcc;
  font-weight: 500;
}

.login-footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.user-display {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.9rem;
  background: rgba(197, 160, 89, 0.12);
  border-radius: 20px;
  border: 1px solid rgba(197, 160, 89, 0.25);
}

#logout-btn {
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  transition: all 0.2s ease;
}

#logout-btn:hover {
  background: var(--accent);
  color: var(--primary);
}
