:root{
  --font: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Theme variables (dark default) */
  --bg: #0b1220;
  --bg-2: #0a1020;
  --card: rgba(255,255,255,0.06);
  --card-2:  rgb(12 15 24 / 90%);
  --border: rgba(148,163,184,0.18);

  --text: #e5e7eb;
  --text-soft: rgba(229,231,235,0.78);
  --text-muted: rgba(229,231,235,0.62);

  --sidebar-bg: rgba(2,6,23,0.72);
  --sidebar-border: rgba(255,255,255,0.08);

  --topbar-bg: rgba(2,6,23,0.35);
  --footer-bg: rgba(2,6,23,0.55);

  --accent: #4f46e5;
  --accent-2: #ec4899;

  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;

  --shadow: 0 20px 45px rgba(0,0,0,0.35);

  --radius: 18px;
  --radius-sm: 14px;

  --icon: rgba(229,231,235,0.82);
  --icon-soft: rgba(229,231,235,0.58);

  --input-bg: rgba(255,255,255,0.07);
  --input-border: rgba(148,163,184,0.20);

  --btn-text: #ffffff;
}

html[data-theme="light"]{
  /* Light mode fixes: high contrast */
  --bg: #f6f7fb;
  --bg-2: #eef1f8;
  --card: #ffffff;
  --card-2: #ffffff;
  --border: rgba(15,23,42,0.10);

  --text: #0f172a;
  --text-soft: rgba(15,23,42,0.78);
  --text-muted: rgba(15,23,42,0.58);

  --sidebar-bg: #ffffff;
  --sidebar-border: rgba(15,23,42,0.10);

  --topbar-bg: rgba(255,255,255,0.82);
  --footer-bg: rgba(255,255,255,0.72);

  --icon: rgba(15,23,42,0.80);
  --icon-soft: rgba(15,23,42,0.58);

  --input-bg: rgba(15,23,42,0.04);
  --input-border: rgba(15,23,42,0.14);

  --btn-text: #ffffff;
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 18% 16%, rgba(79,70,229,0.24), transparent 60%),
    radial-gradient(1000px 650px at 84% 18%, rgba(236,72,153,0.18), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

a{ color: inherit; text-decoration: none; }
button{ font-family: var(--font); }
img{ max-width: 100%; display:block; }

.app{
  min-height:100vh;
  display:flex;
}

.main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.content-scroll{
  padding: 1.2rem 1.2rem 2rem;
}

/* Sidebar */
.sidebar{
  width: 290px;
  min-width: 290px;
  padding: 0.9rem;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  backdrop-filter: blur(20px);
  position: sticky;
  top:0;
  height: 100vh;
  overflow: hidden;
  z-index: 20;
  transition: width .25s ease, transform .25s ease;
}

.sidebar-header{
  display:flex;
  align-items:center;
  gap:0.8rem;
  padding: 0.6rem 0.4rem 0.9rem;
  position: relative;
}

.sidebar-logo{
  width:44px;
  height:44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(79,70,229,0.95), rgba(236,72,153,0.75));
  box-shadow: 0 12px 22px rgba(79,70,229,0.22);
  position: relative;
  overflow:hidden;
}

.sidebar-logo-text{
  color:#fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 14px;
}

.sidebar-logo-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  display:none;
}

.sidebar-title{
  display:flex;
  flex-direction:column;
  gap:0.1rem;
  min-width:0;
}
.sidebar-title span:first-child{
  font-weight:700;
  font-size: 13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebar-title span:last-child{
  font-size: 11px;
  color: var(--text-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.sidebar-close-btn{
  position:absolute;
  right: 0.35rem;
  top: 0.5rem;
  display:none !important; /* desktop hidden */
}


.sidebar-nav{
  margin-top: 0.2rem;
  display:flex;
  flex-direction:column;
  gap:0.25rem;
  padding-right: 0.1rem;
  height: calc(100vh - 190px);
  overflow:auto;
}

.sidebar-nav::-webkit-scrollbar{ width: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb{ background: rgba(148,163,184,0.25); border-radius: 999px; }

.sidebar-nav-section-label{
  margin-top: 0.75rem;
  margin-bottom: 0.2rem;
  padding: 0.2rem 0.5rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.nav-item{
  display:flex;
  align-items:center;
  gap:0.75rem;
  padding: 0.7rem 0.7rem;
  border-radius: 14px;
  color: var(--text-soft);
  transition: background .18s ease, transform .18s ease, color .18s ease;
  border: 1px solid transparent;
}
.nav-item i{
  width: 18px;
  text-align:center;
  color: var(--icon);
}
.nav-item:hover{
  background: rgba(79,70,229,0.12);
  transform: translateY(-1px);
  color: var(--text);
}
.nav-item.active{
  background: rgba(79,70,229,0.18);
  border-color: rgba(79,70,229,0.35);
  color: var(--text);
}

.sidebar-footer{
  margin-top: 0.6rem;
  padding: 0.8rem 0.6rem;
  border-top: 1px solid var(--sidebar-border);
  display:flex;
  flex-direction:column;
  gap:0.3rem;
  color: var(--text-muted);
  font-size: 12px;
}
.sidebar-plan-pill{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  width: fit-content;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-soft);
  background: rgba(255,255,255,0.04);
}

/* Collapsed */
body.sidebar-collapsed .sidebar{
  width: 86px;
  min-width: 86px;
}
body.sidebar-collapsed .sidebar-title,
body.sidebar-collapsed .sidebar-nav-section-label,
body.sidebar-collapsed .sidebar-footer span{
  display:none;
}
body.sidebar-collapsed .nav-item span{
  display:none;
}
body.sidebar-collapsed .nav-item{
  justify-content:center;
}
body.sidebar-collapsed .sidebar-footer{
  align-items:center;
}
body.sidebar-collapsed .sidebar-plan-pill{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  justify-content:center;
  padding:0;
}

/* Topbar */
.topbar{
  position: sticky;
  top:0;
  z-index: 10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0.85rem 1.2rem;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.topbar-left{
  display:flex;
  align-items:flex-start;
  gap:0.9rem;
  min-width:0;
}
.topbar-title{
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.topbar-subtitle{
  margin-top: 0.15rem;
  font-size: 12px;
  color: var(--text-muted);
}
.topbar-breadcrumb{
  margin-top: 0.35rem;
  font-size: 11px;
  color: var(--text-muted);
  display:flex;
  align-items:center;
  gap: 0.4rem;
}
.breadcrumb-separator{ opacity:0.65; }

.topbar-right{
  display:flex;
  align-items:center;
  gap:0.6rem;
}
.topbar-search{
  width: 280px;
}

.search-input{
  display:flex;
  align-items:center;
  gap:0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-soft);
}
.search-input i{ color: var(--icon-soft); }
.search-input input{
  border:none;
  outline:none;
  background: transparent;
  color: var(--text);
  width:100%;
}
.search-input input::placeholder{ color: var(--text-muted); }

/* Buttons */
.icon-button{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--icon);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.icon-button:hover{ transform: translateY(-1px); border-color: rgba(79,70,229,0.35); background: rgba(79,70,229,0.10); }

.btn-primary, .btn-soft{
  /*display:inline-flex; */ 
  align-items:center;
  gap:0.55rem;
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  border: .0px solid transparent;
  cursor:pointer;
  font-weight: 600;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn-primary{
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--btn-text);
  box-shadow: 0 16px 30px rgba(79,70,229,0.22);
}
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 18px 36px rgba(79,70,229,0.28); }
.btn-soft{
     border: 1px solid transparent;
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="light"] .btn-soft{
  background: rgba(15,23,42,0.04);
}
.btn-soft:hover{ transform: translateY(-1px); border-color: rgba(79,70,229,0.35); background: rgba(79,70,229,0.08); }

.btn-xs{ padding: 0.55rem 0.75rem; border-radius: 12px; font-size: 12px; }

/* Profile */
.profile-wrapper{ position: relative; }
.profile-chip{
  display:flex;
  align-items:center;
  gap:0.65rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  cursor:pointer;
  color: var(--text);
}
.profile-avatar{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(79,70,229,0.22);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  color: var(--text);
}
.profile-text{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height: 1.1;
}
.profile-text span:first-child{ font-size: 12px; font-weight: 700; }
.profile-text span:last-child{ font-size: 10px; color: var(--text-muted); }
.profile-chevron{ color: var(--icon-soft); font-size: 12px; }

.profile-menu{
  position:absolute;
  right:0;
  top: 56px;
  width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow:hidden;
  display:none;
}
.profile-menu.open{ display:block; }
.profile-menu-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:0.6rem;
  padding: 0.75rem 0.85rem;
  background: rgb(14 13 13 / 78%);
  border:none;
  color: var(--text);
  cursor:pointer;
  font-size: 13px;
}
.profile-menu-item:hover{ background: rgba(79,70,229,0.10); }

/* Cards & layout */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0 0 10px 0;
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
}
.card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.card-title{ font-weight: 800; font-size: 15px; }
.card-subtitle{ font-size: 12px; color: var(--text-muted); margin-top: 0.15rem; }
.card-actions{ display:flex; align-items:center; gap: 0.5rem; }

.content-grid{
  display:grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.stats-row{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.stat-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
}
.stat-label{ font-size: 12px; color: var(--text-muted); }
.stat-value-row{
  margin-top: 0.55rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.stat-value{ font-weight: 800; font-size: 20px; }
.stat-value-row i{ color: var(--icon-soft); }

.hero-card{
  background: linear-gradient(135deg, rgba(79,70,229,0.22), rgba(236,72,153,0.14));
  border: 1px solid rgba(79,70,229,0.22);
  border-radius: var(--radius);
  padding: 1rem;
}
.hero-inner{
  display:grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 1rem;
  align-items:stretch;
}
.hero-title{
  font-weight: 900;
  font-size: 20px;
}
.hero-subtitle{
  margin-top: 0.25rem;
  font-size: 12px;
  color: var(--text-soft);
}
.hero-metrics{
  display:flex;
  gap: 0.8rem;
  margin-top: 0.9rem;
  flex-wrap:wrap;
}
.metric{
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(2,6,23,0.24);
  min-width: 140px;
}
html[data-theme="light"] .metric{
  background: rgba(255,255,255,0.78);
  border-color: rgba(15,23,42,0.10);
}
.metric-label{ font-size: 11px; color: var(--text-muted); }
.metric-value{ font-weight: 900; font-size: 18px; }

.hero-cta-row{
  display:flex;
  gap: 0.7rem;
  margin-top: 1rem;
  flex-wrap:wrap;
}

.hero-mini-chart{
  background: rgba(2,6,23,0.26);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 0.9rem;
}
html[data-theme="light"] .hero-mini-chart{
  background: rgba(255,255,255,0.72);
  border-color: rgba(15,23,42,0.10);
}
.hero-mini-chart-header{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom: 0.5rem;
}
.hero-mini-chart-value{ font-weight: 800; }
.hero-mini-chart-meta{ font-size: 12px; color: var(--text-muted); }

.chart-wrapper{
  width:100%;
  height: 300px;
}
.chart-wrapper.mini{ height: 160px; }

.table-wrapper{
  width: 100%;
  overflow:auto;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
}
table{
  width:100%;
  border-collapse: collapse;
  min-width: 620px;
  background: transparent;
}
thead th{
  font-size: 12px;
  color: var(--text-muted);
  text-align:left;
  padding: 0.75rem 0.85rem;
  background: rgba(255,255,255,0.03);
}
html[data-theme="light"] thead th{
  background: rgba(15,23,42,0.03);
}
tbody td{
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
tbody tr:hover{ background: rgba(79,70,229,0.07); }

.status-pill{
  display:inline-flex;
  align-items:center;
  gap:0.45rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}
.status-pill.pending{
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.12);
  color: var(--text);
}
.status-pill.active{
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.12);
  color: var(--text);
}
.status-pill.inactive{
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.12);
  color: var(--text);
}

.filters-row{
  display:flex;
  gap: 0.8rem;
  flex-wrap:wrap;
}
.filter-field{
  display:flex;
  flex-direction:column;
  gap: 0.35rem;
  min-width: 260px;
}
.filter-field label{
  font-size: 12px;
  color: var(--text-muted);
}
.filter-field input, .filter-field select{
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline:none;
}
.filter-field input::placeholder{ color: var(--text-muted); }

.form-field{
  display:flex;
  flex-direction:column;
  gap: 0.35rem;
}
.form-field label{
  font-size: 12px;
  color: var(--text-muted);
}
.form-field input, .form-field select{
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline:none;
}
.form-field input::placeholder{ color: var(--text-muted); }
.field-help{
  margin-top: 0.2rem;
  font-size: 11px;
  color: var(--text-muted);
}

.profile-form-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0.9rem;
}
.profile-actions-row{
  display:flex;
  gap: 0.7rem;
  margin-top: 1rem;
  flex-wrap:wrap;
}

.toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
}
.toggle-label{ font-weight: 700; }

/* Switch */
.switch{
  position: relative;
  display:inline-block;
  width: 44px;
  height: 26px;
}
.switch input{ opacity:0; width:0; height:0; }
.slider-toggle{
  position:absolute;
  cursor:pointer;
  top:0; left:0; right:0; bottom:0;
  background: rgba(148,163,184,0.35);
  transition:.18s;
  border-radius: 999px;
}
.slider-toggle:before{
  position:absolute;
  content:"";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  transition:.18s;
  border-radius: 999px;
}
.switch input:checked + .slider-toggle{
  background: rgba(34,197,94,0.65);
}
.switch input:checked + .slider-toggle:before{
  transform: translateX(18px);
}

/* Modal */
.modal-backdrop{
  position: fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(2,6,23,0.55);
  z-index: 60;
  padding: 1.2rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card{
  width: min(780px, 96vw);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-card-wide{ width: min(900px, 98vw); }
.modal-header, .modal-footer{
  padding: 0.9rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.modal-footer{
  border-bottom: none;
  border-top: 1px solid var(--border);
}
.modal-title{ font-weight: 900; }
.modal-subtitle{ font-size: 12px; color: var(--text-muted); margin-top: 0.15rem; }
.modal-body{ padding: 1rem; }
.modal-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 0.8rem;
  flex-wrap:wrap;
  margin-bottom: 0.8rem;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-soft);
  font-size: 12px;
}
html[data-theme="light"] .chip{ background: rgba(15,23,42,0.03); }
.modal-actions{ display:flex; gap: 0.5rem; flex-wrap:wrap; }

.api-list{
  display:flex;
  flex-direction:column;
  gap: 0.6rem;
}
.api-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
html[data-theme="light"] .api-row{ background: rgba(15,23,42,0.02); }
.api-row-left{ display:flex; flex-direction:column; gap: 0.15rem; }
.api-row-name{ font-weight: 800; font-size: 13px; }
.api-row-tag{ font-size: 11px; color: var(--text-muted); }
.api-toggle{
  display:flex;
  align-items:center;
  gap: 0.65rem;
  color: var(--text-soft);
  font-size: 12px;
}

/* Timeline */
.timeline{
  display:flex;
  flex-direction:column;
  gap: 0.65rem;
}
.timeline-item{
  display:flex;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
html[data-theme="light"] .timeline-item{ background: rgba(15,23,42,0.02); }
.timeline-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(79,70,229,0.8);
  margin-top: 0.2rem;
}
.timeline-content{ flex:1; }
.timeline-title{ font-weight: 800; font-size: 13px; }
.timeline-meta{ font-size: 11px; color: var(--text-muted); margin-top: 0.2rem; }

/* Profile blocks */
.profile-main{
  display:flex;
  align-items:center;
  gap: 1rem;
  padding: 0.7rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
html[data-theme="light"] .profile-main{ background: rgba(15,23,42,0.02); }
.profile-avatar-large{
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: rgba(79,70,229,0.20);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 22px;
}
.profile-main-info h2{ margin:0; font-weight: 900; }
.profile-main-info p{ margin: 0.25rem 0 0; color: var(--text-muted); font-size: 12px; }
.profile-tags{ margin-top: 0.55rem; display:flex; gap: 0.5rem; flex-wrap:wrap; }

/* Logo previews */
.logo-preview{
  margin-top: 0.5rem;
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background: rgba(255,255,255,0.03);
}
.logo-preview img{ max-height: 46px; display:none; }

/* Preview mini */
.preview-shell{
  width: 100%;
  height: 200px;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow:hidden;
  display:grid;
  grid-template-columns: 220px 1fr;
  background: var(--card);
}
.preview-sidebar{
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
}
.preview-main{ display:flex; flex-direction:column; }
.preview-topbar{
  height: 46px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
}
.preview-card-row{
  padding: 0.8rem;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0.8rem;
}
.preview-card{
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card-2);
}

/* API cards for admin */
.api-cards-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}
.api-card{
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
}
.api-card-title{
  font-weight: 900;
}
.api-card-subtitle{
  margin-top: 0.2rem;
  font-size: 12px;
  color: var(--text-muted);
}
.api-card-footer{
  margin-top: 0.8rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.api-state{
  display:inline-flex;
  align-items:center;
  gap:0.45rem;
  font-size: 12px;
  color: var(--text-soft);
}
.api-state i{ color: var(--icon-soft); }
.api-disabled{
  opacity:0.55;
  filter: grayscale(0.2);
}
.api-disabled .btn-primary{
  opacity:0.7;
  pointer-events:none;
}

/* Small info cards */
.stack{ display:flex; flex-direction:column; gap: 0.8rem; }
.info-card{
  display:flex;
  gap: 0.8rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
}
html[data-theme="light"] .info-card{ background: var(--card); }
.info-icon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(79,70,229,0.14);
  color: var(--text);
}
html[data-theme="dark"] .info-card{ background: var(--card); }
.info-icon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(79,70,229,0.14);
  color: var(--text);
}
.info-title{ font-weight: 900; }
.info-subtitle{ font-size: 12px; color: var(--text-muted); margin-top: 0.15rem; }

/* Auth */
.auth-body{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  padding: 1.2rem;
}

.sliding-auth{
  width: min(980px, 96vw);
}

.auth-slider-container{
  position: relative;
  width: 100%;
  min-height: 560px;
  border-radius: 24px;
  overflow:hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.form-container{
  position:absolute;
  top:0;
  height:100%;
  transition: all .6s ease-in-out;
}
.sign-in-container {
  left: 0;
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.sign-up-container {
  left: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}


/* when signup is active */
.auth-slider-container.right-panel-active .sign-in-container {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.auth-slider-container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  pointer-events: auto;
}

.overlay-container{
  position:absolute;
  top:0;
  left:50%;
  width:50%;
  height:100%;
  overflow:hidden;
  transition: transform .6s ease-in-out;
  z-index:100;
}
.auth-slider-container.right-panel-active .overlay-container{
  transform: translateX(-100%);
}

.overlay{
  background: linear-gradient(135deg, rgba(79,70,229,0.82), rgba(236,72,153,0.70));
  color:#fff;
  position:relative;
  left:-100%;
  height:100%;
  width:200%;
  transform: translateX(0);
  transition: transform .6s ease-in-out;
}
.auth-slider-container.right-panel-active .overlay{
  transform: translateX(50%);
}

.overlay-panel{
  position:absolute;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  top:0;
  height:100%;
  width:50%;
  transform: translateX(0);
  transition: transform .6s ease-in-out;
  padding: 0 2.2rem;
}

.overlay-left{ transform: translateX(-20%); }
.auth-slider-container.right-panel-active .overlay-left{ transform: translateX(0); }

.overlay-right{
  right:0;
  transform: translateX(0);
}
.auth-slider-container.right-panel-active .overlay-right{
  transform: translateX(20%);
}

/* Center content in overlay panels (your request) */
.overlay-center{
  width: 100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 0.6rem;
}
.overlay-center h2{ margin:0; font-weight: 900; font-size: 24px; }
.overlay-center p{ margin:0; font-size: 13px; opacity: 0.92; max-width: 360px; }

.auth-form-card{
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding: 2rem 2.1rem;
  text-align:center;
}
.auth-title{ margin:0; font-weight: 900; font-size: 24px; }
.auth-subtitle{ margin: 0.35rem 0 1.2rem; font-size: 12px; color: var(--text-muted); }

.auth-form{
  width:100%;
  max-width: 360px;
  display:flex;
  flex-direction:column;
  gap: 0.85rem;
}
.auth-form .form-field{ text-align:left; }
.auth-form .form-field input{
  width:100%;
}
.auth-btn{
  width:100%;
  justify-content:center;
  margin-top: 0.2rem;
}
.auth-link{
  font-size: 12px;
  color: var(--text-soft);
}
.auth-link:hover{ color: var(--text); text-decoration: underline; }
.auth-footer-text{ margin-top: 1rem; font-size: 12px; color: var(--text-muted); }

.overlay-btn{ padding: 0.75rem 1.0rem; border-radius: 16px; }
.auth-divider{ height:1px; width:100%; background: var(--border); margin: 1.2rem 0; }
.auth-links-row{ display:flex; justify-content:center; gap: 0.7rem; }
.auth-info{
  margin-top: 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.12);
  font-size: 12px;
  display:flex;
  align-items:center;
  gap: 0.55rem;
  justify-content:center;
}

.auth-single-card{
  width: min(520px, 96vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* Mobile */
.mobile-backdrop{
  position: fixed;
  inset:0;
  background: rgba(2,6,23,0.55);
  z-index: 19;
  display:none;
}
.mobile-backdrop.open{ display:block; }

@media (max-width: 1100px){
  .stats-row{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content-grid{ grid-template-columns: 1fr; }
  .profile-form-grid{ grid-template-columns: 1fr 1fr; }
  .api-cards-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px){
  .sidebar{
    position: fixed;
    left:0;
    top:0;
    transform: translateX(-110%);
    box-shadow: var(--shadow);
  }
  .sidebar.open{ transform: translateX(0); }
  .sidebar-close-btn{ display:inline-flex; }
  body.sidebar-collapsed .sidebar{
    width: 290px;
    min-width: 290px;
  }
  body.sidebar-collapsed .sidebar-title,
  body.sidebar-collapsed .sidebar-nav-section-label,
  body.sidebar-collapsed .sidebar-footer span{ display:block; }
  body.sidebar-collapsed .nav-item span{ display:inline; }
  body.sidebar-collapsed .nav-item{ justify-content:flex-start; }
  .topbar-search{ display:none; }
  table{ min-width: 520px; }
}

@media (max-width: 600px){
  .profile-form-grid{ grid-template-columns: 1fr; }
  .api-cards-grid{ grid-template-columns: 1fr; }

  /* Auth: switch to stacked */
  .auth-slider-container{
    min-height: unset;
  }
  .overlay-container{ display:none; }
  .form-container{
    position: relative;
    width:100% !important;
    transform:none !important;
    opacity:1 !important;
  }
  .sign-in-container, .sign-up-container{
    left:0;
  }
  .auth-slider-container.right-panel-active .sign-in-container{
    display:none;
  }
  .auth-slider-container:not(.right-panel-active) .sign-up-container{
    display:none;
  }
}


/* ===== App Footer (fixed + shifts with sidebar) ===== */
:root{
  --footer-h: 56px;
}

.content-scroll{
  padding-bottom: calc(2rem + var(--footer-h));
}

.app-footer{
  position: fixed;
  bottom: 0;
  right: 0;
  left: var(--sidebar-w, 280px);
  height: var(--footer-h);
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  backdrop-filter: blur(18px);
  z-index: 9;
  display:flex;
  align-items:center;
}

.dark .app-footer{
  background: rgba(15,18,30,0.62);
}

.app-footer-inner{
  width: 100%;
  padding: 0 1.2rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 0.75rem;
}

.footer-left{
  display:flex;
  align-items:center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 600;
}

.footer-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

.footer-right{
  display:flex;
  align-items:center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-muted{ opacity: 0.9; }

/* Sidebar width variable used by footer */
:root{ --sidebar-w: 290px; }
body.sidebar-collapsed{ --sidebar-w: 92px; }

@media (max-width: 900px){
  .app-footer{ left: 0; }
}
/*Colour choose theme */
.form-field input[type="color"]{
  height: 46px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  cursor: pointer;
}

.form-field input[type="color"]::-webkit-color-swatch{
  border: none;
  border-radius: 10px;
}

.form-field input[type="color"]::-webkit-color-swatch-wrapper{
  padding: 0;
}

/* Mobile-only sidebar close button: show only when sidebar is open */
@media (max-width: 900px){
  .sidebar-close-btn{ display:none; }
  .sidebar.open .sidebar-close-btn{ display:inline-flex; }
}


@media (max-width: 900px){
  .sidebar-close-btn{ display:inline-flex !important; }
}


/* ===== Patch: logic-only visibility for sidebar close (X) ===== */
#sidebarCloseBtn{ display:none !important; }
@media (max-width: 900px){
  body.sidebar-open #sidebarCloseBtn,
  .sidebar.open #sidebarCloseBtn{ display:inline-flex !important; }
}

/* ===== Patch: mobile friendliness (no redesign) ===== */
@media (max-width: 900px){
  .topbar{ flex-wrap: wrap; gap: .75rem; }
  .topbar-left{ width: 100%; }
  .topbar-right{ width: 100%; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
  .search-wrap{ flex: 1 1 240px; width: 100%; }
  .search-wrap input{ width: 100%; }
  .hero-inner{ display:block !important; }
  .stats-row{ grid-template-columns: 1fr !important; }
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr !important; }
  .table{ display:block; overflow-x:auto; -webkit-overflow-scrolling: touch; }
}

/* Prevent accidental horizontal overflow on small screens */
html, body{ overflow-x: hidden; }


/* =========================================================
   VISION SUITE PATCH: Theme toggle icons + footer vars + cleanup
   Paste at END of your CSS file
========================================================= */

/* --- Theme toggle icon behavior --- */
/* Default: dark mode => show moon */
.theme-toggle-btn { position: relative; }
.theme-toggle-btn .theme-icon-sun,
.theme-toggle-btn .theme-icon-moon { display: none; }

/* Dark => show moon */
html[data-theme="dark"] .theme-toggle-btn .theme-icon-moon { display: inline-flex; }
/* Light => show sun */
html[data-theme="light"] .theme-toggle-btn .theme-icon-sun { display: inline-flex; }

/* If data-theme missing, treat as dark (fallback) */
html:not([data-theme]) .theme-toggle-btn .theme-icon-moon { display: inline-flex; }

/* --- Footer variable fixes (your CSS used wrong vars) --- */
.footer-dot { background: var(--accent) !important; }
.footer-right { color: var(--text-muted) !important; }

/* Remove unused .dark hook (your theme is driven by html[data-theme]) */
.dark .app-footer { background: var(--footer-bg) !important; }

/* --- Sidebar close button cleanup (X icon only on mobile + only when open) --- */
#sidebarCloseBtn { display: none !important; }
@media (max-width: 900px) {
  body.sidebar-open #sidebarCloseBtn,
  .sidebar.open #sidebarCloseBtn {
    display: inline-flex !important;
  }
}

/* --- Optional: smoother mode transition (no redesign) --- */
body, .sidebar, .topbar, .card, .app-footer {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}





/* ===== Theme + Footer small fixes (APPEND ONLY) ===== */
:root{
  /* You use these in footer but they were not defined */
  --primary: var(--accent);
  --muted: var(--text-muted);
}

/* Ensure dark mode is default when no attribute is present */
html:not([data-theme]){
  --bg: #0b1220;
}

/* Make theme icon consistent (FontAwesome) */
[data-theme-toggle] i{
  line-height: 1;
}

/* Optional: if any old .dark selectors exist, keep compatible */
html[data-theme="dark"] .app-footer{
  background: var(--footer-bg);
}









/* FILE: assets/css/style.css  (ADD THIS PATCH AT END) */

/* ===== API Controls page (no redesign, only helpers) ===== */
.vs-tabs{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin-top:.75rem;
  padding: .35rem .35rem 0;
}
.vs-tab{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 999px;
  padding: .55rem .85rem;
  cursor:pointer;
  font-weight:700;
  font-size: 12px;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
}
/* DISABLE TAB */
.vs-tab.vs-tabs.upcoming-feature{
    opacity:.6;
    cursor:not-allowed;
}
html[data-theme="light"] .vs-tab{ background: rgba(15,23,42,0.03); }
.vs-tab.active{
  background: rgba(79,70,229,0.14);
  border-color: rgba(79,70,229,0.35);
}
.vs-tab-panel{ display:none; margin-top: .85rem; }
.vs-tab-panel.open{ display:block; }

.vs-textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline:none;
  padding: .75rem .85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.vs-grid-2{
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
}
@media (max-width: 1100px){
  .vs-grid-2{ grid-template-columns: 1fr; }
}

.vs-mini-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .6rem;
}
@media (max-width: 900px){
  .vs-mini-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.vs-check{
  display:flex;
  align-items:center;
  gap:.5rem;
  padding: .65rem .7rem;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.vs-check input{ width:16px; height:16px; }



/* ===== PATCH: API Controls table fields (better view) ===== */

/* targets your generated inputs/selects */
#apiCtlInputsTbody .vs-inp,
#apiCtlOutputsTbody .vs-inp,
.vs-tab-panel .vs-inp{
  width: 100%;
  height: 42px;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#apiCtlInputsTbody .vs-inp::placeholder,
#apiCtlOutputsTbody .vs-inp::placeholder,
.vs-tab-panel .vs-inp::placeholder{
  color: var(--text-muted);
}

/* focus state */
#apiCtlInputsTbody .vs-inp:focus,
#apiCtlOutputsTbody .vs-inp:focus,
.vs-tab-panel .vs-inp:focus{
  border-color: rgba(79,70,229,0.45);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.14);
}

/* nicer select rendering */
#apiCtlInputsTbody select.vs-inp,
#apiCtlOutputsTbody select.vs-inp{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.2rem;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--icon) 50%),
    linear-gradient(135deg, var(--icon) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    100% 0;
  background-size: 6px 6px, 6px 6px, 2.4rem 100%;
  background-repeat: no-repeat;
}

/* table spacing + alignment */
#apiCtlInputsTbody td,
#apiCtlOutputsTbody td{
  padding: 0.55rem 0.6rem;
  vertical-align: middle;
}

#apiCtlInputsTbody td:first-child,
#apiCtlOutputsTbody td:first-child{
  padding-left: 0.75rem;
}
#apiCtlInputsTbody td:last-child,
#apiCtlOutputsTbody td:last-child{
  padding-right: 0.75rem;
}

/* better checkbox alignment */
#apiCtlInputsTbody input[type="checkbox"],
#apiCtlOutputsTbody input[type="checkbox"]{
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  transform: translateY(1px);
}

/* action button cell */
#apiCtlInputsTbody td:last-child,
#apiCtlOutputsTbody td:last-child{
  width: 56px;
  text-align: right;
}

/* small icon buttons inside tables look consistent */
#apiCtlInputsTbody .btn-soft.btn-xs,
#apiCtlOutputsTbody .btn-soft.btn-xs{
  width: 40px;
  height: 40px;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
 /* display: inline-flex;   */
  align-items: center;
  justify-content: center;
}

/* keep rows visually separated (without breaking your design) */
#apiCtlInputsTbody tr,
#apiCtlOutputsTbody tr{
  border-top: 1px solid var(--border);
}
#apiCtlInputsTbody tr:first-child,
#apiCtlOutputsTbody tr:first-child{
  border-top: none;
}

/* make the table wrapper feel cleaner */
#apiControlsCard .table-wrapper,
.table-wrapper.api-controls-table{
  border-radius: 18px;
  overflow: hidden;
}

/* LIGHT MODE: ensure inputs don't go pure white / harsh */
html[data-theme="light"] #apiCtlInputsTbody .vs-inp,
html[data-theme="light"] #apiCtlOutputsTbody .vs-inp,
html[data-theme="light"] .vs-tab-panel .vs-inp{
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.14);
}



/* ===== FIX: Select dropdown theme match (API Controls) ===== */

select.vs-inp{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-color: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--input-border);
}

/* Dropdown options — THIS fixes your screenshot issue */
select.vs-inp option{
  background-color: var(--card);
  color: var(--text);
}

/* Light mode fallback (some browsers ignore CSS vars in option) */
html[data-theme="light"] select.vs-inp option{
  background-color: #ffffff;
  color: #0f172a;
}

/* Dark mode fallback */
html[data-theme="dark"] select.vs-inp option{
  background-color: #0b1220;
  color: #e5e7eb;
}








/* ============================
   Support + Notifications UI
   Drop-in patch (scoped)
============================ */

.vs-split{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 1rem;
}
@media (max-width: 1100px){
  .vs-split{ grid-template-columns: 1fr; }
}

.vs-pane{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
  overflow:hidden;
}

.vs-pane-head{
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: .75rem;
}
.vs-pane-title{ font-weight: 800; font-size: 14px; }
.vs-pane-sub{ font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.vs-pane-body{ padding: 1rem; }

.vs-list{
  display:flex;
  flex-direction:column;
  gap: .5rem;
  padding: .75rem;
}
.vs-item{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: .75rem;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.vs-item:hover{ transform: translateY(-1px); border-color: rgba(79,70,229,0.35); }
.vs-item.active{ border-color: rgba(79,70,229,0.55); background: rgba(79,70,229,0.08); }
.vs-item-top{ display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.vs-item-title{ font-weight: 800; font-size: 13px; }
.vs-item-meta{ font-size: 11px; color: var(--text-muted); margin-top: 4px; display:flex; gap:.5rem; flex-wrap:wrap; }
.vs-pill{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.vs-pill.warn{ border-color: rgba(236,72,153,0.45); }
.vs-pill.ok{ border-color: rgba(34,197,94,0.45); }
.vs-pill.info{ border-color: rgba(79,70,229,0.45); }

.vs-chat{
  display:flex;
  flex-direction:column;
  height: calc(100vh - 220px);
  min-height: 520px;
}
@media (max-width: 1100px){
  .vs-chat{ height: auto; min-height: 520px; }
}

.vs-chat-log{
  padding: 1rem;
  overflow:auto;
  flex: 1;
}
.vs-msg{
  max-width: 78%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: .7rem .85rem;
  margin-bottom: .6rem;
  background: rgba(255,255,255,0.02);
}
.vs-msg.me{
  margin-left:auto;
  border-color: rgba(79,70,229,0.35);
  background: rgba(79,70,229,0.10);
}
.vs-msg .t{ font-size: 13px; line-height: 1.4; }
.vs-msg .m{ font-size: 11px; margin-top: .35rem; color: var(--text-muted); display:flex; gap:.5rem; flex-wrap:wrap; }

.vs-attach-row{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin-top: .55rem;
}
.vs-attach{
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.12);
  border-radius: 12px;
  overflow:hidden;
  width: 160px;
}
.vs-attach img, .vs-attach video{
  width: 100%;
  height: 110px;
  object-fit: cover;
  display:block;
}
.vs-attach .cap{
  padding: .45rem .55rem;
  font-size: 11px;
  color: var(--text);
  display:flex;
  justify-content:space-between;
  gap:.4rem;
}
.vs-attach a{ color: inherit; text-decoration:none; }

.vs-chat-compose{
  border-top: 1px solid var(--border);
  padding: .75rem;
  display:grid;
  grid-template-columns: 1fr auto;
  gap: .6rem;
  align-items:end;
}
.vs-chat-compose textarea{
  width:100%;
  min-height: 44px;
  max-height: 140px;
  resize: vertical;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  padding: .65rem .75rem;
}

.vs-form{
  display:grid;
  gap: .65rem;
}
.vs-form .row2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
@media (max-width: 1100px){
  .vs-form .row2{ grid-template-columns: 1fr; }
}
.vs-inp{
  width:100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  padding: .65rem .75rem;
  outline:none;
}
.vs-inp:focus{ border-color: rgba(79,70,229,0.45); }

.vs-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}

.vs-badge{
  position:absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 11px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.vs-link-preview{
  display:flex;
  gap:.75rem;
  align-items:center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .65rem;
  background: rgba(255,255,255,0.02);
}
.vs-link-preview img{
  width: 34px; height:34px; border-radius: 10px; object-fit: cover;
  background: rgba(0,0,0,0.20);
}
.vs-link-preview .h{ font-weight:800; font-size: 12px; }
.vs-link-preview .u{ font-size: 11px; color: var(--text-muted); }

/* Gautam's edit  */

.auth-error-msg {
    color: #ff4d4d;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Optional: Highlight input border on error */
input:focus {
    outline: none;
    border-color: #6366f1; /* Your primary theme color */
}


/* =====================================================
   AUTH SLIDER – HARD FIX (NO OVERLAP GUARANTEED)
   ===================================================== */

.auth-slider-container {
  position: relative;
  width: 100%;
  max-width: 920px;
  min-height: 560px;
  overflow: hidden;
}

/* Base form containers */
.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

/* ---------- SIGN IN (DEFAULT VISIBLE) ---------- */
.sign-in-container {
  left: 0;
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
}

/* ---------- SIGN UP (DEFAULT HIDDEN) ---------- */
.sign-up-container {
  left: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* =================================================
   WHEN SIGN UP IS ACTIVE
   ================================================= */

.auth-slider-container.right-panel-active .sign-in-container {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.auth-slider-container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}


/* ===== MODAL FIX (FINAL) ===== */
.modal-backdrop {
  display: none;
  pointer-events: none;
}

.modal-backdrop.active {
  display: flex;
  pointer-events: auto;
}

.modal-card {
  pointer-events: auto;
  z-index: 61;
}


/* ===== JSON Textarea (Dark + Light Friendly) ===== */
.vs-json-textarea{
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  min-height: 140px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

/* Placeholder */
.vs-json-textarea::placeholder{
  color: var(--text-muted);
}

/* Focus Effect */
.vs-json-textarea:focus{
  outline: none;
  border-color: rgba(79,70,229,0.45);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.14);
}

/* Slight glass depth in dark */
html[data-theme="dark"] .vs-json-textarea{
  background: rgba(255,255,255,0.05);
}

/* Light mode adjustment (avoid harsh white) */
html[data-theme="light"] .vs-json-textarea{
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.14);
}

/* Scrollbar styling */
.vs-json-textarea::-webkit-scrollbar{
  width: 8px;
}
.vs-json-textarea::-webkit-scrollbar-thumb{
  background: rgba(148,163,184,0.35);
  border-radius: 999px;
}

