:root {
  --glass-blur: 18px;
  --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-snappy: all 0.2s ease;

  --shadow-sm: 0 12px 30px rgba(2, 6, 23, 0.12);
  --shadow-md: 0 20px 48px rgba(2, 6, 23, 0.18);
  --shadow-lg: 0 28px 80px rgba(2, 6, 23, 0.28);

  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 16px;

  --bg-deep: #030712;
  --bg-sidebar: rgba(3, 7, 18, 0.92);
  --bg-surface: rgba(15, 23, 42, 0.68);
  --bg-card: rgba(15, 23, 42, 0.74);
  --bg-elevated: rgba(30, 41, 59, 0.82);
  --bg-soft: rgba(148, 163, 184, 0.08);
  --bg-muted: rgba(148, 163, 184, 0.06);

  --border-glass: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(6, 182, 212, 0.26);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.22);

  --success: #34d399;
  --warning: #fbbf24;
  --error: #fb7185;
}

[data-theme="light"] {
  --shadow-sm: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 20px 42px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 28px 72px rgba(15, 23, 42, 0.14);

  --bg-deep: #eff6ff;
  --bg-sidebar: rgba(255, 255, 255, 0.94);
  --bg-surface: rgba(255, 255, 255, 0.84);
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-elevated: rgba(248, 250, 252, 0.96);
  --bg-soft: rgba(14, 116, 144, 0.08);
  --bg-muted: rgba(15, 23, 42, 0.04);

  --border-glass: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(8, 145, 178, 0.22);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --ref-dim: #64748b;

  --accent: #0891b2;
  --accent-hover: #0e7490;
  --accent-soft: rgba(8, 145, 178, 0.11);
  --accent-glow: rgba(8, 145, 178, 0.18);

  --success: #059669;
  --warning: #d97706;
  --error: #e11d48;
}

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

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.management-ui {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(34, 211, 238, 0.12),
      transparent 34%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(14, 165, 233, 0.1),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(3, 7, 18, 0.98), rgba(2, 6, 23, 1));
  background-attachment: fixed;
  color: var(--text-primary);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

[data-theme="light"] body.management-ui {
  background:
    radial-gradient(
      circle at top left,
      rgba(34, 211, 238, 0.12),
      transparent 36%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(14, 165, 233, 0.08),
      transparent 32%
    ),
    linear-gradient(180deg, #f8fbff, #eef5ff);
}

.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(34, 211, 238, 0.12),
      transparent 28%
    ),
    radial-gradient(
      circle at 85% 15%,
      rgba(59, 130, 246, 0.1),
      transparent 22%
    ),
    radial-gradient(
      circle at 75% 80%,
      rgba(14, 165, 233, 0.08),
      transparent 26%
    );
  filter: blur(10px);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

code,
pre,
.stat-value {
  font-family: "JetBrains Mono", monospace;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 284px;
  min-width: 284px;
  height: 100vh;
  padding: 28px 18px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
  padding: 0 12px;
}

.sidebar-title,
.logo-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.sidebar nav,
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-divider {
  height: 1px;
  margin: 10px 12px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-glass),
    transparent
  );
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-item i {
  width: 18px;
  height: 18px;
}

.nav-item:hover {
  transform: translateX(3px);
  border-color: rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  border-color: var(--border-strong);
  background: linear-gradient(
    90deg,
    var(--accent-soft),
    rgba(255, 255, 255, 0.02)
  );
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 40px;
}

.container-fluid,
.content-wrapper {
  width: 98%;
  max-width: 1800px;
  margin: 0 auto;
}

h2,
h3,
h4 {
  letter-spacing: -0.03em;
}

h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: clamp(1.7rem, 2vw, 2.1rem);
  font-weight: 700;
}

h3 {
  margin-bottom: 18px;
  font-size: 1.1rem;
  font-weight: 700;
}

h4 {
  margin-bottom: 12px;
  font-size: 0.98rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
}

.glass-card,
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md);
}

.glass-card {
  padding: 24px;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(34, 211, 238, 0.22);
  box-shadow: var(--shadow-lg);
}

.sidebar .card {
  padding: 16px;
}

.sidebar .form-row {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.sidebar label.toolbar {
  justify-content: space-between !important;
  width: 100%;
  padding: 4px 0;
}

.sidebar .form-row label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sidebar .inp {
  width: 100% !important;
}

.section-card {
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.section-body {
  padding: 20px 24px 24px;
}

.section-hint,
.selected-hint,
.stat-trend,
.text-muted {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.stat-icon i {
  width: 20px;
  height: 20px;
}

.stat-content {
  min-width: 0;
  flex: 1;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 10px;
  font-size: clamp(1.7rem, 2vw, 2.35rem);
  font-weight: 700;
  color: var(--text-primary);
}

.status-distribution {
  display: grid;
  gap: 12px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.status-label {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.status-count {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.control-panel,
.toolbar,
.btn-group,
.form-row,
.filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.control-panel .inp {
  max-width: 380px;
}

.control-panel,
.toolbar,
.filter-form {
  margin-bottom: 24px;
}

.btn-group {
  gap: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.btn-glow,
.btn-primary,
button:not(.btn-icon):not(.btn-theme):not(.btn-theme-toggle):not(.btn-glow),
dialog a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .btn-glow,
[data-theme="light"] .btn-primary,
[data-theme="light"]
  button:not(.btn-icon):not(.btn-theme):not(.btn-theme-toggle):not(.btn-glow),
[data-theme="light"] dialog a {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(248, 250, 252, 0.92)
  );
}

.btn-glow:hover,
.btn-primary:hover,
button:not(.btn-icon):not(.btn-theme):not(.btn-theme-toggle):not(
    .btn-glow
  ):hover,
dialog a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.btn-primary-glow,
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
  box-shadow: 0 16px 34px var(--accent-glow);
}

.btn-primary-glow:hover,
.btn-primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

.panel-kpi-value badge,
.ref-kpi-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
}

.settings-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.settings-summary-item span {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: var(--mono);
}

.btn-danger {
  border-color: rgba(251, 113, 133, 0.22) !important;
  background: rgba(251, 113, 133, 0.08) !important;
  box-shadow: none;
}

.btn-danger:hover {
  background: rgba(251, 113, 133, 0.14) !important;
}

.btn-icon,
.btn-theme,
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.btn-icon:hover,
.btn-theme:hover,
.btn-theme-toggle:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.btn-theme:hover,
.btn-theme-toggle:hover {
  transform: rotate(12deg);
}

.btn-theme i,
.btn-theme-toggle i {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .btn-theme-toggle .sun-icon {
  display: none;
}

[data-theme="light"] .btn-theme-toggle .moon-icon {
  display: none;
}

.btn-block {
  width: 100%;
}

.mt-lg {
  margin-top: 24px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 16px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.65);
}

.system-status .status-label {
  color: var(--text-secondary);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.form-group,
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group {
  min-width: 110px;
}

.form-group-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

select,
input,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--ref-border);
  border-radius: 6px;
  background: var(--ref-input-bg) !important;
  color: var(--ref-text);
  font-family: var(--ref-mono);
  transition: all 0.25s ease-out;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--ref-blue) !important;
  box-shadow: 0 0 10px var(--ref-border), inset 0 0 5px rgba(0, 242, 255, 0.05);
  outline: none;
  background: var(--ref-surface) !important;
}

[data-theme="light"] select,
[data-theme="light"] input,
[data-theme="light"] textarea {
  box-shadow: none;
  border-color: rgba(0, 119, 182, 0.2);
}

[data-theme="light"] select,
[data-theme="light"] input,
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.92) !important;
}

[data-theme="light"] select,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="color"],
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.92);
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

input[type="color"] {
  padding: 4px;
}

.filter-form {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 0;
}

.row-select-wrap,
.row-actions,
.folders-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.accounts-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.accounts-main,
.monitoring-container {
  min-width: 0;
  flex: 1;
}

.folders-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.folders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border-glass);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.folders-header h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.folders-tree {
  padding: 12px 0;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-snappy);
}

.folder-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.folder-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.folder-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.folder-name {
  flex: 1;
  min-width: 0;
}

.folder-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.72rem;
}

.folder-actions {
  display: none;
}

.folder-item:hover .folder-actions {
  display: inline-flex;
}

.folder-actions button {
  min-height: auto;
  padding: 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  margin-bottom: 20px;
  padding: 6px;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.settings-tab-btn {
  min-height: 40px;
  padding: 9px 16px;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--text-secondary);
  box-shadow: none !important;
}

.settings-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary);
}

.settings-tab-btn.active,
.toolbar button.active {
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-hover)
  ) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px var(--accent-glow) !important;
}

.settings-panel {
  display: none;
  animation: slideUp 0.35s ease-out;
}

.settings-panel.active {
  display: block;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.settings-field label {
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.table-container,
.log-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(2, 6, 23, 0.16);
}

[data-theme="light"] .table-container,
[data-theme="light"] .log-table-container {
  background: rgba(255, 255, 255, 0.88);
}

table,
.table,
.log-table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 14px 16px;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-glass);
}

tbody td {
  padding: 14px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.status-indicator {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.status-completed {
  background: var(--success);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.65);
}

.status-running {
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

.status-failed {
  background: var(--error);
  box-shadow: 0 0 14px rgba(251, 113, 133, 0.55);
}

.status-pending,
.status-paused,
.status-stopped {
  background: var(--warning);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-owner {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
}

.badge-plus {
  background: rgba(251, 191, 36, 0.14);
  color: var(--warning);
}

.badge-normal {
  background: var(--accent-soft);
  color: var(--accent);
}

.otp-code {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.inline-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: middle;
  opacity: 0.75;
}

dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

dialog h3,
dialog h4 {
  margin-bottom: 16px;
}

dialog p,
dialog ol,
dialog form p {
  margin-bottom: 14px;
}

dialog label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

dialog form {
  display: grid;
  gap: 14px;
}

dialog hr {
  border: 0;
  border-top: 1px solid var(--border-glass);
  margin: 16px 0;
}

dialog ol {
  padding-left: 20px;
  color: var(--text-secondary);
}

#details-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text-secondary);
}

#details-users,
#details-invites {
  margin-top: 12px;
}

#jobLogsContent {
  padding: 16px;
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.26);
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 14px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  box-shadow: var(--shadow-sm);
}

.notice::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

pre {
  overflow: auto;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: slideUp 0.42s ease-out both;
}

@media (max-width: 1200px) {
  .main {
    padding: 32px 24px;
  }

  .accounts-layout {
    flex-direction: column;
  }

  .folders-sidebar {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 920px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-glass);
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-item {
    flex: 1 1 170px;
  }
}

@media (max-width: 768px) {
  .main {
    padding: 24px 18px;
  }

  .stats-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .section-header,
  .toolbar,
  .control-panel,
  .filter-form {
    align-items: stretch;
  }

  .section-header {
    flex-direction: column;
  }

  .pagination {
    width: 100%;
    justify-content: flex-start;
  }

  tbody td,
  thead th {
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .sidebar-header {
    padding: 0;
  }

  .sidebar-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .glass-card,
  .section-body {
    padding: 18px;
  }

  .section-header {
    padding: 18px 18px 0;
  }

  dialog {
    width: calc(100vw - 20px);
    padding: 18px;
  }
}

/* ── Mission Control & Terminal Additions ── */
.mission-split {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .mission-split { grid-template-columns: 1fr; }
}

.terminal {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.6;
  height: 600px;
  overflow-y: auto;
  color: var(--text-secondary);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.terminal::-webkit-scrollbar { width: 6px; }
.terminal::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }

.log-line {
  margin-bottom: 5px;
  display: flex;
  gap: 12px;
  animation: logFadeIn 0.2s ease-out;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 4px;
}

.log-time { color: var(--text-muted); font-size: 0.75rem; min-width: 70px; font-family: var(--mono); }
.log-level { font-weight: 700; min-width: 50px; text-transform: uppercase; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; }
.log-level.info { color: var(--accent); background: var(--accent-soft); }
.log-level.warn { color: var(--warning); background: rgba(251, 191, 36, 0.1); }
.log-level.error { color: var(--error); background: rgba(251, 113, 133, 0.1); }
.log-message { flex: 1; word-break: break-all; }

.btn-green {
  background: rgba(57, 255, 20, 0.05);
  color: #39ff14;
  border: 1px solid rgba(57, 255, 20, 0.4);
}
.btn-green:hover {
  background: #39ff14;
  color: #000;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

.btn-red {
  background: rgba(255, 0, 255, 0.05);
  color: #ff00ff;
  border: 1px solid rgba(255, 0, 255, 0.4);
}
.btn-red:hover {
  background: #ff00ff;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

@keyframes logFadeIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.btn-start-pulse {
  box-shadow: 0 0 20px var(--success);
  animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
  0% { box-shadow: 0 0 10px rgba(52, 211, 153, 0.4); }
  50% { box-shadow: 0 0 25px rgba(52, 211, 153, 0.8); }
  100% { box-shadow: 0 0 10px rgba(52, 211, 153, 0.4); }
}

.config-card .section-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
