/* DocDraft — Clean Medical Software Design */
:root {
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --blue-400: #60A5FA;
  --blue-100: #DBEAFE;
  --blue-50: #EFF6FF;
  --slate-900: #0F172A;
  --slate-700: #334155;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --white: #FFFFFF;
  --green-500: #22C55E;
  --red-500: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--slate-900); background: var(--white); line-height: 1.6; }
.page { display: none; } .page.active { display: block; }
.hidden { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.btn-primary { background: var(--blue-600); color: white; }
.btn-primary:hover { background: #1D4ED8; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--blue-600); border: 1.5px solid var(--blue-600); }
.btn-outline:hover { background: var(--blue-50); }
.btn-ghost { background: transparent; color: var(--slate-700); }
.btn-ghost:hover { background: var(--slate-100); }
.btn-google { background: white; color: var(--slate-700); border: 1.5px solid var(--slate-300); width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-google:hover { background: var(--slate-50); border-color: var(--slate-400); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--slate-200); z-index: 100; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--slate-900); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--slate-700); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--blue-600); }

/* Hero */
.hero { max-width: 1200px; margin: 0 auto; padding: 120px 24px 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.badge { display: inline-block; background: var(--blue-50); color: var(--blue-600); padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: 52px; font-weight: 700; line-height: 1.1; color: var(--slate-900); margin-bottom: 20px; }
.gradient-text { background: linear-gradient(135deg, var(--blue-600), var(--blue-400)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 18px; color: var(--slate-500); line-height: 1.7; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 28px; font-weight: 700; color: var(--blue-600); }
.stat span { font-size: 13px; color: var(--slate-500); }

/* Doc preview animation */
.hero-visual { display: flex; justify-content: center; }
.doc-preview { width: 320px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--slate-200); overflow: hidden; }
.doc-header-preview { display: flex; gap: 6px; padding: 12px 16px; background: var(--slate-50); border-bottom: 1px solid var(--slate-200); }
.doc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-300); }
.doc-lines { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.doc-line { height: 10px; background: var(--slate-100); border-radius: 4px; animation: shimmer 2s infinite; }
.doc-line.w80 { width: 80%; } .doc-line.w60 { width: 60%; } .doc-line.w90 { width: 90%; }
.doc-line.w70 { width: 70%; } .doc-line.w50 { width: 50%; } .doc-line.w85 { width: 85%; } .doc-line.w40 { width: 40%; }
@keyframes shimmer { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.doc-generating { padding: 16px 20px; color: var(--blue-600); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.pulse-dot { width: 8px; height: 8px; background: var(--blue-600); border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

/* Sections */
.section { max-width: 1200px; margin: 0 auto; padding: 80px 24px; }
.section-alt { background: var(--slate-50); max-width: 100%; }
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: 36px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--slate-500); font-size: 18px; margin-bottom: 48px; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 28px; transition: all 0.2s; }
.feature-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon { font-size: 32px; display: block; margin-bottom: 12px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--slate-500); font-size: 14px; line-height: 1.6; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 0 24px; }
.step { text-align: center; }
.step-num { width: 48px; height: 48px; background: var(--blue-600); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; margin: 0 auto 16px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--slate-500); font-size: 14px; }

/* HIPAA */
.hipaa-card { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius); padding: 48px; text-align: center; }
.hipaa-card h2 { margin-bottom: 16px; }
.hipaa-card > p { color: var(--slate-700); font-size: 16px; max-width: 700px; margin: 0 auto 24px; }
.hipaa-features { display: flex; justify-content: center; gap: 32px; font-weight: 500; color: var(--blue-600); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 24px; }
.price-card { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 32px; text-align: center; position: relative; }
.price-card.featured { border-color: var(--blue-600); box-shadow: 0 0 0 1px var(--blue-600); }
.price-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--blue-600); color: white; padding: 4px 16px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.price-card h3 { font-size: 22px; margin-bottom: 8px; }
.price { font-size: 42px; font-weight: 700; margin-bottom: 24px; }
.price span { font-size: 14px; font-weight: 400; color: var(--slate-500); }
.price-card ul { list-style: none; margin-bottom: 24px; }
.price-card li { padding: 8px 0; color: var(--slate-700); font-size: 14px; border-bottom: 1px solid var(--slate-100); }
.price-card li:last-child { border-bottom: none; }

/* Footer */
.footer { border-top: 1px solid var(--slate-200); padding: 48px 24px; text-align: center; }
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer p { color: var(--slate-500); margin-top: 8px; font-size: 14px; }
.footer-small { font-size: 12px !important; color: var(--slate-400) !important; margin-top: 16px !important; }

/* Auth */
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--slate-50); }
.auth-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 420px; }
.auth-card h2 { text-align: center; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--slate-500); font-size: 14px; margin-bottom: 24px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--slate-400); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--slate-200); }
#auth-form input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--slate-300); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; margin-bottom: 12px; outline: none; transition: border-color 0.15s; }
#auth-form input:focus { border-color: var(--blue-600); }
.auth-toggle { text-align: center; margin-top: 16px; font-size: 14px; color: var(--slate-500); }
.auth-toggle a { color: var(--blue-600); font-weight: 500; }
.auth-back { text-align: center; margin-top: 12px; font-size: 13px; }
.auth-back a { color: var(--slate-500); }

/* Dashboard */
.dash-nav { background: white; border-bottom: 1px solid var(--slate-200); position: sticky; top: 0; z-index: 100; }
.dash-nav-right { display: flex; align-items: center; gap: 16px; }
.user-name { font-size: 14px; color: var(--slate-700); font-weight: 500; }
.dash-content { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.dash-header { margin-bottom: 32px; }
.dash-header h1 { font-size: 28px; margin-bottom: 8px; }
.dash-header p { color: var(--slate-500); }

/* Category filter */
.category-filter { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.cat-btn { padding: 8px 16px; border-radius: 100px; border: 1.5px solid var(--slate-200); background: white; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; color: var(--slate-700); }
.cat-btn:hover { border-color: var(--blue-400); }
.cat-btn.active { background: var(--blue-600); color: white; border-color: var(--blue-600); }

/* Template grid */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.template-card { background: white; border: 1.5px solid var(--slate-200); border-radius: var(--radius); padding: 24px; cursor: pointer; transition: all 0.2s; }
.template-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.template-card .t-icon { font-size: 28px; margin-bottom: 8px; }
.template-card h3 { font-size: 16px; margin-bottom: 4px; }
.template-card p { color: var(--slate-500); font-size: 13px; line-height: 1.5; }
.template-card .t-meta { margin-top: 12px; font-size: 12px; color: var(--slate-400); }

/* Generator */
.generator { margin-top: 24px; }
.gen-header { margin-bottom: 24px; }
.gen-header h2 { font-size: 24px; margin: 8px 0 4px; }
.gen-header p { color: var(--slate-500); }
.gen-section { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.gen-section h3 { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.badge-small { font-size: 11px; background: var(--blue-50); color: var(--blue-600); padding: 3px 10px; border-radius: 100px; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--slate-700); }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 12px; border: 1.5px solid var(--slate-300); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue-600); }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-group .help-text { font-size: 12px; color: var(--slate-400); }

/* Output */
.output { margin-top: 24px; }
.output-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.output-actions { display: flex; gap: 8px; }
.output-content {
  background: white; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 40px; min-height: 400px; white-space: pre-wrap; font-size: 14px; line-height: 1.8;
  box-shadow: var(--shadow);
}

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px; color: var(--blue-600); font-weight: 500; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--blue-100); border-top-color: var(--blue-600); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding-top: 100px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 36px; }
  .features-grid, .steps, .pricing-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
