/* AssuredCRM UI layer (staff portal + reusable components)
   Keep styles scoped to utility classes so the existing app shell remains unchanged.
*/

:root{
  --assured-blue-700: #1e63ff;
  --assured-green-600: #2cc46a;
  --assured-bg: #f6f9ff;
  --assured-border: rgba(15,23,42,.10);
  --assured-shadow: 0 22px 55px rgba(2,6,23,.12);
  --assured-radius: 20px;
}

/* Background wrapper for main content areas */
.app-bg{
  background:
    radial-gradient(900px 520px at 16% 8%, rgba(30,99,255,.18), transparent 60%),
    radial-gradient(900px 520px at 92% 0%, rgba(44,196,106,.16), transparent 58%),
    linear-gradient(180deg, rgba(246,249,255,1) 0%, rgba(255,255,255,1) 60%, rgba(244,247,251,1) 100%);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(2,6,23,.06);
}

.page-hero{
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--assured-radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--assured-shadow);
  padding: 18px 20px;
}

.assured-card{
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--assured-radius);
  box-shadow: 0 18px 45px rgba(2,6,23,.10);
  overflow: hidden;
}

.assured-card-header{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assured-card-title{
  margin: 0;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: rgba(15,23,42,.88);
}

.assured-card-body{
  padding: 14px 16px;
}

/* Utility: allow flex children to shrink/wrap (Bootstrap doesn't ship min-width:0) */
.min-width-0{ min-width: 0; }

.assured-tabs{
  gap: 10px;
}

/* Form shell helpers */
.form-shell{
  width: 100%;
}

/* Let pill tabs remain usable on small screens */
.assured-tabs{
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
}

.assured-tabs::-webkit-scrollbar{ height: 8px; }
.assured-tabs::-webkit-scrollbar-thumb{ background: rgba(15,23,42,.14); border-radius: 999px; }

.assured-tabs .nav-link{
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 750;
  color: rgba(15,23,42,.72);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(15,23,42,.10);
}

.assured-tabs .nav-link:hover{
  color: rgba(15,23,42,.92);
  background: rgba(255,255,255,.88);
}

.assured-tabs .nav-link.active{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #0b2f6b 0%, #174ea6 100%);
  box-shadow: 0 12px 26px rgba(11,47,107,.22);
}

.sticky-actions{
  position: sticky;
  bottom: 12px;
  z-index: 20;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(15,23,42,.10);
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 -10px 30px rgba(2,6,23,.10);
}

.photo-card{
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
}

.stat-tile{
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(2,6,23,.10);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

/* Variant: stat tile with a CTA underneath (keeps default tile styling intact) */
.stat-tile.stat-tile-action{
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.stat-tile.stat-tile-action .stat-head{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Urgency buttons */
.btn-urgent{
  --g1: #ef4444; /* red-500 */
  --g2: #f97316; /* orange-500 */

  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow:
    0 10px 24px rgba(239, 68, 68, .35),
    inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-urgent:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(239, 68, 68, .45);
  color: #fff;
}

.btn-warning-urgent{
  --g1: #f59e0b; /* amber-500 */
  --g2: #fbbf24; /* amber-400 */

  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #1f2937;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  border: none;
  box-shadow: 0 8px 20px rgba(245, 158, 11, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}


.btn-warning-urgent:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(245, 158, 11, .42);
  color: #111827;
}

.btn-priority{
  background: linear-gradient(90deg, #0b2f6b 0%, #174ea6 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  border: none;
  box-shadow: 0 6px 18px rgba(11,47,107,.28);
  transition: transform .15s ease, box-shadow .15s ease;
}

/* Client Portal: Connections cards */
.connections-card{
  overflow: hidden;
}

.connections-card__band{
  height: 6px;
}

.connections-card--pending .connections-card__band{
  background: linear-gradient(90deg, rgba(245, 158, 11, .95), rgba(249, 115, 22, .85));
}

.connections-card--approved .connections-card__band{
  background: linear-gradient(90deg, rgba(44, 196, 106, .95), rgba(34, 197, 94, .85));
}

/* Minimal status chips (used in funding burn-rate table) */
.acr-badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 12px;
  border: 1px solid var(--bs-border-color);
  background: rgba(var(--bs-body-bg-rgb), 0.70);
}

.acr-badge--danger{
  border-color: var(--bs-danger-border-subtle);
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}

.acr-badge--warn{
  border-color: var(--bs-warning-border-subtle);
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
}

.acr-badge--neutral{
  border-color: var(--bs-border-color);
  background: rgba(var(--bs-body-bg-rgb), 0.70);
  color: rgba(var(--bs-body-color-rgb), 0.80);
}

.acr-pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 12px;
  border: 1px solid var(--bs-border-color);
  background: rgba(var(--bs-body-bg-rgb), 0.70);
}

.acr-pill--ok{
  border-color: var(--bs-success-border-subtle);
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}

.acr-pill--warn{
  border-color: var(--bs-warning-border-subtle);
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
}

.acr-pill--danger{
  border-color: var(--bs-danger-border-subtle);
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}

.connections-icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 24px rgba(2,6,23,.10);
}

.connections-icon--pending{
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.75), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(245, 158, 11, .35), rgba(249, 115, 22, .18));
  color: rgba(120, 53, 15, .95);
}

.connections-icon--approved{
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.75), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(44, 196, 106, .26), rgba(30,99,255,.10));
  color: rgba(21, 128, 61, .95);
}

.btn-priority:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(11,47,107,.35);
  color: #fff;
}

@keyframes urgent-pulse{
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.45); }
  70%  { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

.pulse{ animation: urgent-pulse 2.2s infinite; }

/* Make anchor buttons behave like buttons */
a.btn-urgent, a.btn-warning-urgent, a.btn-priority{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-urgent:focus-visible,
.btn-warning-urgent:focus-visible,
.btn-priority:focus-visible{
  outline: 3px solid rgba(23, 78, 166, .25);
  outline-offset: 2px;
}

.stat-icon{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,99,255,.92), rgba(44,196,106,.88));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 12px 26px rgba(2,6,23,.16);
}

.stat-kpi{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.stat-number{
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: rgba(15,23,42,.90);
}

.stat-label{
  margin-top: 2px;
  color: rgba(15,23,42,.60);
  font-size: .9rem;
}

.empty-state{
  border: 1px dashed rgba(15,23,42,.22);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  background:
    radial-gradient(700px 240px at 25% 20%, rgba(30,99,255,.10), transparent 60%),
    radial-gradient(700px 240px at 85% 0%, rgba(44,196,106,.10), transparent 60%),
    rgba(255,255,255,.78);
}

.empty-state .empty-icon{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,.06);
  color: rgba(15,23,42,.55);
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.chip{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-radius: 999px;
  padding: .45rem .9rem;
  font-weight: 750;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.72);
}

.chip:hover{
  background: rgba(255,255,255,.92);
  color: rgba(15,23,42,.90);
}

.chip.active{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #0b2f6b 0%, #174ea6 100%);
  box-shadow: 0 12px 26px rgba(11,47,107,.20);
}

.avatar-circle{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(15,23,42,.80);
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.10);
}

.avatar-circle img{
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.booking-swatch{
  width: 1.1rem;
  height: 1.1rem;
  background: var(--swatch, #0d6efd);
}

/* Glassy tables inside assured cards */
.assured-table{
  margin-bottom: 0;
}

.assured-table thead th{
  background: rgba(248,250,252,.86);
  color: rgba(15,23,42,.70);
  font-weight: 800;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.assured-table tbody tr{
  background: transparent;
}

.assured-table tbody tr:hover{
  background: rgba(30,99,255,.06);
}

/* Softer table dividers in glass tables */
.assured-table > :not(caption) > * > *{
  border-color: rgba(15,23,42,.06);
}

.assured-table .form-select,
.assured-table .form-control{
  border-radius: 999px;
}

.btn-assured{
  background: linear-gradient(90deg, #0b2f6b 0%, #174ea6 100%);
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(11,47,107,.28);
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 10px 22px;
  transition: all .18s ease;
}

.btn-assured:hover{
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(11,47,107,.35);
  color: #ffffff !important;
}

.btn-assured:active{
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(11,47,107,.22);
}

.btn-assured-outline{
  border-radius: 999px;
  font-weight: 800;
  padding: .55rem 1.0rem;
  color: rgba(15,23,42,.78);
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.18);
}

.btn-assured-outline:hover{
  background: rgba(255,255,255,.92);
  color: rgba(15,23,42,.92);
}

/* =========================================
   ASSURED CRM BUTTON SYSTEM (Enterprise)
   ========================================= */

/* 1) Primary Button (Enterprise Navy) */
.btn-acr-primary,
a.btn-acr-primary{
  background: linear-gradient(
    90deg,
    #0b2f6b 0%,
    #174ea6 100%
  );
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 6px 18px rgba(11,47,107,.28);
  transition: all .18s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.btn-primary{
  background: linear-gradient(90deg, #0b2f6b 0%, #174ea6 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 6px 18px rgba(11,47,107,.28);
  transition: all .18s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.btn-primary:not(.btn-sm):not(.btn-lg){
  --bs-btn-padding-y: 10px;
  --bs-btn-padding-x: 22px;
}

.btn-acr-primary:hover,
a.btn-acr-primary:hover,
.btn-primary:hover{
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(11,47,107,.35);
  text-decoration: none;
}

.btn-acr-primary:active,
.btn-primary:active{
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(11,47,107,.22);
}

/* 2) Secondary Pills (calm + professional) */
.btn-acr-secondary,
a.btn-acr-secondary{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(15,23,42,.15);
  color: rgba(2,6,23,.80);
  border-radius: 999px;
  font-weight: 650;
  padding: 8px 18px;
  transition: all .15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.btn-acr-secondary:hover,
a.btn-acr-secondary:hover{
  background: rgba(15,23,42,.06);
  text-decoration: none;
}

.btn-acr-secondary.active{
  background: rgba(23,78,166,.10);
  border-color: rgba(23,78,166,.35);
  color: rgba(2,6,23,.95);
}

/* 3) Success (refined green) */
.btn-acr-success,
a.btn-acr-success{
  background: linear-gradient(90deg, #0f6a52 0%, #1f8f59 100%);
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(16,120,88,.25);
  border: none;
  text-decoration: none;
}

/* 4) Warning (professional amber) */
.btn-acr-warning,
a.btn-acr-warning{
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  text-decoration: none;
}

/* 5) Destructive (controlled red) */
.btn-acr-danger,
a.btn-acr-danger{
  background: linear-gradient(90deg, #991b1b 0%, #dc2626 100%);
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  text-decoration: none;
}

.btn-acr-primary:focus-visible,
.btn-primary:focus-visible,
.btn-acr-secondary:focus-visible{
  outline: 3px solid rgba(23, 78, 166, .25);
  outline-offset: 2px;
}

.btn-acr-secondary:disabled,
.btn-acr-secondary[disabled]{
  opacity: .55;
  pointer-events: none;
}

.btn-acr-sm{
  height: 38px;
  padding: 0 16px;
  font-size: 0.92rem;
}

/* Clients page (Dashboard-style calm) */
.acr-page-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.acr-title{
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  color: rgba(15,23,42,.90);
}

.acr-subtitle{
  margin: 6px 0 0;
  color: rgba(15,23,42,.62);
}

.acr-seg-tabs{
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.acr-tab{
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 750;
  color: rgba(15,23,42,.72);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(15,23,42,.10);
  text-decoration: none;
}

.acr-tab:hover{
  color: rgba(15,23,42,.92);
  background: rgba(255,255,255,.88);
  text-decoration: none;
}

.acr-tab.active{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #0b2f6b 0%, #174ea6 100%);
  box-shadow: 0 12px 26px rgba(11,47,107,.20);
}

.acr-kpi-row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.acr-kpi-card{
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 14px 34px rgba(2,6,23,.08);
  padding: 14px 14px;
  position: relative;
  overflow: hidden;
}

.acr-kpi-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(15,23,42,.14);
}

.acr-kpi-top{
  display: flex;
  gap: 10px;
  align-items: center;
}

.acr-kpi-icon{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.65);
}

.acr-kpi-label{
  font-weight: 800;
  color: rgba(15,23,42,.72);
  font-size: .85rem;
}

.acr-kpi-value{
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin-top: 10px;
  color: rgba(15,23,42,.90);
}

.acr-kpi-foot{
  margin-top: 4px;
  color: rgba(15,23,42,.60);
  font-size: .85rem;
}

.acr-kpi--neutral::before{ background: rgba(15,23,42,.14); }
.acr-kpi--info::before{ background: rgba(30,99,255,.35); }
.acr-kpi--warn::before{ background: rgba(245,158,11,.55); }
.acr-kpi--danger::before{ background: rgba(239,68,68,.55); }

/* Clients widgets (Dashboard-style action cards) */
.acr-widget-row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.acr-widget-card{
  border-radius: 16px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 10px 28px rgba(2,6,23,0.06);
  padding: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 126px;
}

.acr-widget-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(2,6,23,0.14);
}

.acr-widget-top{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.acr-widget-icon{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(2,132,199,0.10);
  color: rgba(2,132,199,0.95);
  flex: 0 0 auto;
  font-size: 18px;
}

.acr-widget-label{
  font-weight: 750;
  font-size: 13px;
  color: rgba(2,6,23,0.72);
  letter-spacing: .2px;
}

.acr-widget-value{
  font-size: 26px;
  font-weight: 850;
  margin-top: 6px;
  color: rgba(2,6,23,0.90);
  line-height: 1;
}

.acr-widget-foot{
  margin-top: 6px;
  color: rgba(15,23,42,0.58);
  font-size: 13px;
}

.acr-widget-actions{
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.acr-widget--neutral::before{ background: rgba(2,6,23,0.14); }
.acr-widget--info::before{ background: rgba(59,130,246,0.40); }
.acr-widget--warn::before{ background: rgba(245,158,11,0.55); }
.acr-widget--danger::before{ background: rgba(239,68,68,0.55); }

.acr-widget--warn .acr-widget-icon{
  background: rgba(245,158,11,0.14);
  color: rgba(245,158,11,0.95);
}

.acr-widget--danger .acr-widget-icon{
  background: rgba(239,68,68,0.12);
  color: rgba(239,68,68,0.95);
}

.acr-controls{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.acr-controls-left{
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 280px;
}

.acr-controls-right{
  display: flex;
  gap: 10px;
  align-items: center;
}

.acr-search{
  position: relative;
  flex: 1;
  min-width: 260px;
}

.acr-search i{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(15,23,42,.45);
}

.acr-search input{
  padding-left: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,23,42,.12);
}

.acr-select{
  border-radius: 999px;
}

.acr-empty{
  border: 1px dashed rgba(15,23,42,.18);
  border-radius: 16px;
  padding: 30px 18px;
  text-align: center;
  background: rgba(255,255,255,.70);
}

.acr-empty-icon{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,.06);
  color: rgba(15,23,42,.55);
  font-size: 1.35rem;
  margin-bottom: 10px;
}

@media (max-width: 992px){
  .acr-kpi-row{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acr-widget-row{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px){
  .acr-kpi-row{ grid-template-columns: 1fr; }
  .acr-widget-row{ grid-template-columns: 1fr; }
}

.assured-pill{
  border-radius: 999px;
  padding: .35rem .65rem;
  font-weight: 800;
}

.btn-pill{
  border-radius: 999px !important;
  font-weight: 800;
}

/* Team members: avatar/initials */
.user-avatar{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(30,99,255,.18), rgba(44,196,106,.18));
  border: 1px solid rgba(15,23,42,.10);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(15,23,42,.75);
}

.search-pill{
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,23,42,.10);
  padding: 10px 14px;
}

.search-pill .form-control:focus{
  box-shadow: none;
}

/* Organisations list: emphasise active org */
.org-row-active{
  background: linear-gradient(90deg, rgba(34,197,94,.10), rgba(255,255,255,0));
}

/* IMPORTANT: don't use ::before on <tr> (can create a pseudo "cell" and shift columns).
   Render the left accent on the first cell without affecting layout. */
.org-row-active td:first-child{
  background-image: linear-gradient(180deg, rgba(34,197,94,1), rgba(47,174,99,1));
  background-repeat: no-repeat;
  background-size: 6px 100%;
  background-position: left top;
}

/* Django messages: keep semantics, improve presentation */
.alert.assured-alert{
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 14px 34px rgba(2,6,23,.10);
  backdrop-filter: blur(10px);
}

.alert-success.assured-alert{ border-left: 6px solid rgba(44,196,106,.95); }
.alert-info.assured-alert{ border-left: 6px solid rgba(30,99,255,.85); }
.alert-warning.assured-alert{ border-left: 6px solid rgba(245,158,11,.95); }
.alert-danger.assured-alert{ border-left: 6px solid rgba(239,68,68,.95); }

/* Glassy toast + modal support (if used elsewhere) */
.toast.assured-toast{
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(2,6,23,.18);
  backdrop-filter: blur(12px);
}

.modal-content{
  border-radius: 20px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 26px 80px rgba(2,6,23,.22);
}

/* Responsive tweaks */
@media (max-width: 575.98px){
  .app-bg{ padding: 16px; }
  .page-hero{ padding: 14px 14px; }
}

/* Register Provider page (high-fidelity mock styling) */
.assured-page{
  max-width: 980px;
}

.assured-back{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: rgba(15,23,42,.70);
  font-weight: 750;
}

.assured-back:hover{
  color: rgba(15,23,42,.92);
}

.hero-icon{
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(30,99,255,.96), rgba(44,196,106,.90));
  box-shadow: 0 18px 40px rgba(2,6,23,.18);
}

.hero-icon i{ font-size: 1.35rem; }

.assured-card-body-lg{
  padding: 22px 24px;
}

.assured-form-card{
  background:
    radial-gradient(900px 380px at 20% 0%, rgba(30,99,255,.10), transparent 60%),
    radial-gradient(900px 380px at 92% 10%, rgba(44,196,106,.10), transparent 58%),
    rgba(255,255,255,.82);
}

.assured-form .form-label{
  font-weight: 800;
  color: rgba(15,23,42,.78);
  margin-bottom: .45rem;
}

.assured-form .form-control,
.assured-form .form-select{
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
  padding: .82rem 1rem;
}

.assured-form textarea.form-control{
  border-radius: 18px;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.assured-form .form-control::placeholder{
  color: rgba(15,23,42,.45);
}

.assured-form .form-control:focus,
.assured-form .form-select:focus{
  border-color: rgba(30,99,255,.45);
  box-shadow:
    0 0 0 .25rem rgba(30,99,255,.16),
    0 14px 30px rgba(2,6,23,.10);
  background: rgba(255,255,255,.92);
}

.btn-assured.btn-lg{
  padding: .85rem 1.35rem;
  font-weight: 900;
}

.btn-assured-glow{
  box-shadow:
    0 16px 34px rgba(2,6,23,.16),
    0 0 0 0 rgba(30,99,255,.0);
}

.btn-assured-glow:hover{
  box-shadow:
    0 20px 46px rgba(2,6,23,.20),
    0 0 0 6px rgba(30,99,255,.10);
}

/* File inputs: make native "Choose file" match assured form controls */
input[type="file"]{
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
  padding: .55rem 1rem;
}

input[type="file"]:focus{
  border-color: rgba(30,99,255,.45);
  box-shadow:
    0 0 0 .25rem rgba(30,99,255,.16),
    0 14px 30px rgba(2,6,23,.10);
  background: rgba(255,255,255,.92);
  outline: none;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button{
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  color: rgba(15,23,42,.78);
  padding: .4rem .9rem;
  margin-right: .75rem;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover{
  background: rgba(255,255,255,1);
}
