:root {
  --bg: #f7fbff;
  --panel: #ffffff;
  --panel-soft: #fff8d9;
  --text: #1d2530;
  --muted: #697586;
  --line: #d9e1ea;
  --blue: #075fa8;
  --blue-dark: #034276;
  --green: #12a150;
  --red: #d72136;
  --amber: #f6c400;
  --violet: #5b4bb7;
  --ink-blue: #083b74;
  --cream: #fff8d9;
  --shadow: 0 12px 30px rgba(29, 37, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #e8f5ff 0, #f7fbff 42%, #fffaf0 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

button:active,
.button:active {
  transform: translateY(1px);
}

.primary {
  background: linear-gradient(135deg, var(--blue), #0986c7);
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 95, 168, 0.18);
}

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

.secondary {
  background: #e5f3ff;
  color: var(--blue-dark);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.sidebar .ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
}

.danger {
  background: #fae8ea;
  color: var(--red);
}

.full-width {
  width: 100%;
}

.small {
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.number {
  text-align: right;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(7, 95, 168, 0.2), rgba(215, 33, 54, 0.08)),
    var(--bg);
}

.login-shell {
  width: min(1120px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: stretch;
}

.login-brand,
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
  position: relative;
}

.login-brand h1,
.login-card h2 {
  margin: 16px 0 8px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue);
  color: var(--red);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 10px 24px rgba(3, 66, 118, 0.2);
}

.small-logo {
  width: 62px;
  height: 62px;
}

.branded-login .login-brand {
  color: #fff;
  background:
    linear-gradient(140deg, rgba(3, 66, 118, 0.96), rgba(7, 95, 168, 0.94) 52%, rgba(215, 33, 54, 0.92));
  border: 0;
}

.login-brand-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.login-brand-top h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.02;
  color: #fff;
}

.english-name {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 750;
}

.doctor-login-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background: rgba(255, 248, 217, 0.96);
  color: var(--text);
  border: 2px solid rgba(246, 196, 0, 0.75);
  border-radius: 8px;
  padding: 16px;
}

.doctor-login-card h2,
.doctor-login-card h3 {
  margin: 2px 0;
  color: var(--red);
}

.doctor-login-card ul,
.qualification-columns ul,
.service-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.doctor-login-card li,
.qualification-columns li,
.service-card li {
  margin: 4px 0;
  font-weight: 720;
}

.doctor-avatar {
  width: 74px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 3px solid #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  background: #16b7e9;
}

.doctor-avatar.large {
  width: 146px;
  height: 188px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 12px;
}

.service-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.service-strip strong,
.service-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 760;
}

.service-strip strong {
  background: var(--green);
  color: #fff;
}

.address-pill {
  align-self: flex-start;
  margin: 0;
  background: var(--red);
  color: #fff;
  font-weight: 850;
  padding: 8px 16px;
  border-radius: 999px;
}

.phone-banner {
  margin: 0;
  color: #fff25a;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
  font-weight: 900;
}

.login-card {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  min-height: 38px;
  padding: 9px 10px;
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 168, 0.12);
}

.form-error {
  color: var(--red);
  margin: 0;
  min-height: 20px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, var(--blue-dark), var(--blue) 64%, #123072);
  border-right: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  color: #fff;
}

.brand-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 20px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-block h1 {
  font-size: 22px;
  margin: 0;
  line-height: 1.05;
}

.brand-block p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.doctor-mini {
  margin: 14px;
  padding: 12px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.doctor-mini strong,
.doctor-mini span {
  display: block;
}

.doctor-mini span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.nav-list {
  padding: 14px;
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 720;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-item.active {
  background: #fff;
  color: var(--blue-dark);
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-foot p {
  color: #fff25a;
  font-size: 13px;
  font-weight: 850;
}

.workspace {
  min-width: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.topbar h2 {
  margin: 0 0 4px;
  font-size: 24px;
  color: var(--ink-blue);
}

.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.content {
  padding: 24px;
}

.clinic-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.15fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-main,
.hero-services,
.poster-frame {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-main {
  padding: 20px;
  color: #fff;
  display: grid;
  gap: 16px;
  background:
    linear-gradient(145deg, var(--ink-blue), #0878b9 54%, #1a3b91);
  overflow: hidden;
}

.hero-title-row,
.doctor-spotlight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.hero-logo {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #fff;
  object-fit: cover;
}

.hero-title-row h2 {
  margin: 2px 0;
  font-size: clamp(31px, 4vw, 52px);
  line-height: 1.02;
}

.hero-doctor {
  width: 126px;
  height: 164px;
}

.doctor-spotlight {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  border: 2px solid rgba(246, 196, 0, 0.9);
}

.doctor-spotlight h3 {
  margin: 0;
  color: var(--red);
  font-size: 30px;
}

.doctor-spotlight h4 {
  margin: 2px 0 4px;
  color: var(--blue);
  font-size: 24px;
}

.qualification-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  font-size: 13px;
}

.hero-main .qualification-columns {
  grid-template-columns: 1fr;
}

.hero-address {
  justify-self: start;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 850;
}

.hero-phone {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-phone a {
  color: #fff25a;
  text-decoration: none;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 950;
  line-height: 1;
}

.hero-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}

.service-card {
  background: var(--cream);
  border: 2px solid #101828;
  border-radius: 8px;
  padding: 14px 16px;
}

.service-card span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 4px 14px;
  margin: -4px 0 8px;
  background: var(--green);
  color: #fff25a;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 900;
}

.service-card li {
  color: var(--red);
  font-size: 16px;
}

.service-card.hindi li {
  font-size: 15px;
}

.poster-frame {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
  display: grid;
  place-items: center;
  align-self: start;
}

.poster-frame img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border-radius: 6px;
}

.pro-hero {
  grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.35fr) minmax(220px, 0.55fr);
}

.pro-card {
  position: relative;
  isolation: isolate;
}

.pro-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  z-index: -1;
}

.pro-doctor-card {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.pro-doctor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.service-board {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.service-board-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.service-board-header h3 {
  margin: 2px 0 0;
  color: var(--ink-blue);
  font-size: 22px;
}

.service-board-header img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.service-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-chip-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff8d9;
  color: var(--red);
  border: 1px solid rgba(215, 33, 54, 0.18);
  font-weight: 800;
  font-size: 13px;
}

.service-chip-grid.hindi span {
  background: #eaf6ff;
  color: var(--blue-dark);
  border-color: rgba(7, 95, 168, 0.18);
}

.poster-card {
  align-self: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  color: var(--blue-dark);
  box-shadow: var(--shadow);
}

.poster-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(29, 37, 48, 0.12);
}

.poster-card img {
  width: 100%;
  border-radius: 6px;
}

.poster-card span {
  font-size: 13px;
  font-weight: 850;
}

.command-bar,
.workflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.command-bar h3,
.workflow-header h3 {
  margin: 2px 0 0;
  color: var(--ink-blue);
}

.command-search {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 10px;
  align-items: center;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quick-action {
  min-height: 112px;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  box-shadow: 0 10px 26px rgba(29, 37, 48, 0.06);
}

.quick-action:hover {
  transform: translateY(-3px);
  border-color: rgba(7, 95, 168, 0.35);
  box-shadow: 0 18px 38px rgba(29, 37, 48, 0.12);
}

.quick-action strong {
  font-size: 14px;
  color: var(--ink-blue);
}

.quick-action small {
  color: var(--muted);
  line-height: 1.3;
  text-align: left;
}

.action-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5f3ff;
  color: var(--blue-dark);
  font-weight: 950;
}

.action-icon.plus::before {
  content: "+";
}

.action-icon.calendar::before {
  content: "Cal";
  font-size: 11px;
}

.action-icon.rx::before {
  content: "Rx";
}

.action-icon.lab::before {
  content: "Lab";
  font-size: 11px;
}

.action-icon.ot::before {
  content: "OT";
}

.action-icon.bill::before {
  content: "Rs";
  font-size: 12px;
}

.action-icon.bell::before {
  content: "!";
}

.quick-action:nth-child(2) .action-icon,
.quick-action:nth-child(5) .action-icon {
  background: #fff1d8;
  color: #8a5200;
}

.quick-action:nth-child(3) .action-icon,
.quick-action:nth-child(7) .action-icon {
  background: #dff4e8;
  color: var(--green);
}

.quick-action:nth-child(4) .action-icon,
.quick-action:nth-child(6) .action-icon {
  background: #fde8eb;
  color: var(--red);
}

.toolbar.compact {
  margin: 0;
}

.picker-shell {
  display: grid;
  gap: 14px;
}

.picker-search {
  grid-template-columns: 1fr auto;
}

.picker-results {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.picker-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  text-align: left;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.picker-row:hover {
  border-color: var(--blue);
  background: #f3faff;
}

.picker-row strong,
.picker-row small {
  display: block;
}

.picker-row small {
  margin-top: 3px;
  color: var(--muted);
}

.poster-preview-modal img {
  width: 100%;
  border-radius: 8px;
}

.notice {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #9ed6b9;
  background: #e9f8ef;
  color: #0c5d3d;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(29, 37, 48, 0.05);
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header h3,
.panel h3 {
  margin: 0;
  font-size: 18px;
}

.panel-header p,
.panel > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stat-card {
  padding: 16px;
  min-height: 104px;
  display: grid;
  align-content: space-between;
  border-top: 5px solid var(--blue);
  background:
    linear-gradient(180deg, #ffffff, #f6fbff);
}

.stat-card:nth-child(2) {
  border-top-color: var(--green);
}

.stat-card:nth-child(3) {
  border-top-color: var(--red);
}

.stat-card:nth-child(4) {
  border-top-color: var(--amber);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  font-size: 30px;
  color: var(--ink-blue);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar input,
.toolbar select {
  width: min(360px, 100%);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f0f5f9;
  color: #344154;
  font-weight: 750;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  background: #e9eef5;
  color: #344154;
}

.pill.green {
  background: #dff4e8;
  color: var(--green);
}

.pill.red {
  background: #fde8eb;
  color: var(--red);
}

.pill.amber {
  background: #fff1d8;
  color: var(--amber);
}

.pill.blue {
  background: #e2f0fb;
  color: var(--blue);
}

.pill.violet {
  background: #eceafd;
  color: var(--violet);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.patient-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.patient-list {
  max-height: calc(100vh - 230px);
  overflow: auto;
}

.patient-row {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 10px;
}

.patient-row.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 168, 0.1);
}

.patient-row strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab-button {
  background: #e9eef5;
  color: #314052;
}

.tab-button.active {
  background: var(--green);
  color: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 14px;
}

.med-row,
.invoice-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.invoice-row {
  grid-template-columns: minmax(0, 1fr) 140px auto;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-card {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-card h4 {
  margin: 0 0 6px;
}

.history-card p {
  margin: 4px 0;
}

.modal {
  width: min(780px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: #f1f5f9;
}

#modalContent {
  padding: 24px;
}

.print-body {
  background: #fff;
}

.print-page {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 28px;
  color: #111827;
}

.print-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 3px solid var(--blue);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.print-header h1,
.print-header h2,
.print-header h3 {
  margin: 0 0 8px;
}

.print-header p,
.print-section p,
.print-footer p {
  margin: 3px 0;
}

.doctor-box {
  text-align: right;
}

.print-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.print-logo {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
}

.print-doctor-photo {
  width: 74px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 6px;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
}

.print-section {
  margin-top: 18px;
}

.print-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--blue-dark);
}

.print-table th,
.print-table td {
  border: 1px solid #cfd8e3;
}

.print-footer {
  display: grid;
  grid-template-columns: 1fr 220px;
  margin-top: 50px;
  text-align: center;
}

@media print {
  .print-page {
    width: 100%;
    padding: 0;
  }

  .print-body {
    margin: 0;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .clinic-hero {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-bar,
  .workflow-header {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .patient-layout,
  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .content {
    padding: 16px;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid,
  .med-row,
  .invoice-row,
  .print-grid,
  .hero-services,
  .quick-actions,
  .command-search,
  .qualification-columns,
  .doctor-login-card,
  .hero-title-row,
  .doctor-spotlight {
    grid-template-columns: 1fr;
  }

  .print-header {
    flex-direction: column;
  }

  .doctor-box {
    text-align: left;
  }
}

/* Premium redesign overrides */

:root {
  --bg: #f3f5f1;
  --panel: #ffffff;
  --panel-soft: #f7faf7;
  --text: #17241d;
  --muted: #627167;
  --line: #d9e1db;
  --line-strong: #c6d2c9;
  --blue: #0f7a56;
  --blue-dark: #0b5d43;
  --green: #19805f;
  --red: #b84f63;
  --amber: #b8892e;
  --violet: #3f6b5d;
  --ink-blue: #173528;
  --cream: #f8f4ea;
  --shadow: 0 24px 70px rgba(23, 36, 29, 0.08);
}

body {
  background:
    radial-gradient(circle at top left, rgba(15, 122, 86, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(184, 79, 99, 0.07), transparent 24%),
    linear-gradient(180deg, #f6f8f5 0, #f3f5f1 100%);
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--text);
}

button,
.button {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.primary {
  background: linear-gradient(135deg, var(--blue), #15946a);
  box-shadow: 0 12px 28px rgba(15, 122, 86, 0.22);
}

.primary:hover {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
}

.secondary {
  background: #eef6f2;
  color: var(--blue-dark);
  border: 1px solid rgba(15, 122, 86, 0.12);
}

.ghost {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
}

.small-ghost {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

input,
select,
textarea {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fcfdfc;
  padding: 10px 12px;
}

textarea {
  min-height: 110px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 122, 86, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 122, 86, 0.09);
}

.app-shell {
  grid-template-columns: 300px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  background:
    linear-gradient(180deg, #18372b 0%, #143227 50%, #10271f 100%);
  padding: 24px 18px;
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  padding: 0;
  gap: 14px;
  border: 0;
}

.brand-symbol {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-copy h1 {
  font-size: 26px;
  line-height: 1.02;
}

.brand-copy p {
  color: rgba(235, 244, 238, 0.7);
}

.sidebar-kicker,
.topbar-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(220, 234, 225, 0.62);
}

.sidebar-summary {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-summary strong {
  color: #f7fbf8;
  font-size: 18px;
}

.sidebar-summary span {
  color: rgba(233, 243, 237, 0.72);
  font-size: 13px;
}

.sidebar-meta {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.nav-list {
  padding: 0;
  gap: 8px;
}

.nav-item {
  padding: 12px 14px;
  border-radius: 16px;
  gap: 12px;
  justify-content: flex-start;
  border: 1px solid transparent;
  color: rgba(235, 244, 238, 0.78);
  background: transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(222, 238, 229, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-mark {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 800;
}

.nav-item.active .nav-mark {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-foot {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-foot strong {
  display: block;
  color: #f8fcf9;
  margin-bottom: 12px;
}

.sidebar-foot .ghost {
  background: transparent;
  color: #f4fbf7;
  border-color: rgba(255, 255, 255, 0.18);
}

.workspace {
  background: transparent;
}

.topbar {
  padding: 26px 32px 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.topbar-copy h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  color: var(--ink-blue);
}

.topbar-copy p:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.topbar-actions {
  align-items: center;
}

.topbar-date {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--ink-blue);
  font-size: 13px;
  font-weight: 800;
}

.content {
  padding: 0 32px 32px;
}

.notice {
  margin: 0 32px 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(25, 128, 95, 0.16);
  background: #ecf7f1;
  color: #0f5e43;
}

.dashboard-stack {
  display: grid;
  gap: 22px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 22px;
}

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
}

.hero-clinic {
  background:
    linear-gradient(155deg, #17362a 0%, #1c5843 44%, #194f3d 100%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #edf6f0;
  overflow: hidden;
}

.hero-header,
.hero-footer,
.patient-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.hero-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.hero-brand-mark {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-clinic h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.98;
}

.hero-subtitle {
  margin: 8px 0 0;
  color: rgba(234, 244, 238, 0.76);
  font-size: 14px;
}

.poster-trigger {
  background: rgba(255, 255, 255, 0.08);
  color: #f2fbf5;
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 24px 0;
}

.premium-doctor-card {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.doctor-spotlight {
  grid-template-columns: 130px 1fr;
  gap: 16px;
}

.hero-doctor {
  width: 128px;
  height: 168px;
  border-radius: 20px;
  border: 0;
  box-shadow: 0 16px 34px rgba(23, 36, 29, 0.16);
}

.premium-doctor-card h3 {
  margin: 0;
  color: #ad3f55;
  font-size: 32px;
}

.premium-doctor-card h4 {
  margin: 4px 0 10px;
  color: var(--blue-dark);
  font-size: 24px;
}

.qualification-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  font-size: 13px;
}

.hero-service-board {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: #edf6f0;
}

.hero-service-board .service-board-header h3,
.hero-service-board .service-board-header p {
  color: #edf6f0;
}

.hero-service-board .service-board-header p {
  margin-top: 6px;
  color: rgba(237, 246, 240, 0.72);
}

.service-chip-grid span {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.hero-service-board .service-chip-grid span {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.hero-service-board .service-chip-grid.hindi span {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 250, 246, 0.92);
}

.hero-footer {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  align-items: stretch;
}

.hero-footer-block {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.hero-footer-block span {
  color: rgba(237, 246, 240, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-phone {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.hero-phone a {
  color: #f7f0d2;
  font-size: 23px;
  text-decoration: none;
  font-weight: 900;
}

.hero-ops {
  background: rgba(255, 255, 255, 0.92);
}

.hero-ops-head {
  margin-bottom: 18px;
}

.hero-ops-head h3 {
  font-size: 30px;
  color: var(--ink-blue);
}

.hero-metric-grid,
.hero-preview-grid,
.patient-metric-grid,
.patient-overview-grid {
  display: grid;
  gap: 14px;
}

.hero-preview-grid,
.dashboard-grid {
  align-items: start;
}

.hero-metric-grid,
.hero-preview-grid,
.patient-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patient-overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.premium-stat {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.premium-stat span {
  color: var(--muted);
  font-size: 13px;
}

.premium-stat strong {
  font-size: 34px;
  color: var(--ink-blue);
  line-height: 1;
}

.premium-stat small {
  color: var(--muted);
  font-size: 12px;
}

.tone-blue {
  background: #eef7f3;
  border-color: rgba(15, 122, 86, 0.14);
}

.tone-green {
  background: #edf8f1;
  border-color: rgba(25, 128, 95, 0.14);
}

.tone-rose {
  background: #fbf0f3;
  border-color: rgba(184, 79, 99, 0.14);
}

.tone-gold {
  background: #fbf5ea;
  border-color: rgba(184, 137, 46, 0.18);
}

.dashboard-preview-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fafcfb;
}

.dashboard-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dashboard-preview-head h4 {
  margin: 0;
  font-size: 16px;
}

.dashboard-preview-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-preview-list {
  display: grid;
  gap: 10px;
}

.preview-item {
  display: grid;
  gap: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.preview-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.preview-item strong {
  font-size: 14px;
}

.preview-item span,
.preview-item small,
.mini-empty {
  color: var(--muted);
  font-size: 12px;
}

.command-bar,
.workflow-header {
  padding: 22px 24px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.command-bar h3,
.workflow-header h3,
.section-heading h3 {
  margin: 4px 0 0;
  color: var(--ink-blue);
  font-size: 24px;
}

.command-bar p:last-child,
.workflow-header p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.command-search {
  grid-template-columns: minmax(260px, 380px) auto;
}

.quick-actions-shell {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-actions {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 0;
}

.quick-action {
  min-height: 126px;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(23, 36, 29, 0.06);
}

.quick-action strong {
  font-size: 15px;
}

.action-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.dashboard-grid > :last-child {
  grid-column: 1 / -1;
}

.dashboard-table-panel {
  padding: 22px;
}

.toolbar {
  gap: 12px;
}

.toolbar input,
.toolbar select {
  width: min(420px, 100%);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: auto;
  background: #ffffff;
}

th,
td {
  padding: 14px 16px;
  font-size: 13px;
}

th {
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfcfb;
}

.patient-layout {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.patient-list {
  max-height: none;
  display: grid;
  gap: 10px;
}

.patient-row {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(23, 36, 29, 0.04);
}

.patient-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.patient-row.active {
  border-color: rgba(15, 122, 86, 0.28);
  box-shadow:
    0 0 0 3px rgba(15, 122, 86, 0.08),
    0 18px 40px rgba(23, 36, 29, 0.08);
}

.patient-shell {
  display: grid;
  gap: 18px;
}

.patient-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.patient-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.patient-title-row h3 {
  margin: 0;
  font-size: 30px;
}

.patient-identity > p {
  margin: 10px 0 0;
  color: var(--muted);
}

.patient-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.patient-meta-chip {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.patient-meta-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.patient-meta-chip strong {
  font-size: 13px;
}

.tabs {
  gap: 8px;
  flex-wrap: wrap;
  background: var(--panel-soft);
  border-radius: 20px;
  padding: 8px;
}

.tab-button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 14px;
}

.tab-button.active {
  background: #ffffff;
  color: var(--blue-dark);
  border-color: rgba(15, 122, 86, 0.12);
  box-shadow: 0 8px 18px rgba(23, 36, 29, 0.05);
}

.summary-card,
.history-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.subsection-panel {
  margin-top: 4px;
}

.form-grid {
  gap: 14px;
}

.form-actions {
  margin-top: 8px;
}

.med-row,
.invoice-row {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.modal {
  width: min(920px, calc(100% - 28px));
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  overflow: hidden;
}

.modal > form {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.modal-close {
  border-radius: 50%;
  background: #f1f4f2;
}

#modalContent {
  padding: 30px;
}

@media (max-width: 1360px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .hero-body {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .patient-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    padding: 22px 18px 14px;
  }

  .content {
    padding: 0 18px 24px;
  }

  .notice {
    margin: 0 18px 16px;
  }

  .dashboard-grid,
  .patient-layout,
  .patient-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview-grid,
  .hero-metric-grid,
  .patient-metric-grid,
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-header,
  .command-bar,
  .workflow-header {
    flex-direction: column;
    align-items: stretch;
  }

  .command-search {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .brand-copy h1 {
    font-size: 22px;
  }

  .topbar-copy h2 {
    font-size: 28px;
  }

  .hero-clinic h2,
  .hero-ops-head h3,
  .premium-doctor-card h3,
  .patient-title-row h3 {
    font-size: 26px;
  }

  .hero-preview-grid,
  .hero-metric-grid,
  .patient-meta-strip,
  .patient-metric-grid,
  .quick-actions,
  .form-grid,
  .med-row,
  .invoice-row {
    grid-template-columns: 1fr;
  }

  .doctor-spotlight {
    grid-template-columns: 1fr;
  }

  .qualification-columns {
    grid-template-columns: 1fr;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .row-actions {
    width: 100%;
  }

  .topbar-actions > * ,
  .row-actions > * {
    flex: 1 1 auto;
  }
}
