/* ===== JeevaDoc — Complete Styles ===== */
:root {
  --navy: #173b6c;
  --navy-dark: #0f2a4d;
  --green: #2e8b57;
  --green-dark: #226844;
  --green-light: #eaf5ee;
  --bg: #f4f7fb;
  --border: #d9e2ec;
  --text: #1f2d3d;
  --shadow: 0 8px 28px rgba(0,0,0,.09);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Segoe UI", Roboto, "Noto Sans", system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(90deg, var(--navy), #1d4a85);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 28px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 14px rgba(0,0,0,.22);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.logo-circle {
  width: 46px; height: 46px; background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.logo-circle img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: #9fdcb6; letter-spacing: 1.2px; text-transform: uppercase; }
.header-nav { display: flex; gap: 10px; align-items: center; }
.nav-btn {
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 9px 18px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3);
  transition: all .2s; white-space: nowrap;
}
.nav-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.nav-btn.active { background: var(--green); border-color: var(--green); }
.nav-btn.active:hover { background: var(--green-dark); }

/* ===== LANDING HERO ===== */
.landing-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e4d8c 55%, var(--navy-dark) 100%);
  color: #fff; text-align: center; padding: 70px 20px 90px; position: relative; overflow: hidden;
}
/* subtle decorative glow */
.landing-hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(127,224,163,.18), transparent 70%);
}
.landing-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 44px;
  background: var(--bg); clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28); color: #9dffc5;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  padding: 7px 18px; border-radius: 20px; margin-bottom: 22px;
}
.landing-hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 16px; line-height: 1.15; }
.landing-hero h1 span { color: #7fe0a3; }
.landing-hero p { font-size: 17px; opacity: .9; max-width: 580px; margin: 0 auto 32px; }
.hero-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.hero-tags { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.htag {
  font-size: 13px; font-weight: 600; color: #cfe3f7;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  padding: 8px 16px; border-radius: 20px;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px; font-size: 15px;
  font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.cta-doctor { background: #fff; color: var(--navy); }
.cta-patient { background: var(--green); color: #fff; }

/* ===== PORTAL CARDS (Landing) ===== */
.portal-section { padding: 50px 20px 40px; max-width: 960px; margin: 0 auto; }
.portal-section h2 { text-align: center; color: var(--navy); font-size: 24px; margin-bottom: 8px; }
.portal-section .section-sub { text-align: center; color: #6b7a90; font-size: 15px; margin-bottom: 32px; }
.portal-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.portal-card {
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.portal-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.13); }
.portal-card-header {
  padding: 28px 24px 20px; color: #fff; display: flex; align-items: center; gap: 14px;
}
.portal-card.doctor .portal-card-header { background: linear-gradient(135deg, var(--navy), #1e5090); }
.portal-card.patient .portal-card-header { background: linear-gradient(135deg, var(--green), #1a6b3a); }
.card-icon { font-size: 36px; }
.portal-card-header h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.portal-card-header p { font-size: 13px; opacity: .85; }
.portal-card-body { background: #fff; padding: 20px 24px; flex: 1; }
.portal-card-body ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.portal-card-body ul li { font-size: 14px; color: #3d4f66; display: flex; align-items: flex-start; gap: 8px; }
.portal-card-body ul li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.portal-card-footer {
  background: #f8fafc; padding: 14px 24px; display: flex; align-items: center;
  justify-content: space-between; border-top: 1px solid var(--border);
}
.portal-card-footer span { font-size: 14px; font-weight: 600; }
.portal-card.doctor .portal-card-footer span { color: var(--navy); }
.portal-card.patient .portal-card-footer span { color: var(--green-dark); }
.portal-card-footer .arrow { font-size: 18px; }

/* ===== ABOUT / BENEFITS (Landing) ===== */
.about-section {
  background: #fff; padding: 50px 20px; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-inner { max-width: 960px; margin: 0 auto; }
.about-inner h2 { color: var(--navy); font-size: 22px; margin-bottom: 6px; }
.about-inner .section-sub { color: #6b7a90; font-size: 14px; margin-bottom: 28px; }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.benefit-box {
  background: var(--bg); border-radius: 12px; padding: 20px;
  text-align: center; border: 1px solid var(--border);
}
.benefit-box .bi { font-size: 30px; margin-bottom: 10px; }
.benefit-box h4 { font-size: 14px; color: var(--navy); margin-bottom: 5px; }
.benefit-box p { font-size: 13px; color: #6b7a90; }

/* ===== HOW IT WORKS (Landing) ===== */
.how-section { padding: 50px 20px; max-width: 960px; margin: 0 auto; }
.how-section h2 { color: var(--navy); font-size: 22px; text-align: center; margin-bottom: 6px; }
.how-section .section-sub { text-align: center; color: #6b7a90; font-size: 14px; margin-bottom: 32px; }
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-box { text-align: center; padding: 20px; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; margin: 0 auto 12px;
}
.step-box.doc .step-num { background: rgba(23,59,108,.12); color: var(--navy); }
.step-box.pat .step-num { background: rgba(46,139,87,.12); color: var(--green-dark); }
.step-box h4 { font-size: 15px; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.step-box p { font-size: 13px; color: #6b7a90; }

/* ===== BADGES ROW (Landing) ===== */
.trust-bar {
  background: var(--navy); color: #fff;
  display: flex; justify-content: center; gap: 0; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 32px; font-size: 14px; font-weight: 600;
  border-right: 1px solid rgba(255,255,255,.15);
}
.trust-item:last-child { border-right: none; }
.trust-item span { font-size: 20px; }

/* ===== FORM PAGES ===== */
.form-page { padding: 0 16px 40px; }
.form-hero {
  padding: 36px 20px 56px; text-align: center; color: #fff;
}
.form-hero.doctor-hero { background: linear-gradient(135deg, var(--navy), #1e5090); }
.form-hero.patient-hero { background: linear-gradient(135deg, var(--green), #1a6b3a); }
.form-hero h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.form-hero p { font-size: 15px; opacity: .88; }
.form-wrap { margin-top: -32px; }
.card {
  background: #fff; max-width: 580px; margin: 0 auto;
  border-radius: 14px; padding: 28px 30px;
  box-shadow: var(--shadow);
}
.card h2 { color: var(--navy); margin-bottom: 4px; font-size: 20px; }
.card-sub { color: #6b7a90; font-size: 14px; margin-bottom: 20px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
.req { color: #e23b3b; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14.5px; font-family: inherit; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46,139,87,.13);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.file-hint { font-size: 12px; color: #8a95a3; margin-top: 5px; }
.preview {
  display: none; margin-top: 10px;
  width: 80px; height: 80px; object-fit: cover;
  border-radius: 8px; border: 2px solid var(--green);
}
.doc-preview-link { display: none; margin-top: 6px; font-size: 13px; color: var(--green); text-decoration: underline; }
.doctor-info-box {
  background: var(--green-light); border: 1px solid #b8dfc6;
  border-radius: 10px; padding: 14px 16px; margin-bottom: 20px;
}
.doctor-info-box p { font-size: 13.5px; color: #1a5c35; }
.btn-primary {
  width: 100%; padding: 13px; border: none;
  background: var(--green); color: #fff;
  border-radius: 8px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .2s; margin-top: 4px;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-patient { background: var(--green); }
.msg { margin-top: 12px; font-size: 14px; text-align: center; min-height: 20px; }
.msg.success { color: var(--green-dark); font-weight: 600; }
.msg.error { color: #d62828; font-weight: 600; }
.optional-tag { font-size: 11px; font-weight: 400; color: #8a95a3; margin-left: 4px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy-dark); color: rgba(255,255,255,.65);
  text-align: center; padding: 22px 20px; font-size: 13px; margin-top: 50px;
}
.site-footer a { color: rgba(255,255,255,.8); text-decoration: none; }

/* ===== ADMIN LOGIN ===== */
.login-wrap { padding: 60px 16px; }
.login-card { max-width: 380px; }
.login-card input {
  width: 100%; padding: 11px 12px; margin-bottom: 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit;
}

/* ===== ADMIN TABS ===== */
.admin-tabs {
  background: #fff; border-bottom: 2px solid var(--border);
  display: flex; padding: 0 20px; gap: 4px;
}
.tab-btn {
  padding: 14px 24px; border: none; background: none;
  font-size: 15px; font-weight: 600; color: #6b7a90;
  cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: color .15s;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ===== DASHBOARD ===== */
.dashboard { padding: 24px 20px; max-width: 1280px; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.dash-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 14px; margin-bottom: 16px;
}
.dash-head h2 { color: var(--navy); font-size: 20px; }
.count { color: #6b7a90; font-size: 13px; margin-top: 3px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions input {
  padding: 9px 13px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; min-width: 220px;
}
.btn-excel, .btn-pdf {
  border: none; color: #fff; padding: 10px 16px;
  border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-excel { background: #1d6f42; }
.btn-pdf { background: #c0392b; }
.btn-excel:hover { background: #155030; }
.btn-pdf:hover { background: #9c2c20; }

/* ===== PATIENT FILTERS ===== */
.patient-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn {
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid var(--border); background: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer; color: #6b7a90;
  transition: all .15s;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-btn.f-active.active { background: var(--green); border-color: var(--green); }
.filter-btn.f-completed.active { background: #2471a3; border-color: #2471a3; }
.filter-btn.f-closed.active { background: #6b7a90; border-color: #6b7a90; }

/* ===== TABLE ===== */
.table-wrap {
  background: #fff; border-radius: 12px; overflow-x: auto;
  box-shadow: 0 4px 18px rgba(0,0,0,.07);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f7faff; }
.thumb {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
  cursor: pointer; transition: transform .15s;
}
.thumb:hover { transform: scale(1.1); }
.no-photo { font-size: 11px; color: #bbb; }
.view-link { font-size: 12px; color: var(--green); text-decoration: underline; cursor: pointer; white-space: nowrap; }
.empty { display: none; text-align: center; padding: 40px; color: #6b7a90; }

/* ===== STATUS BADGES ===== */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge-active { background: #e4f8ed; color: #1a7a40; }
.badge-completed { background: #ddeeff; color: #1a5fa0; }
.badge-closed { background: #f0f0f0; color: #6b7a90; }

/* ===== STATUS ACTION BUTTONS ===== */
.status-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.sa-btn {
  padding: 4px 8px; border: none; border-radius: 5px;
  font-size: 11px; font-weight: 600; cursor: pointer; opacity: .6; transition: opacity .15s;
}
.sa-btn:hover, .sa-btn.cur { opacity: 1; }
.sa-active { background: #e4f8ed; color: #1a7a40; }
.sa-completed { background: #ddeeff; color: #1a5fa0; }
.sa-closed { background: #f0f0f0; color: #555; }

/* ===== IMAGE MODAL ===== */
.img-modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.85); align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; padding: 30px;
}
.img-modal.show { display: flex; }
.img-modal-content {
  max-width: 92%; max-height: 80vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
  background: #fff;
}
.img-modal-close {
  position: absolute; top: 18px; right: 28px;
  color: #fff; font-size: 42px; font-weight: 300; cursor: pointer; line-height: 1;
}
.img-modal-close:hover { color: #ff6b6b; }
.img-modal-dl {
  background: var(--green); color: #fff; text-decoration: none;
  padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.img-modal-dl:hover { background: var(--green-dark); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .landing-hero h1 { font-size: 30px; }
  .hero-stats { gap: 16px; padding: 12px 18px; }
  .hstat b { font-size: 18px; }
  .portal-cards { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr 1fr; }
  .steps-row { grid-template-columns: 1fr; }
  .trust-bar { flex-direction: column; align-items: center; }
  .trust-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); width: 100%; justify-content: center; }
  .field-row { grid-template-columns: 1fr; }
  .tab-btn { padding: 12px 14px; font-size: 13.5px; }
}
@media (max-width: 600px) {
  .site-header { padding: 10px 14px; }
  .nav-btn { padding: 7px 12px; font-size: 12.5px; }
  .brand-name { font-size: 18px; }
}
@media (max-width: 480px) {
  .landing-hero h1 { font-size: 22px; }
  .header-nav .nav-btn:first-child { display: none; }
  .htag { font-size: 12px; padding: 6px 12px; }
  .benefits-grid { grid-template-columns: 1fr; }
  .hero-cta-row { flex-direction: column; align-items: center; }
  .actions input { min-width: 100%; width: 100%; }
}
