/* ==========================================================================
   NEPHROLOGIX DESIGN SYSTEM
   AI-Driven Dialysis Solutions
   Palette & Styles extracted from Nephrologix Brand Guidelines
   ========================================================================== */

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #0f172a;
  --bg-card: rgba(19, 27, 46, 0.85);
  --bg-card-hover: rgba(26, 36, 61, 0.95);
  --bg-input: rgba(15, 23, 42, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #0ea5e9;
  --border-glow: rgba(14, 165, 233, 0.35);
  
  /* Brand Accents */
  --brand-blue: #0284c7;
  --brand-cyan: #0ea5e9;
  --brand-sky: #38bdf8;
  --brand-teal: #00c9a7;
  --brand-green: #10b981;
  
  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark: #0f172a;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Transitions & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(0, 201, 167, 0.10) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Container */
.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 760px;
}

/* Header & Navigation */
header.site-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 29, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: var(--transition);
}

.brand-badge-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: block;
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  line-height: 1.15;
}

.brand-name span {
  color: var(--brand-teal);
}

.brand-tagline {
  font-size: 0.82rem;
  color: var(--brand-sky);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.header-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-teal);
  background: rgba(0, 201, 167, 0.12);
  border: 1px solid rgba(0, 201, 167, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.header-status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-teal);
  box-shadow: 0 0 8px var(--brand-teal);
}

/* Main Content Area */
main {
  flex: 1;
  padding: 56px 0 80px 0;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan), var(--brand-teal));
}

/* Typography Elements */
h1 {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 14px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 36px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand-sky);
  margin-top: 24px;
  margin-bottom: 10px;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

.lead-text {
  font-size: 1.12rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 28px;
}

/* Accent Line */
.accent-line {
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
  border-radius: var(--radius-full);
  margin: 16px 0 24px 0;
}

/* Form Styles */
.form-group {
  margin-bottom: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

label.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}

label.form-label .required-star {
  color: var(--brand-cyan);
  margin-left: 2px;
}

.input-field, .select-field {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.input-field:focus, .select-field:focus {
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
  background: rgba(15, 23, 42, 1);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

/* Multi-select notification pills */
.notification-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.checkbox-tile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-tile:hover {
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(15, 23, 42, 0.9);
}

.checkbox-tile input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--brand-teal);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.checkbox-tile-content {
  font-size: 0.88rem;
  color: #e2e8f0;
}

.checkbox-tile-content small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Strict Twilio Consent Box */
.consent-box {
  background: rgba(14, 165, 233, 0.05);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 28px 0;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.consent-label input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--brand-teal);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.consent-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.consent-text a {
  color: var(--brand-sky);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: var(--transition);
}

.consent-text a:hover {
  color: #ffffff;
}

/* Compliance Summary Callout */
.compliance-callout {
  background: rgba(15, 23, 42, 0.65);
  border-left: 3px solid var(--brand-teal);
  padding: 16px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 14px;
}

.compliance-callout p {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
}

.compliance-callout strong {
  color: #f1f5f9;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 28px;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.45);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success Confirmation Card */
.success-message {
  display: none;
  text-align: center;
  padding: 30px 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--brand-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-teal);
  font-size: 32px;
}

/* Feature Grid for Templates */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.feature-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
}

.feature-box-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.15);
  color: var(--brand-sky);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.feature-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 0.88rem;
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Policy Content Sections */
.policy-content section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.policy-content section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.policy-content ul {
  list-style: none;
  margin: 14px 0;
}

.policy-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.policy-content ul li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--brand-teal);
  font-size: 1.2rem;
  line-height: 1;
}

.highlight-banner {
  background: rgba(0, 201, 167, 0.08);
  border: 1px solid rgba(0, 201, 167, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
}

.highlight-banner h4 {
  color: var(--brand-teal);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.highlight-banner p {
  color: #e2e8f0;
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Placeholder Page (Home) Specific Styling */
.placeholder-container {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.placeholder-card {
  max-width: 640px;
  padding: 56px 40px;
  margin: 0 auto;
}

.placeholder-logo-badge {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: #ffffff;
  padding: 10px;
  margin: 0 auto 28px auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(14, 165, 233, 0.25);
  display: block;
}

.placeholder-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--brand-sky);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.placeholder-contact {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.placeholder-contact a {
  color: var(--brand-sky);
  text-decoration: none;
  font-weight: 500;
}

.placeholder-contact a:hover {
  text-decoration: underline;
}

/* Footer */
footer.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 15, 29, 0.9);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--brand-sky);
}
