* {
  box-sizing: border-box;
}

:root {
  --navy: #0B1F3A;
  --navy-soft: #173D6B;
  --green: #0A7F4F;
  --blue: #2563EB;
  --amber: #B45309;

  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --border: #DCE4EC;

  --text: #0B1F3A;
  --muted: #667085;
  --muted-2: #98A2B3;

  --success-bg: #DCFCE7;
  --success-text: #087A4C;

  --warning-bg: #FEF3C7;
  --warning-text: #9A5B08;

  --danger-bg: #FEE2E2;
  --danger-text: #B42318;

  font-family:
    "Plus Jakarta Sans",
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--bg);
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}


/* =========================================================
   LOGIN / 2FA
   ========================================================= */

.auth-shell {
  min-height: 100vh;
  width: min(430px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 25px;
}

.brand-logo,
.sidebar-logo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--navy);
  border-radius: 13px;
  overflow: hidden;
}

.brand-logo {
  width: 52px;
  height: 52px;
}

.brand-logo svg,
.sidebar-logo svg {
  width: 100%;
  height: 100%;
  padding: 6px;
}

.brand-wordmark {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.brand-dri {
  color: var(--navy);
}

.brand-gain {
  color: var(--green);
}

.brand-tagline {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  box-shadow:
    0 24px 60px rgba(11, 31, 58, .08),
    0 2px 6px rgba(11, 31, 58, .03);
}

.auth-card h1 {
  margin: 7px 0 8px;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -.7px;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.25px;
}

.auth-copy {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-card label {
  display: block;
  margin-bottom: 18px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.auth-card input {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  outline: none;
  background: #FFF;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(10, 127, 79, .10);
}

.code-input {
  text-align: center;
  font-size: 23px !important;
  font-weight: 800;
  letter-spacing: 8px;
}

.auth-card button {
  width: 100%;
  min-height: 47px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #FFF;
  font-weight: 750;
  transition: .15s ease;
}

.auth-card button:hover {
  background: #086E45;
}

.auth-card button.secondary {
  margin-top: 10px;
  background: #EDF2F5;
  color: var(--navy);
}

.message {
  margin-top: 15px;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.45;
}

.message.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #FECACA;
}


/* =========================================================
   ADMIN LAYOUT
   ========================================================= */

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #FFF;
  padding: 28px 18px 22px;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 27px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  background: #153C69;
  border-radius: 10px;
}

.sidebar-wordmark {
  display: flex;
  align-items: baseline;
  color: #FFF;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.8px;
  white-space: nowrap;
}

.sidebar-wordmark strong {
  color: var(--green);
}

.sidebar-wordmark small {
  margin-left: 5px;
  color: #20C784;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  width: 100%;
  min-height: 45px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #CAD5E4;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
  transition: .15s ease;
}

.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #FFF;
}

.nav-item.active {
  background: #193F70;
  color: #FFF;
}

.sidebar-bottom {
  margin-top: auto;
}

.logout-link {
  width: 100%;
  margin-top: 6px;
  padding: 11px 15px;
  border: 0;
  background: transparent;
  color: #8497AE;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}

.logout-link:hover {
  color: #FFF;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
  padding: 34px 38px 42px;
  background: var(--bg);
}

.topbar {
  max-width: 1320px;
  margin: 0 auto 27px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -1.1px;
}

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

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

.btn-outline,
.btn-primary {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.btn-outline {
  border: 1px solid #CBD5E1;
  background: #FFF;
  color: var(--navy);
}

.btn-outline:hover {
  background: #F8FAFC;
}

.btn-primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #FFF;
}

.btn-primary:hover {
  background: #1D4ED8;
}

.view-section {
  max-width: 1320px;
  margin: 0 auto;
}


/* =========================================================
   KPI CARDS
   ========================================================= */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}

.kpi-card {
  min-height: 122px;
  padding: 23px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 1px 2px rgba(11,31,58,.02);
}

.kpi-card span {
  display: block;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 14px;
}

.kpi-card strong {
  display: block;
  color: var(--navy);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.kpi-card strong.green {
  color: var(--green);
}

.kpi-card strong.amber {
  color: var(--amber);
}


/* =========================================================
   PANELS / TABLES
   ========================================================= */

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(11,31,58,.02);
}

.panel-heading {
  min-height: 84px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.panel-heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.35px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: min(340px, 36vw);
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #FFF;
  outline: none;
  color: var(--text);
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

thead {
  background: #F8FAFC;
}

th {
  padding: 15px 24px;
  color: #536174;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .55px;
}

td {
  padding: 18px 24px;
  border-top: 1px solid #EDF1F5;
  color: #344054;
  font-size: 13px;
  vertical-align: middle;
}

tbody tr:hover {
  background: #FBFCFD;
}

.empty-row {
  height: 150px;
  color: var(--muted-2);
  text-align: center;
}

.user-primary {
  color: var(--navy);
  font-weight: 750;
}

.user-secondary {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.status-active {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-pending {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status-blocked {
  background: #E2E8F0;
  color: #475569;
}


/* =========================================================
   SECONDARY VIEWS
   ========================================================= */

.placeholder-view {
  min-height: 350px;
  padding: 28px;
}

.placeholder-view h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -.5px;
}

.placeholder-view p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
  .admin-app {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    width: 220px;
  }

  .main-content {
    padding: 28px 24px 36px;
  }

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

@media (max-width: 760px) {
  .admin-app {
    display: block;
  }

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

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

  .sidebar-bottom {
    margin-top: 12px;
  }

  .main-content {
    padding: 24px 16px 34px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button {
    flex: 1;
  }

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

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box input {
    width: 100%;
  }

  th,
  td {
    padding-left: 16px;
    padding-right: 16px;
  }
}


/* HOTFIX LOGO SIZE */
.auth-shell {
  width: min(430px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
}

.auth-brand {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.brand-logo {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  flex: 0 0 52px !important;
  overflow: hidden !important;
}

.sidebar-logo {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  overflow: hidden !important;
}

.brand-logo svg {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  padding: 0 !important;
}

.sidebar-logo svg {
  display: block !important;
  width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
}

/* =========================================================
   USUARIOS
   ========================================================= */

.users-heading {
  align-items: flex-end;
}

.section-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.users-search-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.users-search-area input {
  width: 360px;
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  outline: none;
  background: #FFF;
  color: var(--text);
}

.users-search-area input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

.users-search-area .btn-primary {
  min-height: 43px;
  padding: 0 18px;
}

.users-toolbar {
  min-height: 58px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #FBFCFD;
  color: var(--muted);
  font-size: 13px;
}

.users-toolbar select {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #CBD5E1;
  border-radius: 9px;
  background: #FFF;
  color: var(--text);
  outline: none;
}

.users-table th:last-child,
.users-table td:last-child {
  width: 110px;
  text-align: right;
}

.table-action {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 750;
  font-size: 12px;
}

.table-action:hover {
  text-decoration: underline;
}


/* =========================================================
   DETALLE DE USUARIO
   ========================================================= */

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  background: rgba(11,31,58,.38);
  backdrop-filter: blur(2px);
}

.detail-panel {
  width: min(620px, 100%);
  height: 100vh;
  overflow-y: auto;
  background: #FFF;
  box-shadow: -18px 0 50px rgba(11,31,58,.16);
}

.detail-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 110px;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: #FFF;
  border-bottom: 1px solid var(--border);
}

.detail-header h2 {
  margin: 7px 0 4px;
  font-size: 25px;
  letter-spacing: -.6px;
}

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

.detail-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #F1F5F9;
  color: var(--navy);
  font-size: 27px;
  line-height: 1;
}

.detail-close:hover {
  background: #E2E8F0;
}

.detail-body {
  padding: 24px 28px 40px;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.detail-stat {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FBFCFD;
}

.detail-stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.detail-stat strong {
  color: var(--navy);
  font-size: 16px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section-title {
  margin-bottom: 12px;
}

.detail-section-title h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.detail-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-card {
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #FFF;
}

.detail-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-card h4 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.detail-meta {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px 16px;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta strong {
  color: #344054;
  font-weight: 700;
}

.dg-code {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 7px;
  background: #EEF4FF;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
}

.detail-actions {
  margin-top: 14px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.detail-small-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFF;
  color: var(--navy);
  font-size: 12px;
  font-weight: 750;
}

.detail-small-button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #FFF;
}

.detail-small-button.danger {
  border-color: #FECACA;
  background: #FFF7F7;
  color: #B42318;
}

.detail-empty {
  padding: 24px;
  border: 1px dashed #CBD5E1;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 900px) {
  .users-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .users-search-area {
    width: 100%;
  }

  .users-search-area input {
    width: 100%;
  }

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

@media (max-width: 560px) {
  .users-search-area {
    flex-direction: column;
  }

  .users-search-area .btn-primary {
    width: 100%;
  }

  .detail-summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PAGOS
   ========================================================= */

.payments-heading {
  align-items: flex-end;
}

.payments-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payments-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.payments-filter select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #CBD5E1;
  border-radius: 9px;
  background: #FFF;
  color: var(--text);
  outline: none;
}

.compact-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.payments-table {
  min-width: 1050px;
}

.payments-table th,
.payments-table td {
  padding-left: 16px;
  padding-right: 16px;
}

.payment-user-name {
  color: var(--navy);
  font-weight: 750;
}

.payment-user-email {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.payment-reference {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  font-size: 11px;
  color: #344054;
}

.payment-request-code {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 6px;
  background: #EEF4FF;
  color: var(--blue);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  font-size: 11px;
  font-weight: 750;
}

.payment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.payment-action-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.payment-action-button.approve {
  border: 1px solid var(--green);
  background: var(--green);
  color: #FFF;
}

.payment-action-button.approve:hover {
  background: #086E45;
}

.payment-action-button.reject {
  border: 1px solid #FECACA;
  background: #FFF7F7;
  color: #B42318;
}

.payment-action-button.reject:hover {
  background: #FEE2E2;
}


/* =========================================================
   MODAL DE PAGOS
   ========================================================= */

.payment-dialog {
  width: min(520px, calc(100% - 32px));
  margin: auto;
  border-radius: 18px;
  overflow: hidden;
  background: #FFF;
  box-shadow: 0 30px 80px rgba(11,31,58,.22);
}

.payment-dialog-header {
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
}

.payment-dialog-header h2 {
  margin: 7px 0 0;
  font-size: 22px;
  letter-spacing: -.5px;
}

.payment-dialog-body {
  padding: 24px;
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.payment-summary-item {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FBFCFD;
}

.payment-summary-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.payment-summary-item strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  word-break: break-word;
}

.payment-notes-label {
  display: block;
  margin-bottom: 18px;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.payment-notes-label textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 7px;
  padding: 12px;
  resize: vertical;
  border: 1px solid #CBD5E1;
  border-radius: 9px;
  outline: none;
  background: #FFF;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

.payment-notes-label textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

.payment-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.payment-dialog-actions button {
  min-height: 42px;
}

.payment-dialog-actions .btn-primary.danger-action {
  border-color: #B42318;
  background: #B42318;
}

.payment-dialog-actions .btn-primary.danger-action:hover {
  background: #912018;
}

@media (max-width: 760px) {
  .payments-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .payments-filter {
    justify-content: space-between;
  }

  .payment-summary {
    grid-template-columns: 1fr;
  }

  .payment-dialog-actions {
    flex-direction: column-reverse;
  }

  .payment-dialog-actions button {
    width: 100%;
  }
}

/* =========================================================
   LICENCIAS Y PLANES
   ========================================================= */

.plans-block {
  margin-bottom: 24px;
}

.section-header-inline {
  margin-bottom: 14px;
}

.section-header-inline h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.4px;
}

.section-header-inline p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}

.plan-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #FFF;
}

.plan-card.loading-card {
  color: var(--muted);
}

.plan-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.plan-code {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}

.plan-price {
  margin-top: 18px;
  color: var(--navy);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -.7px;
}

.plan-price small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.plan-meta {
  margin-top: 15px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.plan-meta strong {
  color: #344054;
}

.plan-card.courtesy {
  border-color: rgba(10,127,79,.24);
  background: #F7FCF9;
}

.plan-card.monthly {
  border-top: 3px solid var(--blue);
}

.plan-card.annual {
  border-top: 3px solid var(--green);
}

.plan-card.courtesy {
  border-top: 3px solid var(--amber);
}

.plan-state {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.plan-state.active {
  background: var(--success-bg);
  color: var(--success-text);
}

.plan-state.inactive {
  background: #E2E8F0;
  color: #475569;
}

.licenses-panel {
  margin-top: 8px;
}

.licenses-heading {
  align-items: flex-end;
}

.licenses-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.licenses-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.licenses-filter select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #CBD5E1;
  border-radius: 9px;
  background: #FFF;
  color: var(--text);
  outline: none;
}

.licenses-table {
  min-width: 980px;
}

.license-user {
  color: var(--navy);
  font-weight: 750;
}

.license-user-email {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.license-device {
  color: #344054;
  font-size: 12px;
}

.license-device-code {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #EEF4FF;
  color: var(--blue);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  font-size: 10px;
  font-weight: 750;
}

.license-warning {
  padding: 13px 14px;
  border: 1px solid #FED7AA;
  border-radius: 10px;
  background: #FFF7ED;
  color: #9A3412;
  font-size: 12px;
  line-height: 1.5;
}

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

@media (max-width: 760px) {
  .licenses-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .licenses-filter {
    justify-content: space-between;
  }
}
