/* =============================================
   Luma TV Edge Dashboard — Visual Enhancement Layer
   Loaded LAST. Purely additive: overrides only visual
   properties (gradients, shadows, glow, animations).
   ZERO layout or functional changes.
   ============================================= */

/* ── Ambient Background Enhancement ── */
body {
  background:
    radial-gradient(ellipse 60% 50% at 85% -5%, rgba(57,217,138,.08), transparent 50%),
    radial-gradient(ellipse 50% 60% at 5% 105%, rgba(72,117,255,.055), transparent 45%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(57,217,138,.015), transparent 60%),
    var(--bg) !important;
}

/* ── Login Page Premium ── */
.login-view {
  background:
    radial-gradient(circle at 30% 20%, rgba(57,217,138,.12), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(72,117,255,.08), transparent 35%),
    var(--bg) !important;
  position: relative;
}
.login-view::before {
  content: "";
  position: fixed;
  width: 600px;
  height: 600px;
  top: -200px;
  right: -150px;
  background: radial-gradient(circle, rgba(57,217,138,.07), transparent 70%);
  border-radius: 50%;
  animation: ambient-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}
.login-view::after {
  content: "";
  position: fixed;
  width: 500px;
  height: 500px;
  bottom: -180px;
  left: -100px;
  background: radial-gradient(circle, rgba(72,117,255,.06), transparent 70%);
  border-radius: 50%;
  animation: ambient-drift 15s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}
@keyframes ambient-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

.login-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(148,163,184,.12) !important;
  box-shadow:
    0 32px 80px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.03) inset,
    0 1px 0 rgba(255,255,255,.04) inset !important;
  backdrop-filter: blur(40px) saturate(130%);
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57,217,138,.4), transparent);
  border-radius: 1px;
}

/* ── Auth Bootstrap ── */
.auth-bootstrap-card {
  border: 1px solid rgba(148,163,184,.08);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  backdrop-filter: blur(30px);
}

/* ── Sidebar Enhancement ── */
.sidebar.premium-sidebar {
  background:
    linear-gradient(180deg, rgba(14,19,28,.98) 0%, rgba(10,14,20,.99) 100%) !important;
  backdrop-filter: blur(32px) saturate(150%) !important;
  box-shadow:
    1px 0 0 rgba(148,163,184,.06),
    8px 0 32px rgba(0,0,0,.15) !important;
}

.premium-sidebar .nav-item {
  position: relative;
}
.premium-sidebar .nav-item.active {
  border-color: rgba(57,217,138,.22) !important;
  background:
    linear-gradient(90deg, rgba(57,217,138,.18) 0%, rgba(57,217,138,.06) 60%, transparent 100%) !important;
  box-shadow:
    inset 2px 0 0 #39d98a,
    0 4px 16px rgba(57,217,138,.08) !important;
}
.premium-sidebar .nav-item:hover:not(.active) {
  background:
    linear-gradient(90deg, rgba(255,255,255,.05) 0%, transparent 70%) !important;
}

/* Sidebar subtle accent line at top */
.sidebar.premium-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57,217,138,.25), transparent);
  pointer-events: none;
  z-index: 10;
}

/* Brand logo glow */
.brand-logo-sidebar {
  filter: drop-shadow(0 0 8px rgba(247,215,132,.15));
  transition: filter .3s ease;
}
.premium-sidebar:hover .brand-logo-sidebar {
  filter: drop-shadow(0 0 12px rgba(247,215,132,.22));
}

/* ── Topbar Enhancement ── */
.topbar {
  background:
    rgba(8,11,16,.82) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset !important;
}

/* ── Card & Panel Glow ── */
.card,
.panel,
.admin-grid-panel,
.settings-card,
.dashboard-section {
  position: relative;
  border-color: rgba(148,163,184,.13) !important;
  box-shadow:
    var(--shadow-sm),
    0 1px 0 rgba(255,255,255,.025) inset !important;
  transition: border-color .25s ease, box-shadow .25s ease !important;
}

/* ── Metric Cards Enhancement ── */
.metric {
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease !important;
}
.metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.metric:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 12px 32px rgba(0,0,0,.25),
    0 0 20px rgba(57,217,138,.06) !important;
  border-color: rgba(57,217,138,.15) !important;
}
.metric:hover::before {
  opacity: 1;
}

/* ── Button Shine Effect ── */
.button.primary,
.toolbar-btn.primary {
  position: relative;
  overflow: hidden;
}
.button.primary::after,
.toolbar-btn.primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,.15) 45%,
    rgba(255,255,255,.25) 50%,
    rgba(255,255,255,.15) 55%,
    transparent 60%
  );
  transform: skewX(-20deg);
  transition: left .5s ease;
  pointer-events: none;
}
.button.primary:hover::after,
.toolbar-btn.primary::after {
  left: 120%;
}

/* Secondary button refinement */
.button.secondary:hover,
.toolbar-btn:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.15) !important;
}

/* Icon button glow */
.icon-button {
  transition: transform .14s ease, color .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease !important;
}
.icon-button:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.2) !important;
}

/* ── Table Enhancement ── */
tbody tr {
  position: relative;
  transition: background .18s ease, box-shadow .18s ease !important;
}
tbody tr:hover {
  background: rgba(57,217,138,.03) !important;
}
thead th {
  background:
    linear-gradient(180deg, #111924, #0f1721) !important;
  letter-spacing: .1em !important;
}

/* ── Dialog Enhancement ── */
dialog::backdrop {
  background:
    rgba(0,3,8,.78) !important;
  backdrop-filter: blur(12px) !important;
  animation: backdrop-in .22s ease both !important;
}
.modal {
  border-color: rgba(148,163,184,.18) !important;
  box-shadow:
    0 40px 120px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.03) inset !important;
}
.modal[open],
.access-create-dialog[open],
.access-success-dialog[open] {
  animation: dialog-in .25s cubic-bezier(.16,.9,.2,1) both !important;
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* Modal head top accent line */
.modal-head {
  position: relative;
}
.modal-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, rgba(57,217,138,.25), transparent);
  pointer-events: none;
}

/* Access create dialog glow */
.access-create-dialog {
  box-shadow:
    0 40px 110px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.035) inset,
    0 0 80px rgba(57,217,138,.04) !important;
}
.access-create-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(57,217,138,.3), transparent 80%);
  pointer-events: none;
}

/* Success dialog enhanced */
.access-success-dialog {
  box-shadow:
    0 40px 110px rgba(0,0,0,.6),
    0 0 0 1px rgba(57,217,138,.1),
    0 0 60px rgba(57,217,138,.06) !important;
}
.access-success-mark {
  box-shadow:
    0 0 0 9px rgba(57,217,138,.06),
    0 0 30px rgba(57,217,138,.12) !important;
}

/* ── Toast Enhancement ── */
.toast-item {
  box-shadow:
    0 16px 48px rgba(0,0,0,.4),
    0 0 0 1px rgba(57,217,138,.08) inset !important;
  backdrop-filter: blur(16px);
}
.toast-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(57,217,138,.3), transparent);
  border-radius: 0 0 11px 11px;
}
.toast-item.error::after {
  background: linear-gradient(90deg, rgba(255,113,129,.3), transparent);
}

/* ── Form Input Enhancement ── */
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  box-shadow:
    0 0 0 3px rgba(57,217,138,.1),
    0 4px 16px rgba(57,217,138,.06) !important;
}

/* Access fields focus glow */
.access-fields input:focus,
.access-fields select:focus,
.access-fields textarea:focus {
  box-shadow:
    0 0 0 3px rgba(57,217,138,.1),
    0 4px 20px rgba(57,217,138,.08) !important;
}

/* ── Scrollbar Global Enhancement ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(148,163,184,.15);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148,163,184,.3);
  background-clip: content-box;
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.15) transparent;
}

/* ── Selection Enhancement ── */
::selection {
  color: #04110a;
  background: rgba(118, 233, 178, .85);
}

/* ── Focus Ring Enhancement ── */
:focus-visible {
 outline-color: rgba(120, 232, 177, .7) !important;
  outline-width: 2px !important;
  outline-offset: 3px;
}

/* ── Ops Workspace Enhancement ── */
.ops-workspace {
  box-shadow:
    0 24px 64px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.03),
    0 0 60px rgba(57,217,138,.02) !important;
}
.ops-workspace::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(85,217,154,.3), transparent);
  pointer-events: none;
  z-index: 1;
}
.ops-workspace::after {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(85,217,154,.5), transparent) !important;
}

.ops-editor {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 16px 40px rgba(0,0,0,.2),
    0 0 40px rgba(57,217,138,.02) !important;
}

.ops-switch-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* ── Skeleton Shimmer Enhancement ── */
.skeleton::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,.035) 40%,
    rgba(255,255,255,.06) 50%,
    rgba(255,255,255,.035) 60%,
    transparent 100%
  ) !important;
}

/* ── Status Badge Enhancement ── */
.pill.active,
.status-chip.active,
.badge.active {
  box-shadow: 0 0 12px rgba(57,217,138,.1);
}

/* ── Reseller Credit Modal Enhancement ── */
.reseller-credits-modal {
  box-shadow:
    0 40px 120px rgba(0,0,0,.55),
    0 0 0 1px rgba(248,193,92,.06) inset !important;
}

/* ── Credit Request Notice ── */
.credit-request-notice {
  position: relative;
  overflow: hidden;
}
.credit-request-notice::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--warning), rgba(248,193,92,.3));
  border-radius: 0 2px 2px 0;
}

/* ── Access Mode Switch Enhancement ── */
.access-mode-switch {
  box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
}
.access-mode-switch button.active {
  box-shadow:
    0 6px 20px rgba(57,217,138,.2),
    0 0 0 1px rgba(57,217,138,.1) inset !important;
}

/* ── Compact Modal Top Accent ── */
.compact-modal .modal-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 20px;
  width: 60px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  pointer-events: none;
}

/* ── Ticket Thread Modal Enhancement ── */
.ticket-thread-modal {
  box-shadow:
    0 40px 120px rgba(0,0,0,.55),
    0 0 0 1px rgba(110,168,254,.06) inset !important;
}

/* ── Admin Grid Toolbar Enhancement ── */
.admin-grid-toolbar {
  box-shadow:
    var(--shadow-sm),
    0 1px 0 rgba(255,255,255,.025) inset !important;
}

/* ── Pager Active Enhancement ── */
.pager-page.active {
  box-shadow: 0 2px 8px rgba(57,217,138,.2) !important;
}

/* ── Access Input Action Button Enhancement ── */
.access-input-action button {
  transition: all .18s ease !important;
}
.access-input-action button:hover {
  box-shadow: 0 4px 14px rgba(57,217,138,.12) !important;
}

/* ── Form Section Title Enhancement ── */
.form-section-title span {
  box-shadow: 0 0 0 2px rgba(57,217,138,.08) !important;
}

/* ── Domain Thread Modal Blue Accent ── */
.domain-thread-modal .modal-head::after {
  background: linear-gradient(90deg, rgba(110,168,254,.3), transparent) !important;
}

/* ── Disabled User Row Enhancement ── */
.user-management-table .status-toggle.disabled {
  box-shadow: 0 6px 20px rgba(220,63,85,.22) !important;
}

/* ── Empty Card Enhancement ── */
.empty.card {
  border-style: dashed !important;
  border-color: rgba(148,163,184,.1) !important;
}

/* ── User Settings Summary Enhancement ── */
.settings-avatar {
  background: linear-gradient(135deg, rgba(57,217,138,.2), rgba(57,217,138,.08)) !important;
  box-shadow: 0 0 0 2px rgba(57,217,138,.12) !important;
}

/* ── Grid Two / Form Grid Enhancement ── */
.grid-two label,
.form-grid.two label {
  transition: transform .15s ease;
}
.grid-two label:hover,
.form-grid.two label:hover {
  transform: translateY(-1px);
}

/* ── Responsive: Keep enhancements on mobile ── */
@media (max-width: 1100px) {
  .sidebar.premium-sidebar.open {
    box-shadow:
      1px 0 0 rgba(148,163,184,.06),
      32px 0 100px rgba(0,0,0,.5) !important;
  }
}

@media (max-width: 560px) {
  .login-view::before,
  .login-view::after {
    width: 300px;
    height: 300px;
  }
}

/* ── Reduced Motion: Keep it classy ── */
@media (prefers-reduced-motion: reduce) {
  .login-view::before,
  .login-view::after { animation: none; }
  .button.primary::after,
  .toolbar-btn.primary::after { display: none; }
  .metric { transition: none !important; }
}

/* ── Wide Modal Enhancement ── */
.wide-modal {
  box-shadow:
    0 44px 130px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.03) inset !important;
}

/* ── Edit Details Modal Enhancement ── */
.edit-details-modal .settings-user-summary {
  background: linear-gradient(135deg, rgba(57,217,138,.04), transparent) !important;
  border: 1px solid rgba(57,217,138,.08) !important;
  border-radius: 12px;
}

/* ── Sidebar Footer Enhancement ── */
.sidebar-logout:hover {
  box-shadow: 0 2px 10px rgba(255,113,129,.08) !important;
}

/* ── Sidebar Collapse Button Enhancement ── */
.sidebar-collapse:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
}

/* ── Page Heading Eyebrow Enhancement ── */
.page-heading .eyebrow {
  text-shadow: 0 0 20px rgba(57,217,138,.2);
}

/* ── Access Success Actions Copied State ── */
.access-success-actions .button.is-copied {
  box-shadow: 0 8px 28px rgba(57,217,138,.25) !important;
}
