:root {
  --bg: #07111f;
  --panel: rgba(13, 26, 46, 0.92);
  --panel-2: rgba(17, 34, 58, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #94a3b8;
  --blue: #2f80ed;
  --blue-2: #56ccf2;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(47, 128, 237, 0.25), transparent 34%),
    radial-gradient(circle at bottom right, rgba(86, 204, 242, 0.12), transparent 35%),
    linear-gradient(135deg, #050b14 0%, #07111f 50%, #0a1628 100%);
}

h1,
h2,
p {
  margin-top: 0;
}

/* =========================================================
   AUTH
   ========================================================= */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 34, 58, 0.96), rgba(7, 17, 31, 0.94));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.auth-card.wide {
  max-width: 520px;
}

.auth-card h1 {
  margin-bottom: 8px;
  font-size: 32px;
}

.auth-link {
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
}

.auth-link a {
  color: var(--blue-2);
  text-decoration: none;
  font-weight: 700;
}

/* =========================================================
   BRAND
   ========================================================= */
.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 28px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 14px 35px rgba(47, 128, 237, 0.35);
  margin-bottom: 18px;
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 20px;
  margin: 0;
}

.muted {
  color: var(--muted);
  margin-bottom: 26px;
}

/* =========================================================
   FORMS
   ========================================================= */
label {
  display: block;
  margin: 16px 0 8px;
  color: #cbd5e1;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.55);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 15px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(86, 204, 242, 0.65);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.15);
}

textarea {
  resize: vertical;
}

button {
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(47, 128, 237, 0.28);
}

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

/* =========================================================
   FLASH
   ========================================================= */
.flash-wrap {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  display: grid;
  gap: 10px;
}

.flash {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}

.flash.success { border-color: rgba(34, 197, 94, .45); }
.flash.danger { border-color: rgba(239, 68, 68, .45); }
.flash.warning { border-color: rgba(245, 158, 11, .45); }

/* =========================================================
   MAIN APP LAYOUT — IMPORTANT
   ========================================================= */
.app-layout {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  grid-template-areas: "sidebar main" !important;
  width: 100% !important;
  min-height: 100vh !important;
  align-items: stretch !important;
}

.sidebar {
  grid-area: sidebar !important;
  width: 280px !important;
  min-height: 100vh !important;
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  align-self: start !important;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(5, 11, 20, 0.86);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.main {
  grid-area: main !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: 30px !important;
}

.logo-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 34px;
}

.logo-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: grid;
  gap: 8px;
}

nav a,
.logout {
  color: #cbd5e1;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
}

nav a.active,
nav a:hover {
  background: rgba(47, 128, 237, 0.18);
  color: white;
}

.logout {
  margin-top: auto;
  color: #fca5a5;
}

.precision-ribbon,
.identity-ribbon {
  margin: -12px 0 26px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(86, 204, 242, 0.26);
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.22), rgba(86, 204, 242, 0.08)),
    rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ribbon-title {
  font-size: 13px;
  font-weight: 900;
  color: #e5eefb;
  letter-spacing: 0.02em;
}

.ribbon-subtitle,
.identity-ribbon span {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-2);
}

.identity-ribbon {
  color: #e5eefb;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

/* =========================================================
   TOPBAR / CARDS / PANELS
   ========================================================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.topbar h1 {
  margin-bottom: 6px;
  font-size: 34px;
}

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

.user-pill {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card,
.panel,
.action-card {
  min-width: 0;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.metric-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 12px;
}

.metric-card strong {
  font-size: 30px;
}

.panel p {
  color: var(--muted);
  line-height: 1.7;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.pro-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 800;
}

.pro-btn {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 18px 38px rgba(47, 128, 237, 0.28);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

/* =========================================================
   TABLES
   ========================================================= */
.pro-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.pro-table {
  width: 100%;
  border-collapse: collapse;
}

.pro-table th,
.pro-table td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.pro-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.16);
  color: var(--blue-2);
  font-weight: 700;
  font-size: 13px;
}

.mini-link {
  color: var(--blue-2);
  text-decoration: none;
  font-weight: 800;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-state p {
  color: var(--muted);
}

/* =========================================================
   DOCUMENTS / DASHBOARD
   ========================================================= */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.doc-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(2, 8, 23, 0.55);
}

.quick-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.action-card {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .22);
  transition: 0.18s ease;
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 204, 242, 0.42);
}

.action-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 13px;
}

.action-card strong {
  font-size: 16px;
}

.action-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dashboard-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.smart-alert {
  border-color: rgba(86, 204, 242, 0.32);
}

.big-number {
  font-size: 42px;
  font-weight: 900;
  color: var(--blue-2);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .app-layout {
    display: block !important;
  }

  .sidebar {
    display: none !important;
  }

  .main {
    width: 100% !important;
    padding: 20px !important;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .cards,
  .form-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }
}
/* ================================
   FOOTER PRECISION PRO
================================ */

.app-footer {
  width: 100%;
  text-align: center;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--muted);

  border-top: 1px solid var(--line);
  background: rgba(5, 11, 20, 0.85);

  position: relative;
  z-index: 2;
}

/* cuando hay sidebar */
@media (min-width: 901px) {
  .app-footer {
    margin-left: 280px;
  }
}
/* =========================================================
   UI PRO++ POLISH
========================================================= */

body {
  letter-spacing: -0.01em;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(5, 11, 20, 0.96), rgba(7, 17, 31, 0.92)),
    rgba(5, 11, 20, 0.86);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.22);
}

.logo-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.46);
}

.logo-row strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

nav a {
  position: relative;
  font-weight: 750;
  border: 1px solid transparent;
}

nav a.active {
  border-color: rgba(86, 204, 242, 0.28);
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.26), rgba(86, 204, 242, 0.08));
  box-shadow: 0 14px 32px rgba(47, 128, 237, 0.14);
}

nav a.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.mini-signature {
  padding: 12px 14px;
  border: 1px solid rgba(86, 204, 242, 0.18);
  border-radius: 16px;
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.55);
  text-align: center;
}

.logout {
  margin-top: 0;
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(127, 29, 29, 0.12);
}

.main {
  padding: 34px;
}

.topbar {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(17, 34, 58, 0.78), rgba(7, 17, 31, 0.52));
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
}

.topbar h1 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.user-pill {
  font-weight: 800;
  color: var(--blue-2);
}

.metric-card,
.panel,
.action-card,
.auth-card {
  backdrop-filter: blur(14px);
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -35px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(86, 204, 242, 0.08);
}

.metric-card strong {
  letter-spacing: -0.04em;
}

.panel h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.pro-btn,
button {
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.pro-btn:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(47, 128, 237, 0.34);
}

.ghost-btn:hover {
  border-color: rgba(86, 204, 242, 0.42);
}

input,
select,
textarea {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(86, 204, 242, 0.28);
}

.pro-table tbody tr {
  transition: background 0.16s ease;
}

.pro-table tbody tr:hover {
  background: rgba(47, 128, 237, 0.07);
}

.status-pill {
  text-transform: capitalize;
}

.flash {
  backdrop-filter: blur(12px);
}

.app-footer {
  font-weight: 700;
  letter-spacing: 0.01em;
  background:
    linear-gradient(135deg, rgba(5, 11, 20, 0.94), rgba(7, 17, 31, 0.9));
}

@media (max-width: 900px) {
  .main {
    padding: 20px;
  }

  .topbar {
    border-radius: 22px;
  }
}
/* =========================================================
   PAYMENTS PRO++ UX
========================================================= */

.loan-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.loan-pay-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;

  text-decoration: none;
  color: var(--text);

  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(17, 34, 58, 0.86), rgba(7, 17, 31, 0.72));

  box-shadow: 0 16px 42px rgba(0,0,0,.2);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.loan-pay-card:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 204, 242, 0.42);
  box-shadow: 0 24px 52px rgba(0,0,0,.28);
}

.loan-pay-card span,
.loan-pay-card small {
  display: block;
  color: var(--muted);
}

.loan-pay-card strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.loan-pay-balance {
  min-width: 110px;
  text-align: right;
}

.loan-pay-balance strong {
  color: var(--blue-2);
  font-size: 20px;
}
/* =========================================================
   ALERTAS PRO
========================================================= */

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.alert-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
}

.alert-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.alert-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.45;
}

.alert-card.success {
  border-color: rgba(34, 197, 94, .35);
}

.alert-card.warning {
  border-color: rgba(245, 158, 11, .38);
}

.alert-card.danger {
  border-color: rgba(239, 68, 68, .38);
}

.alert-card.info {
  border-color: rgba(86, 204, 242, .35);
} /* =========================================================
   ANALYTICS PRO
========================================================= */

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.analytics-list {
  display: grid;
  gap: 12px;
}

.analytics-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.analytics-list span {
  color: var(--muted);
}

.analytics-list strong {
  color: var(--blue-2);
}

@media (max-width: 1000px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}
/* ========================================
   SIDEBAR NAV PRO (FIX UI)
======================================== */

.nav-pro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 14px;

  text-decoration: none;
  color: var(--muted);

  font-weight: 600;
  font-size: 14px;

  transition: all .18s ease;
}

.nav-item:hover {
  background: rgba(86, 204, 242, 0.08);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(47,128,237,0.25), rgba(86,204,242,0.1));
  color: var(--blue-2);
  border: 1px solid rgba(86,204,242,0.25);
  box-shadow: 0 8px 25px rgba(47,128,237,.15);
}

.nav-item.active span {
  font-weight: 700;
}
/* =========================
   MODO COBRADOR PRO
========================= */

.collector {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}

.collector-search {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  font-size: 16px;
}

.collector-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 14px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collector-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-2);
}

.collector-btn {
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f80ed, #56ccf2);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.collector-top {
  margin-bottom: 10px;
}

.collector-back {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
}

.collector-back:hover {
  color: var(--text);
  background: rgba(86, 204, 242, 0.08);
}
.collector-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.collector-back,
.collector-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.collector-hero {
  margin-bottom: 18px;
}

.collector-hero h1 {
  font-size: 32px;
  margin-bottom: 6px;
}

.collector-hero p {
  color: var(--muted);
}

.collector-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 18px;
}

.collector-search-btn {
  width: auto;
  margin-top: 0;
  padding: 0 18px;
}

.collector-empty {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: var(--panel);
  text-align: center;
}

.collector-empty p {
  color: var(--muted);
}

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

  .collector-search-btn {
    width: 100%;
    padding: 14px 18px;
  }
}

.offline-badge {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9999;

  display: none;
  padding: 12px 16px;
  border-radius: 999px;

  color: #fff;
  font-size: 13px;
  font-weight: 900;

  background: linear-gradient(135deg, rgba(239,68,68,.96), rgba(245,158,11,.92));
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

.offline-badge.show {
  display: block;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: end;
}

.search-row button {
  width: auto;
  margin-top: 0;
}

@media (max-width: 700px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row button,
  .search-row .ghost-btn {
    width: 100%;
  }
}
.search-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.search-row button {
  width: auto;
  margin-top: 0;
}

@media (max-width: 700px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row button,
  .search-row .ghost-btn {
    width: 100%;
  }
}
/* =========================================================
   MAPA PRO
========================================================= */

.payments-map {
  width: 100%;
  height: 560px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #07111f;
  color: #e5eefb;
}

.leaflet-popup-content {
  line-height: 1.55;
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.plan-card.current {
  border-color: rgba(86, 204, 242, 0.5);
}

.plan-code {
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.plan-price {
  color: var(--blue-2);
  font-size: 28px;
  font-weight: 900;
}

.plan-card ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.usage-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
}

.usage-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.usage-head span {
  color: var(--muted);
  font-weight: 800;
}

.usage-head strong {
  color: var(--blue-2);
}

.usage-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.usage-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 0 24px rgba(86, 204, 242, 0.35);
}

@media (max-width: 900px) {
  .usage-grid {
    grid-template-columns: 1fr;
  }
}
.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-cell strong {
  display: block;
  color: var(--text);
}

.client-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.client-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;

  border-radius: 14px;
  object-fit: cover;

  border: 1px solid rgba(86, 204, 242, 0.28);
  background: rgba(15, 23, 42, 0.72);

  display: block;
  overflow: hidden;

  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

.client-avatar.placeholder {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
}

.table-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.danger-link {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #fca5a5;
  font-weight: 800;
  cursor: pointer;
}

.danger-btn {
  width: auto;
  margin-top: 0;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
  box-shadow: none;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 280px;
}

.client-cell img {
  flex-shrink: 0;
}

/* FORCE CLIENT AVATAR SIZE */
.pro-table .client-cell .client-avatar,
.pro-table .client-cell img.client-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  object-fit: cover !important;
  border-radius: 14px !important;
  display: block !important;
  flex: 0 0 44px !important;
}

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

.profile-photo {
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  object-fit: cover !important;
  border-radius: 24px !important;
  border: 1px solid rgba(86, 204, 242, 0.32);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 34px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
}

/* FORCE CLIENT PHOTOS FINAL */
img.client-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  object-fit: cover !important;
  border-radius: 14px !important;
  display: block !important;
}

img.profile-photo,
.client-profile-head img.profile-photo {
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  min-height: 96px !important;
  max-height: 96px !important;
  object-fit: cover !important;
  border-radius: 24px !important;
  display: block !important;
}
/* =========================================================
   CLIENT PHOTOS — FINAL OVERRIDE
========================================================= */

.pro-table td .client-cell {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.pro-table td .client-cell > img,
.pro-table td .client-cell > img.client-avatar,
.pro-table img.client-avatar,
img.client-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 14px !important;
  display: block !important;
  flex: 0 0 44px !important;
}

.profile-photo,
img.profile-photo,
.client-profile-head .profile-photo,
.client-profile-head img.profile-photo {
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  min-height: 96px !important;
  max-height: 96px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 24px !important;
  display: block !important;
  flex: 0 0 96px !important;
  overflow: hidden !important;
}

.client-profile-head {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}


.form-section {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-section h2 {
  margin-bottom: 10px;
}

.client-cell a {
  text-decoration: none;
}

.client-avatar {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.client-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
}
