/* =====================================================================
   Premium Shell – TheSyndic / Arkendia
   v21 – Blue Harmony: cool glass with blue accent
   ===================================================================== */

/* ---- Grid layout – airy v2 ---- */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.docs-grid > * {
  border: none;
}

.docs-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- Modern section – Ultra Premium Glass ---- */
.modern-section {
  background: rgba(248,250,252,0.18);
  backdrop-filter: blur(60px) saturate(220%) brightness(1.02);
  -webkit-backdrop-filter: blur(60px) saturate(220%) brightness(1.02);
  padding: 30px;
  margin-bottom: 0;
  border: 1px solid rgba(248,250,252,0.42);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(248,250,252,0.60), inset 0 -1px 0 rgba(248,250,252,0.10);
  position: relative;
  overflow: hidden;
}

.modern-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(91,106,245,0.08), rgba(248,250,252,0.85) 30%, rgba(248,250,252,0.95) 50%, rgba(248,250,252,0.85) 70%, rgba(91,106,245,0.08));
  pointer-events: none;
}

.modern-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248,250,252,0.35) 30%, rgba(248,250,252,0.5) 50%, rgba(248,250,252,0.35) 70%, transparent);
  pointer-events: none;
}

.modern-section:hover {
  box-shadow: inset 0 1px 0 rgba(248,250,252,0.70);
  background: rgba(248,250,252,0.30);
  transform: translateY(-1px);
}

/* Soft variant – Ultra Premium Glass */
.section-soft.modern-section {
  background: rgba(248,250,252,0.14);
  box-shadow: inset 0 1px 0 rgba(248,250,252,0.50);
  border: 1px solid rgba(248,250,252,0.38);
}

.section-soft.modern-section::before { display: none; }

.section-assurance.modern-section,
.section-storage.modern-section {
  background: rgba(248,250,252,0.14);
  box-shadow: inset 0 1px 0 rgba(248,250,252,0.50);
  border: 1px solid rgba(248,250,252,0.38);
}

.section-assurance.modern-section::before,
.section-storage.modern-section::before { display: none; }

/* ---- Section header – airy v2 ---- */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 0;
  position: relative;
}

.section-header .section-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(91,106,245,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5B6AF5;
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(248,250,252,0.40), 0 2px 6px rgba(91,106,245,0.08);
  border: 1px solid rgba(91,106,245,0.10);
  flex-shrink: 0;
}

.section-header h4 {
  margin: 0;
  font-weight: 700;
  color: #111827;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.page-title {
  font-weight: 800;
  margin: 0 0 24px 0;
  color: var(--heading, #111827);
  font-size: 28px;
  text-align: left;
  letter-spacing: -0.02em;
  width: 100%;
  align-self: flex-start;
}

/* ---- Overview section ---- */
.section-overview.modern-section::before { content: none; }

.section-overview .section-header {
  margin-bottom: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.04));
  position: relative;
  z-index: 2;
}

.section-overview .section-icon {
  background: var(--accent-light, rgba(91,106,245,0.08)) !important;
  color: var(--accent, #5B6AF5) !important;
  font-size: 16px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  border: none !important;
}

.section-overview .section-icon i {
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  color: var(--accent, #5B6AF5) !important;
  font-size: inherit !important;
}

.section-overview .section-icon i.fa-layer-group::before { content: "\f5fd" !important; }
.section-overview .section-icon::after { content: "" !important; display: none !important; }
.section-overview .section-header h4 { color: #111827; flex: 1; min-width: 220px; }

/* Hide decorative waves */
.overview-waves { display: none; }

/* ---- Stats overview ---- */
.overview-stats .stat-card { flex: 1 1 0; min-width: 0; }
.overview-stats.compact-2 .stat-card { flex: 0 0 calc((100% - 16px)/2); }
.overview-stats.compact-3 .stat-card { flex: 0 0 calc((100% - 36px)/3); }
.overview-stats.compact-4 .stat-card { flex: 0 0 calc((100% - 48px)/4); }

.section-overview .section-header { margin-bottom: 8px; }
.section-overview .section-header h4 { font-size: 20px; }
.section-overview .stat-card { padding: 14px 16px; }

/* ---- Scroll & grid normalize – airy v2 ---- */
body .index-content > .scroll {
  padding: 0 28px 40px 28px !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

body .index-content .grid {
  padding: 0 !important;
  gap: 24px !important;
  max-width: none !important;
  margin: 0 !important;
  align-items: stretch !important;
  display: flex !important;
  flex-direction: column !important;
}

body .index-content .grid > * {
  width: 100% !important;
  max-width: none !important;
}

body .index-content > .scroll > .modern-section:not(.section-overview) {
  max-width: none;
}

/* ---- Overview section master ---- */
.modern-section.section-overview {
  width: 100% !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 24px 28px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  position: relative !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  background: var(--glass-bg, rgba(248,250,252,0.52)) !important;
  backdrop-filter: var(--glass-blur, blur(28px) saturate(160%)) !important;
  -webkit-backdrop-filter: var(--glass-blur, blur(28px) saturate(160%)) !important;
  border: 1px solid var(--glass-border, rgba(248,250,252,0.22)) !important;
  border-radius: 20px !important;
  box-shadow: none !important;
  color: #111827 !important;
}

.modern-section.section-overview {
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

.modern-section.section-overview .overview-inner {
  width: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  margin: 0 !important;
  padding: 0 0 8px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  flex: 1 !important;
  height: 100% !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

.modern-section.section-overview .overview-stats {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex: 1 !important;
  gap: 14px !important;
  width: 100% !important;
  align-items: stretch !important;
  min-height: 56px !important;
  max-height: 66px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.modern-section.section-overview .overview-stats .stat-card {
  margin: 0 !important;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  min-height: 56px !important;
  max-height: 66px !important;
  height: 60px !important;
  background: rgba(248,250,252,0.45) !important;
  border: 1px solid rgba(248,250,252,0.20) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: var(--transition, all 0.22s ease) !important;
}

.modern-section.section-overview .overview-stats .stat-card .stat-icon { display: none !important; }

.modern-section.section-overview .overview-stats .stat-card .stat-meta .label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

.modern-section.section-overview .overview-stats .stat-card .stat-meta .value {
  background: rgba(91,106,245,0.08) !important;
  color: #5B6AF5 !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  min-width: 28px !important;
  text-align: center !important;
  white-space: nowrap !important;
  margin: 0 !important;
  border: 1px solid rgba(91,106,245,0.1) !important;
}

.modern-section.section-overview .overview-stats .stat-card .stat-meta {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 !important;
  gap: 12px !important;
}

/* Overview responsive */
@media (max-width: 1200px) {
  .modern-section.section-overview { width: 100% !important; max-width: none !important; }
}
@media (max-width: 900px) {
  body .index-content > .scroll { gap: 16px; }
  .modern-section.section-overview { width: 100% !important; height: auto !important; min-height: auto !important; max-height: none !important; }
}
@media (max-width: 640px) {
  .modern-section.section-overview { width: 100% !important; height: auto !important; min-height: auto !important; max-height: none !important; }
}

.section-overview .stat-card .stat-meta .value { font-size: 16px; }
.section-overview .stat-card .stat-meta .label { letter-spacing: .3px; }
.section-overview.modern-section.center-stats { justify-content: flex-start; }
.section-overview.modern-section.center-stats .overview-stats { align-items: center; }

@media (max-width: 780px) {
  .section-overview.modern-section { min-height: 150px; }
  .overview-stats { flex-wrap: wrap; }
  .overview-stats .stat-card { flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 520px) {
  .overview-stats .stat-card { flex: 1 1 100%; }
}

/* ---- Stat cards (standalone) ---- */
.stat-card {
  background: rgba(248,250,252,0.45);
  border: 1px solid rgba(248,250,252,0.20);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 100px;
  transition: var(--transition, all 0.22s ease);
}

.stat-card:hover {
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
  transform: translateY(-1px);
  background: rgba(248,250,252,0.58);
}

.stat-card .stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light, rgba(79,70,229,0.07));
  color: var(--accent, #4550E0);
  box-shadow: none;
}

.stat-card .stat-meta .label {
  font-size: 12px;
  color: #374151;
  font-weight: 600;
  letter-spacing: .2px;
  display: block;
  text-transform: uppercase;
}

.stat-card .stat-meta .value {
  font-size: 18px;
  color: #111827;
  font-weight: 700;
  display: block;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  color: #64748B;
  margin: 20px 0;
  padding: 24px;
  background: rgba(91,106,245,0.04);
  border-radius: 16px;
  border: 1px dashed rgba(91,106,245,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state i {
  font-size: 40px;
  color: rgba(91,106,245,0.25);
}

/* ---- Grid bootstrap overrides ---- */
.grid .row { margin-left: 0; margin-right: 0; }
.grid [class^="col-"] { padding-left: 10px; padding-right: 10px; box-sizing: border-box; }

/* ---- Buttons (shell) ---- */
.btn-modern {
  background: var(--accent, #5B6AF5);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(91,106,245,0.18);
  text-decoration: none;
  display: inline-block;
  font-family: 'DM Sans', -apple-system, sans-serif;
}

.btn-modern:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(91,106,245,0.25);
  background: var(--accent-hover, #4550E0);
}

.btn-modern.btn-secondary {
  background: var(--surface, #fff);
  color: var(--text, #374151);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.btn-modern.btn-secondary:hover {
  background: var(--surface-raised, #F9FAFB);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.btn-toggle {
  background: var(--accent, #5B6AF5);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  box-shadow: 0 2px 8px rgba(91,106,245,0.18);
  margin-top: 15px;
  font-family: 'DM Sans', -apple-system, sans-serif;
}

.btn-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(91,106,245,0.25);
  color: #fff;
  background: var(--accent-hover, #4550E0);
}

/* ---- Year header & document items ---- */
.year-header {
  background: rgba(91,106,245,0.06);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  margin: 14px 0 10px 0;
  color: var(--accent, #5B6AF5);
  border: 1px solid rgba(91,106,245,0.08);
  position: relative;
  overflow: hidden;
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.year-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent, #5B6AF5);
  border-radius: 0 2px 2px 0;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.04));
  transition: var(--transition);
  border-radius: 10px;
  margin-bottom: 2px;
}

.document-item:hover {
  background: rgba(91,106,245,0.04);
  transform: translateX(3px);
}

.document-item:last-child { border-bottom: 0; }

.doc-date {
  background: rgba(91,106,245,0.08);
  color: var(--accent, #5B6AF5);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.doc-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  flex: 1 1 auto;
  text-decoration: none;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-decoration: none;
  color: inherit;
}
.doc-link:hover { text-decoration: none; color: inherit; }

/* ---- Quota ---- */
.quota-container {
  position: relative;
  margin: 0;
  width: 100%;
  background: rgba(91,106,245,0.04);
  border-radius: 14px;
  padding: 16px;
}

.quota-bar {
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.quota-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}

.quota-fill.warning { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); }
.quota-fill.danger { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
.quota-fill::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(248,250,252,0.35), transparent);
  animation: shimmer 2s infinite;
}

.quota-text { font-size: 14px; color: var(--accent, #5B6AF5); margin-bottom: 12px; font-weight: 600; }
.quota-warning {
  color: #dc3545;
  margin-top: 12px;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(220,53,69,0.08);
  border-radius: 10px;
  border-left: 3px solid #dc3545;
}

/* ---- Modal (my-modal) ---- */
.my-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  z-index: 1000;
}

.my-modal.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px;
}

.my-modal-content {
  width: 92%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(17,24,39,0.12), 0 8px 24px rgba(0,0,0,0.08);
  animation: fadeIn .3s ease-out;
  margin: 0 auto;
  max-height: 90vh;
  overflow-y: auto;
}

.my-modal .close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-light, rgba(91,106,245,0.08));
  font-size: 18px;
  color: var(--accent, #5B6AF5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.my-modal .close:hover {
  background: var(--accent, #5B6AF5);
  color: #fff;
  transform: scale(1.05);
}

.my-modal h4 {
  font-weight: 700;
  margin: 0 0 20px;
  color: #111827;
  font-size: 18px;
}

.my-modal .form-control {
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 10px;
  padding: 11px 14px;
  background: var(--surface, #fff);
  transition: var(--transition);
  margin-bottom: 14px;
  width: 100%;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 14px;
}

.my-modal .form-control:focus {
  border-color: var(--accent, #5B6AF5);
  box-shadow: 0 0 0 3px rgba(91,106,245,0.1);
  outline: none;
}

.my-modal .btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 20px;
  transition: var(--transition);
  border: none;
  font-family: 'DM Sans', -apple-system, sans-serif;
}

.my-modal .btn-primary {
  background: var(--accent, #5B6AF5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(91,106,245,0.2);
}

.my-modal .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91,106,245,0.3);
  background: var(--accent-hover, #4550E0);
}

.my-modal .btn-danger {
  background: #dc3545;
  color: #fff;
  box-shadow: 0 4px 14px rgba(220,53,69,0.2);
}

.my-modal .btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220,53,69,0.3);
}

/* ---- Loader overlay ---- */
.loader-overlay {
  position: fixed;
  inset: 0;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(248,250,252,.88);
  backdrop-filter: blur(16px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.loader-overlay.show { opacity: 1; pointer-events: auto; }

.loader-dots {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.loader-dots span {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent, #5B6AF5);
  opacity: .3;
  animation: beat 1.2s infinite;
}
.loader-dots span:nth-child(2) { animation-delay: .2s; }
.loader-dots span:nth-child(3) { animation-delay: .4s; }

.loader-text {
  font-weight: 600;
  font-size: 15px;
  color: var(--accent, #5B6AF5);
  letter-spacing: .3px;
}

/* ---- Animations ---- */
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98) translateY(4px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes beat { 50% { transform: translateY(-6px); opacity: 1; } }

/* ---- Alerts ---- */
.alert {
  border-radius: 12px;
  border: none;
  padding: 12px 16px;
  margin: 10px 0;
  font-weight: 500;
  font-size: 14px;
}

.alert-success {
  background: rgba(40,167,69,0.08);
  color: #155724;
  border-left: 3px solid #28a745;
}

.alert-danger {
  background: rgba(220,53,69,0.08);
  color: #721c24;
  border-left: 3px solid #dc3545;
}

/* ---- Bootstrap form-control override ---- */
.form-control {
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'DM Sans', -apple-system, sans-serif;
  transition: var(--transition);
  background: var(--surface, #fff);
}

.form-control:focus {
  border-color: var(--accent, #5B6AF5);
  box-shadow: 0 0 0 3px rgba(91,106,245,0.1);
  outline: none;
}

/* ---- Tables (Bootstrap override) ---- */
.table { font-family: 'DM Sans', -apple-system, sans-serif; font-size: 14px; }
.table > thead > tr > th {
  border-bottom: 2px solid rgba(91,106,245,0.12);
  color: #334155;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  background: rgba(91,106,245,0.03);
}
.table > tbody > tr > td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.04));
  vertical-align: middle;
  color: #374151;
}
.table > tbody > tr:hover > td {
  background: rgba(91,106,245,0.03);
}
.table-striped > tbody > tr:nth-of-type(odd) > td {
  background: rgba(91,106,245,0.02);
}

/* ---- Bootstrap btn overrides ---- */
.btn { font-family: 'DM Sans', -apple-system, sans-serif; border-radius: 10px; font-weight: 600; transition: var(--transition); }
.btn-primary { background: #5B6AF5; border-color: #5B6AF5; }
.btn-primary:hover, .btn-primary:focus { background: #4550E0; border-color: #4550E0; box-shadow: 0 4px 12px rgba(91,106,245,.2); }
.btn-success { background: #059669; border-color: #059669; }
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-danger { background: #dc3545; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; border-color: #c82333; }
.btn-info { background: #5B6AF5; border-color: #5B6AF5; color: #fff; }
.btn-info:hover { background: #4550E0; border-color: #4550E0; color: #fff; }
.btn-default, .btn-secondary {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  color: #374151;
}
.btn-default:hover, .btn-secondary:hover {
  background: var(--surface-raised, #F9FAFB);
  color: #111827;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .docs-grid { grid-template-columns: 1fr; }
  .grid { padding: 0 16px; }
  .grid > * { width: 100%; }
}

@media (max-width: 768px) {
  .index-content {
    left: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }
  .index-content > .scroll { padding: 16px 0 80px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .overview-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: stretch; }
}

@media (max-width: 900px) {
  .section-overview.modern-section { min-height: 130px; }
  .stat-card { min-height: 90px; }
}

@media (max-width: 540px) {
  .index-content > .scroll { padding-bottom: 96px; }
}

.modern-section, .grid, .index-content {
  max-width: 100%;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════
   UNIFIED BLOCK — Transparent: panel provides the surface
   ═══════════════════════════════════════════════════ */
body .index-content .grid {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 28px !important;
    overflow: visible !important;
}

/* Strip individual card styling from sections inside .grid */
body .index-content .grid .docs-grid .modern-section,
body .index-content .grid > .modern-section:not(.section-overview) {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 24px 4px !important;
    margin: 0 !important;
}
body .index-content .grid .docs-grid .modern-section:hover,
body .index-content .grid > .modern-section:not(.section-overview):hover {
    transform: none;
    box-shadow: none !important;
    background: transparent !important;
}

/* Also strip .version-block glass for updates page */
body .index-content .grid .version-block {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
}
body .index-content .grid .version-block:hover {
    box-shadow: none !important;
}
body .index-content .grid .version-block + .version-block {
    border-top: 1px solid rgba(0,0,0,0.04) !important;
}

/* Subtle divider between sections */
body .index-content .grid .docs-grid .modern-section + .modern-section,
body .index-content .grid > .modern-section:not(.section-overview) + .modern-section:not(.section-overview) {
    border-top: 1px solid rgba(0,0,0,0.04) !important;
}

/* Hero banners: smaller radius to nest inside container */
body .index-content .grid [class$="-hero"] {
    border-radius: var(--r-lg, 18px);
}

/* Docs-grid: generous spacing */
body .index-content .grid .docs-grid {
    gap: 0 !important;
    column-gap: 40px !important;
}

/* Vertical divider between left/right columns on desktop */
@media (min-width: 1025px) {
    body .index-content .grid .docs-grid {
        position: relative;
    }
    body .index-content .grid .docs-grid::after {
        content: '';
        position: absolute;
        top: 0; bottom: 0;
        left: 50%;
        width: 1px;
        background: rgba(0,0,0,0.04);
    }
}

/* Mobile: adjust unified block padding */
@media (max-width: 768px) {
    body .index-content .grid {
        padding: 20px !important;
        border-radius: 0 !important;
    }
    body .index-content .grid [class$="-hero"] {
        border-radius: 16px;
    }
}
@media (max-width: 600px) {
    body .index-content .grid {
        padding: 16px !important;
        border-radius: 0 !important;
    }
    body .index-content .grid [class$="-hero"] {
        border-radius: 14px;
    }
}
