/* DESIGN SYSTEM & GLOBAL VARIABLES */
:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colors */
  --bg-app: #f6f8fb;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e6ebf4;
  --text-main: #1e293b;
  --text-muted: #64748b;
  
  --primary: #4f46e5;
  --primary-light: #e0e7ff;
  --primary-dark: #3730a3;
  
  --success: #10b981;
  --success-light: #d1fae5;
  
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  
  --danger: #ef4444;
  --danger-light: #fee2e2;

  --info: #06b6d4;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.5;
  font-size: 14px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* TOAST MESSAGE */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #0f172a;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.show {
  transform: translateY(0);
}

/* LOGIN LAYOUT */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, #e0e7ff 0%, #f6f8fb 100%);
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.4s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.logo-icon i {
  width: 32px;
  height: 32px;
}

.login-header h2 {
  font-size: 26px;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}
.login-footer span {
  font-weight: 600;
  color: var(--text-main);
}

/* INPUT & FORM FIELDS */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-main);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.input-wrapper input {
  padding-left: 40px;
}

.form-control, input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #fbfcfd;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-help {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 16px;
}
.form-row .form-group {
  flex: 1;
}

.form-fieldset {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}
.form-fieldset legend {
  font-family: var(--font-title);
  font-weight: 600;
  padding: 0 8px;
  font-size: 13px;
  color: var(--primary);
}

.font-mono {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: #fff;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

/* APP LAYOUT */
.app-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* SIDEBAR STYLING */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.logo-circle {
  width: 38px;
  height: 38px;
  background-color: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-circle i {
  width: 20px;
  height: 20px;
}

.brand-text h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.role-badge {
  display: inline-block;
  font-size: 10px;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-menu {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.menu-section {
  margin-bottom: 24px;
}
.menu-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-left: 12px;
}

.sidebar-menu ul {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 4px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  transition: all var(--transition-fast);
}
.sidebar-menu a i {
  width: 18px;
  height: 18px;
}

.sidebar-menu li.active a, .sidebar-menu a:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}
.sidebar-menu li.active a {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  overflow: hidden;
}
.user-name {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.user-expiry {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: background var(--transition-fast);
}
.btn-logout:hover {
  background-color: var(--danger-light);
  color: var(--danger);
}

/* MAIN CONTENT AREA */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.content-header {
  height: 70px;
  padding: 0 40px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.breadcrumbs {
  font-family: var(--font-title);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}
.breadcrumb-parent {
  color: var(--text-muted);
}
.breadcrumb-separator {
  color: var(--border-color);
}
.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-time {
  font-family: var(--font-title);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 13px;
}

.tab-viewport {
  padding: 40px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.tab-pane.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.section-header h2 {
  font-size: 22px;
  margin-bottom: 4px;
}
.section-header p {
  color: var(--text-muted);
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* METRIC CARDS */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.metric-header i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.metric-card h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.1;
  letter-spacing: -0.8px;
}

.metric-card p {
  color: var(--text-muted);
  font-size: 12px;
}

/* CARDS DEFAULT */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.card-header h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.card-header p {
  color: var(--text-muted);
  font-size: 12px;
}

/* DASHBOARD LAYOUT GRID */
.dashboard-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.chart-container-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-wrapper {
  position: relative;
  flex: 1;
  min-height: 240px;
}

.chart-period {
  background-color: var(--bg-app);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 4px;
}

.quick-status-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.quick-status-card h3 {
  font-size: 16px;
  margin-bottom: 20px;
}

.status-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  flex: 1;
}

.status-bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.status-label {
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-label.success { color: var(--success); }
.status-label.warning { color: var(--warning); }
.status-label.danger { color: var(--danger); }

.status-val {
  font-weight: 700;
  color: var(--text-main);
}

.progress-bar {
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease-in-out;
}
.progress-fill.success { background-color: var(--success); }
.progress-fill.warning { background-color: var(--warning); }
.progress-fill.danger { background-color: var(--danger); }
.progress-fill.primary { background-color: var(--primary); }

.badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }

/* BOTTOM GRID LAYOUT */
.dashboard-layout-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.dashboard-layout-bottom > .card {
  margin-bottom: 0;
}

/* Security & Access Keys List (Overview) */
.keys-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.key-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.key-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.key-avatar {
  width: 36px;
  height: 36px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.key-avatar i {
  width: 18px;
  height: 18px;
}

.key-meta {
  display: flex;
  flex-direction: column;
}
.key-meta h4 {
  font-size: 13px;
  font-weight: 600;
}
.key-token-masked {
  font-family: monospace;
  color: var(--text-muted);
  font-size: 11px;
}
.key-domain-list {
  font-size: 11px;
  color: var(--primary);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.key-last-used {
  font-size: 11px;
  color: var(--text-muted);
}

.action-icons-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.btn-action-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}
.btn-action-icon:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}
.btn-action-icon.danger:hover {
  background-color: var(--danger-light);
  color: var(--danger);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 30px;
  font-size: 13px;
}

/* Billing card */
.billing-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.credit-balance {
  background-color: #fcfdfe;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.credit-balance span {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.credit-balance h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.quota-usage-indicator .status-info {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}

.billing-footer-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
}
.info-row span {
  color: var(--text-muted);
}
.info-row strong {
  color: var(--text-main);
}

/* Donut Chart and Endpoints */
.card-donut {
  display: flex;
  flex-direction: column;
}
.donut-chart-wrapper {
  position: relative;
  flex: 1;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* TABLES SYSTEM */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  background-color: #fafbfd;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background-color: #fafbfc;
}

.text-center { text-align: center; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }

/* INTEGRATION DOCUMENTATION */
.integration-doc h3 {
  font-size: 16px;
  margin: 24px 0 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}
.integration-doc h3:first-of-type {
  margin-top: 0;
}

.doc-endpoints {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.endpoint-item {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.endpoint-item .method {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 10px;
}
.endpoint-item .method.get {
  background-color: #e0f2fe;
  color: #0284c7;
}
.endpoint-item .url {
  font-family: monospace;
  font-weight: 600;
  color: var(--text-main);
}
.endpoint-item .highlight {
  color: var(--primary);
}
.endpoint-item .description {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.params-table {
  margin-bottom: 24px;
}

.code-examples-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}
.code-tab {
  padding: 8px 16px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}
.code-tab.active, .code-tab:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.code-view {
  background-color: #0f172a;
  border-radius: var(--radius-sm);
  padding: 16px;
  color: #cbd5e1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  overflow-x: auto;
  line-height: 1.6;
}

/* SETTINGS CARD LAYOUT */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* MODAL BOXES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.modal-overlay.show .modal-card {
  transform: translateY(0);
}

.modal-card.modal-large {
  max-width: 800px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 18px;
}

.modal-card form {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding: 16px 24px 0;
  margin-top: 20px;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE LAYOUT adjustments */
@media(max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-layout-bottom {
    grid-template-columns: 1fr;
  }
}
@media(max-width: 768px) {
  .app-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none; /* simple mobile drawer toggle could be added */
  }
  .content-header {
    padding: 0 20px;
  }
  .tab-viewport {
    padding: 20px;
  }
}

/* PAGINATION CONTROLS */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-color);
  margin-top: 16px;
}
.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.pagination-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 34px;
}

/* SEARCH INLINE */
.search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* TOGGLE SWITCH */
.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border-color);
  border-radius: 26px;
  transition: 0.3s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}
.toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* SETTINGS SECTION TITLES */
.settings-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.settings-card {
  padding: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* BADGE VARIANTS */
.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

/* LANDING PAGE STYLINGS */
.landing-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0e1a;
  position: relative;
  overflow: hidden;
}

/* Animated Background Orbs */
.landing-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
  animation-duration: 15s;
}
.orb-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  top: 40%; left: 60%;
  animation-delay: -8s;
  animation-duration: 18s;
}
@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(10px, -10px) scale(1.05); }
}

/* Landing Content */
.landing-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  padding: 40px 24px;
  animation: fadeIn 0.6s ease-out;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.3);
  color: #a5b4fc;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}
.landing-badge i {
  width: 16px; height: 16px;
  color: #facc15;
}

.landing-title {
  font-family: var(--font-title);
  font-size: 52px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, #818cf8, #06b6d4, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 16px;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 36px;
}

.landing-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
}
.btn-landing-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.4);
}
.btn-landing-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.55);
}
.btn-landing-primary i {
  width: 18px; height: 18px;
}

.landing-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.landing-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}
.landing-stat:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.landing-stat i {
  width: 16px; height: 16px;
  color: #818cf8;
}

/* LOCKED DOMAIN TAG */
.locked-domain-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: #f8fafc;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  font-weight: 600;
}

.locked-domain-tag .domain-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.locked-domain-tag .domain-text::before {
  content: "🔒";
  font-size: 12px;
}

.btn-remove-domain {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border-radius: 50%;
  width: 24px;
  height: 24px;
}

.btn-remove-domain:hover {
  background-color: #fee2e2;
  color: #ef4444;
  transform: scale(1.1);
}

/* API TESTING CLIENT STYLING */
.testing-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .testing-grid {
    grid-template-columns: 1fr;
  }
}

.testing-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 500px;
}

.testing-card.response-panel {
  background-color: #0f172a; /* Slate 900 for dark mode look in response block */
  color: #f1f5f9;
  border-color: #334155;
}

.testing-card.response-panel .panel-title {
  color: #f1f5f9;
}

.response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
  padding-bottom: 12px;
}

.response-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.response-meta .badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
}

.response-meta #testing-status-badge {
  background-color: #334155;
  color: #94a3b8;
  border: 1px solid #475569;
}

.response-meta #testing-status-badge.success-2xx {
  background-color: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.response-meta #testing-status-badge.error-4xx,
.response-meta #testing-status-badge.error-5xx {
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.url-preview-bar {
  display: flex;
  background-color: #1e293b;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  align-items: center;
  gap: 12px;
  border: 1px solid #334155;
  overflow-x: auto;
}

.url-method {
  color: #38bdf8;
  font-weight: 800;
}

.url-preview-text {
  color: #94a3b8;
  white-space: nowrap;
}

.response-body-viewer {
  flex: 1;
  background-color: #020617;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  max-height: 480px;
  min-height: 320px;
}

.response-body-viewer pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.response-body-viewer code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #38bdf8;
}

.params-editor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.param-row {
  display: flex;
  gap: 10px;
}

.param-row input.param-key {
  width: 120px;
  background-color: var(--bg-secondary);
  font-weight: 600;
}

.param-row input.param-value {
  flex: 1;
}


