:root {
  --med-navy: #102B46;
  --med-navy-2: #183D5E;
  --med-green: #7FB069;
  --med-green-2: #DDECD6;
  --med-blue: #2878B8;
  --med-cyan: #EAF6FB;
  --med-gold: #F3B14B;
  --med-red: #D85A4A;
  --bg: #F3F8F6;
  --surface: #FFFFFF;
  --surface-2: #F8FCFB;
  --ink: #142231;
  --muted: #6F7F8F;
  --line: #DCE8E4;
  --shadow: 0 16px 42px rgba(16, 43, 70, .10);
  --radius: 22px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  background: radial-gradient(circle at top left, rgba(127, 176, 105, .16), transparent 30%), linear-gradient(180deg, #F8FCFB 0%, #EFF7F3 100%);
  color: var(--ink)
}

a {
  text-decoration: none;
  color: inherit
}

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

.app-shell {
  display: flex;
  min-height: 100vh
}

.sidebar {
  width: 292px;
  background: linear-gradient(180deg, var(--med-navy) 0%, #0B2137 100%);
  color: white;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 8px 0 28px rgba(16, 43, 70, .16);
  z-index: 3
}

.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 24px
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  overflow: hidden
}

.brand-logo img {
  width: 43px;
  height: 43px;
  object-fit: contain
}

.brand-title {
  line-height: 1.05
}

.brand-title strong {
  letter-spacing: .07em;
  font-size: 15px
}

.brand-title span {
  display: block;
  color: #BFD6E9;
  font-size: 12px;
  margin-top: 6px
}

.nav-group-label {
  font-size: 11px;
  color: #87A8C5;
  text-transform: uppercase;
  letter-spacing: .13em;
  margin: 18px 12px 9px
}

nav {
  display: grid;
  gap: 6px
}

nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 15px;
  color: #DCECF8;
  font-weight: 700;
  transition: .18s ease
}

nav a:hover {
  background: rgba(255, 255, 255, .10);
  transform: translateX(2px)
}

nav a.active {
  background: linear-gradient(135deg, rgba(127, 176, 105, .95), rgba(40, 120, 184, .78));
  color: white;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .18)
}

.nav-ico {
  width: 22px;
  text-align: center
}

.sidebar-footer {
  position: absolute;
  bottom: 20px;
  left: 18px;
  right: 18px;
  color: #BFD6E9;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 16px;
  padding: 12px
}

.sidebar-footer strong {
  display: block;
  color: white;
  font-size: 13px
}

.main {
  flex: 1;
  padding: 26px 30px;
  overflow: auto
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--med-green);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em
}

.topbar h1 {
  margin: 6px 0 3px;
  font-size: 30px;
  letter-spacing: -.03em
}

.topbar p {
  margin: 0;
  color: var(--muted)
}

.userbox {
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 18px;
  box-shadow: var(--shadow)
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--med-green), var(--med-blue));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900
}

.userbox small {
  display: block;
  color: var(--muted);
  font-size: 11px
}

.userbox a {
  color: var(--med-blue);
  font-weight: 900;
  padding: 8px 10px;
  border-radius: 12px
}

.userbox a:hover {
  background: var(--med-cyan)
}

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

.stats {
  grid-template-columns: repeat(4, minmax(160px, 1fr))
}

.card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px)
}

.card.soft {
  background: linear-gradient(135deg, #FFFFFF, #F7FCFA)
}

.stat {
  position: relative;
  overflow: hidden
}

.stat:after {
  content: "";
  position: absolute;
  right: -24px;
  top: -22px;
  width: 100px;
  height: 100px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(127, 176, 105, .18), rgba(40, 120, 184, .12));
  transform: rotate(18deg)
}

.stat .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800
}

.stat .value {
  font-size: 38px;
  font-weight: 950;
  margin-top: 8px;
  letter-spacing: -.04em;
  color: var(--med-navy)
}

.stat .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px
}

.section-title {
  font-size: 19px;
  font-weight: 950;
  margin: 0 0 14px;
  letter-spacing: -.02em
}

.section-sub {
  color: var(--muted);
  margin: -8px 0 16px
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 16px;
  gap: 12px;
  flex-wrap: wrap
}

.search {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 300px;
  background: white;
  box-shadow: 0 6px 18px rgba(16, 43, 70, .04)
}

.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow)
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 880px
}

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

th {
  background: #F5FBF9;
  color: #4B6174;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em
}

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

tr:hover td {
  background: #FBFEFD
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  padding: 11px 15px;
  font-weight: 900;
  cursor: pointer;
  transition: .16s ease;
  white-space: nowrap
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(.98)
}

.btn.primary {
  background: linear-gradient(135deg, var(--med-green), #5E9C55);
  color: white;
  box-shadow: 0 10px 22px rgba(127, 176, 105, .28)
}

.btn.secondary {
  background: var(--med-cyan);
  color: var(--med-navy);
  border: 1px solid #D3E9F4
}

.btn.dark {
  background: var(--med-navy);
  color: white
}

.btn.danger {
  background: #FDECEA;
  color: #B6372D
}

.btn.small {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 12px
}

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

.field label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 7px;
  color: #405064
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  outline: none
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--med-green);
  box-shadow: 0 0 0 4px rgba(127, 176, 105, .14)
}

.field textarea {
  min-height: 110px
}

.full {
  grid-column: 1/-1
}

.alert {
  padding: 13px 15px;
  border-radius: 16px;
  margin-bottom: 16px;
  font-weight: 800;
  border: 1px solid
}

.alert.success {
  background: #ECF8EA;
  color: #2F7538;
  border-color: #CBE9C4
}

.alert.error {
  background: #FDECEA;
  color: #AE342D;
  border-color: #F4C5BF
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900
}

.chip.ok {
  background: #E7F6E3;
  color: #2D7B3B
}

.chip.pending {
  background: #FFF4DB;
  color: #8A5D00
}

.chip.blue {
  background: #E6F3FB;
  color: #195C8F
}

.chip.red {
  background: #FDECEA;
  color: #B6372D
}

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

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

.kpi-line {
  display: grid;
  gap: 10px
}

.kpi-line a {
  background: #F8FCFB;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 900
}

.kpi-line a span {
  color: var(--muted);
  font-size: 12px
}

.signature-preview {
  max-width: 240px;
  max-height: 100px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 43, 70, .58);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20
}

.modal.show {
  display: flex
}

.modal-card {
  background: white;
  border-radius: 24px;
  padding: 22px;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28)
}

.close-x {
  float: right;
  font-size: 26px;
  cursor: pointer;
  color: var(--muted)
}

.hero-card {
  background: linear-gradient(135deg, var(--med-navy), var(--med-navy-2));
  color: white;
  border: 0;
  position: relative;
  overflow: hidden
}

.hero-card:after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border-radius: 70px;
  background: rgba(127, 176, 105, .22);
  transform: rotate(25deg)
}

.hero-card h2 {
  font-size: 26px;
  margin: 0 0 8px
}

.hero-card p {
  color: #D8E8F6;
  margin: 0;
  max-width: 660px
}

.hero-logo {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: white;
  display: grid;
  place-items: center;
  margin-bottom: 16px
}

.hero-logo img {
  width: 52px;
  height: 52px
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top left, rgba(127, 176, 105, .33), transparent 30%), linear-gradient(135deg, var(--med-navy) 0%, #0A1F34 100%);
  padding: 24px
}

.login-card {
  width: min(460px, 94vw);
  background: rgba(255, 255, 255, .96);
  padding: 34px;
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .33);
  border: 1px solid rgba(255, 255, 255, .4)
}

.login-card .brand {
  color: var(--ink);
  margin-bottom: 26px
}

.login-card .brand-logo {
  background: #F7FCFB;
  box-shadow: none;
  border: 1px solid var(--line)
}

.login-card h1 {
  margin: 0 0 4px;
  font-size: 28px
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted)
}

.login-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center
}

.medicine-card {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #FBFEFD;
  padding: 14px
}

.pdf-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FDECEA, #F9D0CB);
  color: #B6372D;
  display: grid;
  place-items: center;
  font-weight: 950
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted)
}

.add-account-link {
    display: inline-block;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.add-account-link:hover {
    text-decoration: underline;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

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

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    color: #198754; /* Green text */
    text-decoration: none;
    border: 2px solid #198754; /* Green border */
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all .2s ease;
}

.back-btn:hover {
    background: #198754;
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .back-btn {
        align-self: flex-end;
    }
}


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

@media(max-width:1040px) {
  .stats {
    grid-template-columns: repeat(2, minmax(150px, 1fr))
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important
  }
}

@media(max-width:900px) {
  .app-shell {
    display: block
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto
  }

  .main {
    padding: 18px
  }

  .topbar {
    display: block
  }

  .userbox {
    margin-top: 14px
  }

  .form-grid {
    grid-template-columns: 1fr
  }

  .sidebar-footer {
    position: static;
    margin-top: 16px
  }

  .search {
    min-width: 100%;
  }

  .stats {
    grid-template-columns: 1fr
  }

  .brand-title strong {
    font-size: 14px
  }
}

/* Premium Medicamenta revision */
.admin-card-mini {
  margin-top: 18px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .13);
  display: flex;
  gap: 11px;
  align-items: center
}

.admin-card-mini img {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  object-fit: cover;
  background: white
}

.admin-card-mini small {
  display: block;
  color: #BFD6E9;
  margin-top: 3px
}

.user-photo {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  object-fit: cover;
  background: #F7FCFB;
  border: 1px solid var(--line)
}

.premium-hero {
  background: linear-gradient(135deg, #FFFFFF 0%, #F3FAF7 58%, #EAF6FB 100%);
  position: relative;
  overflow: hidden
}

.premium-hero:after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 80px;
  background: linear-gradient(135deg, rgba(127, 176, 105, .20), rgba(40, 120, 184, .12));
  transform: rotate(25deg)
}

.stat.green .value {
  color: #3E8E41
}

.profile-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px
}

.profile-head img {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  object-fit: cover;
  background: #F6FBF8;
  border: 1px solid var(--line)
}

.profile-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em
}

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

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px
}

.mini-metrics span {
  background: #F6FBF8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px;
  text-align: center;
  color: var(--muted);
  font-size: 12px
}

.mini-metrics b {
  display: block;
  color: var(--med-navy);
  font-size: 18px
}

.profile-details {
  display: grid;
  gap: 6px;
  color: #42566A;
  font-size: 13px
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  display: inline-block;
  background: #9AA7B4;
  box-shadow: 0 0 0 4px rgba(154, 167, 180, .14);
  margin-left: auto
}

.status-dot.online {
  background: #36B365;
  box-shadow: 0 0 0 5px rgba(54, 179, 101, .18)
}

.status-dot.offline {
  background: #9AA7B4
}

.modal-card.wide {
  width: min(940px, 94vw)
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px
}

.check-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #FBFEFD;
  cursor: pointer
}

.check-card:hover {
  border-color: #B7D8C0;
  background: #F6FBF8
}

.check-card input {
  width: auto;
  margin-top: 4px
}

.check-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px
}

.inline-check {
  display: flex !important;
  align-items: center;
  gap: 8px
}

.inline-check input {
  width: auto !important
}

.medicine-card.premium {
  align-items: flex-start
}

.medicine-card.premium p {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 10px
}

.map-preview {
  height: 310px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .58) 1px, transparent 1px) 0 0/38px 38px,
    linear-gradient(0deg, rgba(255, 255, 255, .58) 1px, transparent 1px) 0 0/38px 38px,
    radial-gradient(circle at 22% 32%, rgba(127, 176, 105, .24), transparent 18%),
    radial-gradient(circle at 76% 68%, rgba(40, 120, 184, .19), transparent 20%),
    linear-gradient(135deg, #EAF6FB, #F3FAF7);
}

.map-preview:before {
  content: "";
  position: absolute;
  inset: 34px 18px;
  border: 2px dashed rgba(16, 43, 70, .13);
  border-radius: 45% 55% 44% 56%/57% 44% 56% 43%;
  transform: rotate(-8deg)
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--med-navy);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  z-index: 2
}

.map-pin span {
  width: 21px;
  height: 21px;
  border-radius: 50% 50% 50% 0;
  background: #36B365;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 7px rgba(54, 179, 101, .18), 0 10px 18px rgba(16, 43, 70, .22)
}

.map-pin span:after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: white
}

.map-pin b {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  box-shadow: 0 8px 16px rgba(16, 43, 70, .10)
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .42)
}

.map-list {
  display: grid;
  gap: 8px;
  margin-top: 12px
}

.map-list div {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #FBFEFD;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px
}

.map-list small {
  display: block;
  color: var(--muted);
  margin-left: auto
}

.leader-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line)
}

.leader-row:last-child {
  border-bottom: 0
}

.leader-row img {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  object-fit: cover;
  background: #F7FCFB
}

.leader-row small {
  display: block;
  color: var(--muted);
  margin-top: 2px
}

.leader-row span {
  font-weight: 900;
  color: var(--med-green)
}

/* Pre-Loader Start*/
#preloader {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loader-content {
    text-align: center;
}

/* LOGO */
.loader-logo {
    width: 180px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 6px;
    animation: pulse 1.2s ease-in-out infinite;
}

/* SPINNER */
.spinner {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #4ade80;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* SPIN ANIMATION */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* PULSE ANIMATION */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* HIDE AFTER LOAD */
#preloader.hide {
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
}
/* Pre-Loader End */


@media(max-width:720px) {
  .mini-metrics {
    grid-template-columns: 1fr
  }

  .card-actions {
    align-items: stretch;
    flex-direction: column
  }

  .map-list small {
    margin-left: 0
  }

  .map-list div {
    display: block
  }

  .status-dot {
    margin-left: 0
  }

  .leader-row {
    grid-template-columns: 44px 1fr
  }

  .leader-row span {
    grid-column: 2
  }
}

/* Dashboard readability + premium map revision */
.dashboard-hero-v2 {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at right top, rgba(127, 176, 105, .20), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f7fcfb 45%, #e9f5fb 100%) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow);
  min-height: 168px;
}

.dashboard-hero-v2:after {
  display: none !important
}

.dashboard-hero-v2 .hero-logo {
  margin: 0;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(16, 43, 70, .10)
}

.dashboard-hero-v2 .hero-logo img {
  width: 58px;
  height: 58px
}

.dashboard-hero-v2 h2 {
  color: var(--med-navy) !important;
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -.035em
}

.dashboard-hero-v2 p {
  color: #40566b !important;
  margin: 0;
  max-width: 780px;
  line-height: 1.45;
  font-weight: 600
}

.hero-status-panel {
  display: grid;
  gap: 8px;
  min-width: 190px;
  background: rgba(255, 255, 255, .84);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(16, 43, 70, .08)
}

.hero-status-panel .chip {
  justify-content: center
}

.hero-status-panel small {
  color: var(--muted);
  font-weight: 700;
  text-align: center
}

.map-card-v2 {
  padding: 0;
  overflow: hidden
}

.map-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 20px 12px
}

.map-card-head .section-title {
  margin-bottom: 6px
}

.map-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E7F6E3;
  color: #2D7B3B;
  border: 1px solid #C9E9C4;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap
}

.map-live-chip:before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #36B365;
  box-shadow: 0 0 0 5px rgba(54, 179, 101, .18)
}

.map-preview {
  height: 360px !important;
  margin: 0 20px 16px;
  border-radius: 26px !important;
  border: 1px solid #CFE4E2 !important;
  background:
    linear-gradient(90deg, rgba(16, 43, 70, .085) 1px, transparent 1px) 0 0/42px 42px,
    linear-gradient(0deg, rgba(16, 43, 70, .085) 1px, transparent 1px) 0 0/42px 42px,
    radial-gradient(circle at 24% 34%, rgba(127, 176, 105, .36), transparent 18%),
    radial-gradient(circle at 70% 72%, rgba(40, 120, 184, .26), transparent 22%),
    linear-gradient(135deg, #DDF1EE 0%, #EFF8F3 48%, #DDEFF8 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.map-preview:before {
  content: "";
  position: absolute;
  left: 8%;
  right: 7%;
  top: 18%;
  height: 120px;
  border: 0;
  border-top: 14px solid rgba(16, 43, 70, .10);
  border-radius: 50%;
  transform: rotate(-8deg);
  filter: blur(.1px)
}

.map-preview:after {
  content: "";
  position: absolute;
  left: 15%;
  right: 12%;
  bottom: 18%;
  height: 90px;
  border: 0;
  border-top: 12px solid rgba(127, 176, 105, .18);
  border-radius: 50%;
  transform: rotate(10deg)
}

.map-pin {
  z-index: 5 !important;
  filter: drop-shadow(0 10px 14px rgba(16, 43, 70, .18))
}

.map-pin b {
  color: var(--med-navy) !important;
  border-color: #CFE4E2 !important;
  background: #fff !important
}

.map-empty {
  z-index: 4;
  background: rgba(255, 255, 255, .62) !important;
  color: #40566b;
  font-weight: 900;
  text-align: center
}

.map-empty:before {
  content: "No live GPS pins yet";
  display: block;
  color: var(--med-navy);
  font-size: 18px;
  margin-bottom: 4px
}

.map-list {
  padding: 0 20px 20px;
  margin-top: 0 !important
}

.map-list div {
  background: #FFFFFF !important;
  box-shadow: 0 8px 20px rgba(16, 43, 70, .05)
}

@media(max-width:960px) {
  .dashboard-hero-v2 {
    grid-template-columns: 64px 1fr
  }

  .hero-status-panel {
    grid-column: 1/-1
  }

  .dashboard-hero-v2 .hero-logo {
    width: 64px;
    height: 64px
  }

  .dashboard-hero-v2 h2 {
    font-size: 24px
  }

  .map-card-head {
    display: block
  }

  .map-live-chip {
    margin-top: 10px
  }

  .map-preview {
    height: 310px !important;
    margin: 0 14px 14px
  }

  .map-list {
    padding: 0 14px 16px
  }
}
/* Assignment Console UX revision */
.assignment-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background:
    radial-gradient(circle at right top, rgba(127, 176, 105, .22), transparent 32%),
    linear-gradient(135deg, #FFFFFF 0%, #F6FBF8 52%, #EAF6FB 100%);
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.assignment-hero h2 {
  margin: 8px 0 8px;
  color: var(--med-navy);
  font-size: 28px;
  letter-spacing: -.04em;
}

.assignment-hero p {
  margin: 0;
  color: #40566b;
  max-width: 850px;
  line-height: 1.45;
  font-weight: 600;
}

.assignment-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 10px;
}

.assignment-hero-metrics div {
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(16, 43, 70, .06);
}

.assignment-hero-metrics b {
  display: block;
  color: var(--med-navy);
  font-size: 26px;
  line-height: 1;
}

.assignment-hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.assignment-stats {
  margin-bottom: 18px;
}

.assignment-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.assignment-panel {
  min-height: 420px;
}

.rep-panel {
  position: sticky;
  top: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.assignment-search {
  width: 100%;
  min-width: 0;
  margin-bottom: 14px;
}

.rep-list {
  display: grid;
  gap: 10px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.rep-choice {
  display: grid;
  grid-template-columns: 52px 1fr 18px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #FBFEFD;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: .16s ease;
}

.rep-choice:hover {
  transform: translateY(-1px);
  border-color: #B7D8C0;
  background: #F6FBF8;
}

.rep-choice.active {
  background: linear-gradient(135deg, #F2FAEF, #EAF6FB);
  border-color: #8DC47D;
  box-shadow: 0 12px 26px rgba(127, 176, 105, .16);
}

.rep-choice img {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: white;
}

.rep-choice b {
  display: block;
  color: var(--med-navy);
  font-size: 14px;
}

.rep-choice span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.assignment-main-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.selected-rep-card {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.selected-rep-card img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 10px 20px rgba(16, 43, 70, .08);
}

.selected-rep-card h2 {
  margin: 5px 0 4px;
  color: var(--med-navy);
  font-size: 24px;
  letter-spacing: -.03em;
}

.selected-rep-card p {
  margin: 0;
  color: var(--muted);
}

.assignment-save-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F6FBF8;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
}

.assignment-save-box div {
  min-width: 86px;
  text-align: center;
}

.assignment-save-box b {
  display: block;
  color: var(--med-green);
  font-size: 30px;
  line-height: 1;
}

.assignment-save-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

.assignment-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 160px auto auto;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.assignment-tools .search,
.assignment-tools select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  padding: 12px 14px;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(16, 43, 70, .04);
}

.selected-strip {
  min-height: 52px;
  border: 1px dashed #CFE4E2;
  background: #F8FCFB;
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 10px;
  background: #E7F6E3;
  color: #2D7B3B;
  font-size: 12px;
  font-weight: 950;
  border: 1px solid #C9E9C4;
}

.selected-pill small {
  color: rgba(45, 123, 59, .72);
  font-weight: 800;
}

.selected-pill.more {
  background: #E6F3FB;
  color: #195C8F;
  border-color: #CFE4F3;
}

.doctor-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 12px;
  max-height: 720px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.doctor-pick-card {
  display: grid;
  grid-template-columns: 22px 56px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #FFFFFF;
  cursor: pointer;
  transition: .16s ease;
  min-height: 130px;
}

.doctor-pick-card:hover {
  transform: translateY(-1px);
  border-color: #B7D8C0;
  box-shadow: 0 12px 24px rgba(16, 43, 70, .07);
}

.doctor-pick-card.checked {
  border-color: #7FB069;
  background: linear-gradient(135deg, #F4FBF0, #F8FEFC);
  box-shadow: 0 14px 26px rgba(127, 176, 105, .15);
}

.doctor-pick-card input {
  width: 18px;
  height: 18px;
  margin-top: 18px;
  accent-color: var(--med-green);
}

.doctor-pick-card img {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #F6FBF8;
}

.doctor-pick-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.doctor-pick-title b {
  color: var(--med-navy);
  font-size: 15px;
  line-height: 1.25;
}

.doctor-pick-main p {
  margin: 5px 0 4px;
  color: var(--med-green);
  font-weight: 900;
  font-size: 12px;
}

.doctor-pick-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.assignment-footer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
  flex-wrap: wrap;
}

.assignment-summary-card {
  margin-top: 18px;
}

.assignment-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.summary-rep-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(16, 43, 70, .05);
}

.summary-rep-head {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.summary-rep-head img {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #F6FBF8;
}

.summary-rep-head h3 {
  margin: 0;
  color: var(--med-navy);
  font-size: 16px;
}

.summary-rep-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.summary-doctor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
  min-height: 35px;
}

.doctor-mini-chip {
  display: inline-flex;
  padding: 7px 9px;
  background: #F6FBF8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #40566b;
  font-size: 12px;
  font-weight: 800;
}

@media(max-width:1180px) {
  .assignment-workspace {
    grid-template-columns: 1fr;
  }
  .rep-panel {
    position: static;
  }
  .rep-list {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    max-height: none;
  }
  .assignment-tools {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width:760px) {
  .assignment-hero,
  .assignment-main-head {
    display: block;
  }
  .assignment-hero-metrics {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }
  .assignment-save-box {
    margin-top: 14px;
    justify-content: space-between;
  }
  .assignment-tools {
    grid-template-columns: 1fr;
  }
  .doctor-selection-grid,
  .assignment-summary-grid {
    grid-template-columns: 1fr;
  }
  .summary-rep-head {
    grid-template-columns: 52px 1fr;
  }
  .summary-rep-head .chip {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

/* Assignment Manager v1.1.1 UX refinement */
.assignment-hero,
.assignment-stats,
.assignment-summary-card {
  display: none !important;
}

.assignment-control-redesign {
  margin-bottom: 18px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F7FBF8 58%, #EEF8F5 100%);
  border: 1px solid #DDEBE7;
}

.assignment-redesign-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 18px;
}

.assignment-redesign-head h2 {
  color: var(--med-navy);
  margin: 6px 0;
  font-size: 28px;
  letter-spacing: -.035em;
}

.assignment-redesign-head p {
  color: #4C6174;
  line-height: 1.55;
  max-width: 980px;
  margin: 0;
}

.assignment-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 10px;
}

.assignment-mini-metrics div {
  background: rgba(255,255,255,.9);
  border: 1px solid #DDEBE7;
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(16,43,70,.05);
}

.assignment-mini-metrics b {
  display: block;
  color: var(--med-navy);
  font-size: 26px;
  line-height: 1;
}

.assignment-mini-metrics span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 7px;
}

.rep-picker-suite {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.rep-picker-suite label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.premium-select,
.rep-picker-suite .search {
  width: 100%;
  border: 1px solid #CFE0DB;
  border-radius: 16px;
  background: #FFFFFF;
  padding: 13px 15px;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(16,43,70,.04);
  font-weight: 800;
}

.assignment-workspace.v2 {
  grid-template-columns: 360px minmax(0, 1fr);
}

.assignment-side-preview {
  position: sticky;
  top: 18px;
  min-height: unset;
  background: #FFFFFF;
}

.selected-rep-profile {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.selected-rep-profile img {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #F7FBF8;
  box-shadow: 0 12px 26px rgba(16,43,70,.09);
}

.selected-rep-profile h2 {
  margin: 4px 0 2px;
  color: var(--med-navy);
  font-size: 22px;
  letter-spacing: -.025em;
}

.selected-rep-profile p {
  color: var(--muted);
  margin: 0 0 9px;
  font-size: 12px;
}

.rep-status-line {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.coverage-preview-grid {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.coverage-preview-grid div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid #DDEBE7;
  background: linear-gradient(135deg, #F8FCFB, #FFFFFF);
}

.coverage-preview-grid b {
  color: var(--med-green);
  font-size: 24px;
  line-height: 1;
}

.coverage-preview-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.region-preview {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.region-preview h3 {
  color: var(--med-navy);
  font-size: 14px;
  margin: 0 0 10px;
}

.region-preview-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed #DDEBE7;
  color: var(--muted);
  font-size: 12px;
}

.region-preview-row b {
  color: var(--med-navy);
}

.assignment-main-head.compact {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.assignment-tools.v2 {
  grid-template-columns: minmax(250px, 1fr) 170px 180px 160px;
  margin-top: 14px;
}

.bulk-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.region-doctor-groups {
  display: grid;
  gap: 16px;
  max-height: 780px;
  overflow: auto;
  padding-right: 4px;
}

.doctor-region-section {
  border: 1px solid #DDEBE7;
  background: #FBFEFD;
  border-radius: 24px;
  padding: 14px;
}

.region-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.region-section-head h3 {
  margin: 4px 0 0;
  color: var(--med-navy);
  font-size: 18px;
}

.region-section-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.region-section-counts span {
  border: 1px solid #CFE0DB;
  background: #FFFFFF;
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.region-section-counts b {
  color: var(--med-green);
}

.doctor-selection-grid.region-grid {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.doctor-pick-card.v2 {
  grid-template-columns: 22px 58px 1fr;
  min-height: 182px;
}

.doctor-process-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 7px 0;
}

.doctor-process-meta span {
  border-radius: 999px;
  background: #EFF7F3;
  border: 1px solid #DCECE4;
  color: var(--med-green);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
}

.doctor-pick-card.v2 small b {
  color: #34495E;
}

.visits-structured {
    display: grid;
    grid-template-rows: auto auto;
    gap: 6px;
    text-align: center;
}

.visits-week {
    font-size: 14px;
}

.visits-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 12px;
}



@media (max-width: 1180px) {
  .assignment-redesign-head,
  .assignment-workspace.v2,
  .rep-picker-suite {
    grid-template-columns: 1fr;
  }
  .assignment-side-preview {
    position: static;
  }
  .assignment-tools.v2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .assignment-mini-metrics,
  .assignment-tools.v2 {
    grid-template-columns: 1fr;
  }
  .assignment-main-head.compact,
  .region-section-head {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Assignment v3: clearer representative picker */
.fixed-rep-picker .premium-select {
  appearance: auto;
  -webkit-appearance: menulist;
  min-height: 52px;
  color: var(--med-navy, #102B46) !important;
  background-color: #FFFFFF !important;
  border: 1px solid #BFD5CE !important;
  box-shadow: 0 8px 18px rgba(16,43,70,.05) !important;
}
.fixed-rep-picker .premium-select option {
  color: #102B46;
  background: #FFFFFF;
  font-weight: 700;
}
.fixed-rep-picker .search {
  min-height: 52px;
}
.fixed-rep-picker .muted {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}
.assignment-side-preview .coverage-preview-grid b {
  word-break: break-word;
}


/* Assignment v4: compressed selected representative preview, no contact number */
.assignment-workspace.v2 {
  grid-template-columns: 320px minmax(0, 1fr);
}
.assignment-side-preview {
  padding: 18px !important;
}
.selected-rep-profile {
  grid-template-columns: 58px 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.selected-rep-profile img {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}
.selected-rep-profile h2 {
  font-size: 18px;
  margin: 3px 0 1px;
  line-height: 1.15;
}
.selected-rep-profile p {
  font-size: 11px;
  margin-bottom: 6px;
}
.rep-status-line .chip {
  padding: 5px 8px;
  font-size: 10px;
}
.coverage-preview-grid.compact-rep-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.coverage-preview-grid.compact-rep-stats div {
  display: block;
  text-align: center;
  padding: 10px 8px;
}
.coverage-preview-grid.compact-rep-stats b {
  font-size: 22px;
  margin-bottom: 5px;
}
.coverage-preview-grid.compact-rep-stats span {
  font-size: 10px;
}
.region-preview {
  padding-top: 12px;
}
.region-preview h3 {
  font-size: 13px;
}
.region-preview-row {
  padding: 7px 0;
}
@media (max-width: 1180px) {
  .assignment-workspace.v2 { grid-template-columns: 1fr; }
}

/* v1.1.2 dashboard/forms/assignment polish */
.assignment-compact-selector-card {
  padding: 16px 18px;
  margin-bottom: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
}
.rep-picker-suite.slim {
  grid-template-columns: minmax(260px, 380px) minmax(320px, 1fr) auto;
  gap: 12px;
}
.rep-picker-suite.slim .premium-select,
.rep-picker-suite.slim .search {
  min-height: 48px;
  padding: 10px 14px;
}
.rep-picker-suite.slim label {
  margin-bottom: 5px;
}
.confirm-card {
  max-width: 460px;
  text-align: center;
  border: 1px solid rgba(127,176,105,.18);
  background: linear-gradient(180deg,#FFFFFF 0%,#F7FCFA 100%);
}
.confirm-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: var(--med-navy);
  background: linear-gradient(135deg,#EAF6FB,#DDECD6);
  box-shadow: 0 14px 32px rgba(16,43,70,.12);
}
.confirm-card h2 {
  margin: 6px 0 8px;
  color: var(--med-navy);
}
.confirm-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
}
.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.modal-card {
  border: 1px solid rgba(221,232,228,.9);
}
.map-link {
  display: inline-flex;
  margin-top: 4px;
  color: var(--med-blue);
  font-weight: 900;
  font-size: 12px;
}
.reports-grid-premium {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.report-card { min-width: 0; }
.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.responsive-report-table {
  width: 100%;
  overflow-x: auto;
}
.responsive-report-table table {
  min-width: 520px;
}
input[type="password"]::placeholder,
input::placeholder,
textarea::placeholder {
  color: #8796A3;
}
.field small.muted {
  display:block;
  margin-top: 5px;
  font-size: 11px;
}
@media (max-width: 1100px) {
  .rep-picker-suite.slim,
  .reports-grid-premium {
    grid-template-columns: 1fr;
  }
}


/* v1.1.3 Dashboard actual map + favicon polish */
.leaflet-admin-map {
  height: 390px;
  margin: 0 20px 14px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid #CFE4E2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 12px 28px rgba(16,43,70,.08);
  background: #DDEFF8;
  position: relative;
}
.leaflet-admin-map .leaflet-control-attribution {
  font-size: 10px;
}
.map-warning {
  margin: 0 20px 12px;
  padding: 12px 14px;
  border: 1px dashed #CFE4E2;
  border-radius: 16px;
  background: #F8FCFB;
  color: #516578;
  font-weight: 800;
}
.map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 20px 14px;
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  color: #40566b;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(16,43,70,.05);
}
.legend-dot.green { background: #36B365; }
.legend-dot.blue { background: #2878B8; }
.legend-dot.orange { background: #F3A33B; }
.status-dot.warning {
  background: #F3B14B;
  box-shadow: 0 0 0 4px rgba(243,177,75,.18);
}
.status-dot.offline {
  background: #9BAAB7;
  box-shadow: 0 0 0 4px rgba(155,170,183,.18);
}
.map-popup {
  display: grid;
  gap: 3px;
  min-width: 170px;
}
.map-popup b {
  color: var(--med-navy);
  font-size: 13px;
}
.map-popup small {
  color: var(--muted);
  font-size: 11px;
}
.map-unavailable {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  color: #40566b;
  font-weight: 900;
  background: linear-gradient(135deg,#EAF6FB,#F8FCFB);
}
@media(max-width:960px) {
  .leaflet-admin-map { height: 320px; margin: 0 14px 12px; }
  .map-legend, .map-warning { margin-left: 14px; margin-right: 14px; }
}

/* ============================================================
   v1.4 — incidental doctors, visit-frequency progress, roles
   ============================================================ */

.badge-incidental,
.badge-pending {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}

.badge-incidental {
  background: #E7F1FB;
  color: #2878B8;
  border: 1px solid #C4DCF2;
}

.badge-pending {
  background: #FFF4E3;
  color: #9A6412;
  border: 1px solid #F0D6A8;
}

.profile-card.pending-review {
  border-color: #F0D6A8;
  box-shadow: 0 0 0 1px #F7E5C4 inset, 0 12px 28px rgba(16, 43, 70, .08);
}

.incidental-banner,
.coverage-banner {
  margin: 0 0 14px;
}

/* Visit frequency progress */
.freq-progress {
  margin-top: 6px;
}

.freq-progress-bar {
  height: 5px;
  border-radius: 999px;
  background: #E8EEF3;
  overflow: hidden;
  margin-bottom: 4px;
}

.freq-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #36B365, #2878B8);
  border-radius: 999px;
  transition: width .25s ease;
}

.freq-progress small {
  font-size: 11px;
}

.freq-done {
  color: #36B365;
  font-weight: 600;
}

/* Denied / read-only affordances */
.btn-denied,
.btn[disabled] {
  background: #9ca3af !important;
  border-color: #9ca3af !important;
  color: #fff !important;
  cursor: not-allowed;
  opacity: 1;
}

.readonly-field {
  background: #F4F7F9;
  color: #5B6B7A;
  cursor: default;
}

.alert.warn {
  background: #FFF8EC;
  border: 1px solid #F0D6A8;
  color: #7A4E0B;
}
