/* Core Reset & Variables */
:root {
  --bg-app: #0b0c16;
  --bg-card: rgba(20, 23, 42, 0.5);
  --bg-card-hover: rgba(28, 32, 57, 0.7);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(0, 242, 254, 0.4);
  
  --color-primary: #00f2fe;
  --color-primary-grad: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --color-secondary: #b927fc;
  --color-secondary-grad: linear-gradient(135deg, #b927fc 0%, #e0c3fc 100%);
  --color-success: #00f5a0;
  --color-success-grad: linear-gradient(135deg, #00f5a0 0%, #00d2ff 100%);
  --color-danger: #ff416c;
  --color-danger-grad: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  --color-accent: #ffb800;
  --color-accent-grad: linear-gradient(135deg, #ffb800 0%, #ff8a00 100%);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --transition-speed: 0.25s;
  --shadow-glow: 0 8px 32px 0 rgba(0, 242, 254, 0.15);
  --shadow-card: 0 4px 20px 0 rgba(0, 0, 0, 0.3);
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Decorative Ambient Glow Spheres */
.glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  mix-blend-mode: screen;
}

.glow-1 {
  top: -10%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: var(--color-primary-grad);
  animation: floatGlow 12s infinite alternate;
}

.glow-2 {
  bottom: -10%;
  left: 10%;
  width: 600px;
  height: 600px;
  background: var(--color-secondary-grad);
  animation: floatGlow 16s infinite alternate-reverse;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 40px) scale(1.1); }
}

/* Application Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header styling */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(11, 12, 22, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--color-primary-grad);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.logo-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--color-primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-dim);
  box-shadow: 0 0 8px var(--text-dim);
}

.status-indicator-dot.idle {
  background-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
}

.status-indicator-dot.running {
  background-color: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { opacity: 0.6; }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.6; }
}

.status-text {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Layout Split */
.app-layout {
  display: flex;
  flex: 1;
}

/* Sidebar navigation */
.app-sidebar {
  width: 250px;
  background: rgba(8, 9, 18, 0.4);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 1rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-speed) ease;
}

.nav-btn i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  transform: translateX(3px);
}

.nav-btn.active {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

/* Main Content Area */
.app-main {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  height: calc(100vh - 80px);
}

/* Panel Tab Management */
.tab-panel {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

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

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

/* Card Styling (Glassmorphism) */
.content-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  transition: border-color var(--transition-speed), background var(--transition-speed);
}

.content-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.card-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

.description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* 1. DASHBOARD PANEL */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

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

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-speed) ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.stat-card.success-glow:hover {
  border-color: rgba(0, 245, 160, 0.3);
  box-shadow: 0 4px 20px rgba(0, 245, 160, 0.1);
}

.stat-card.danger-glow:hover {
  border-color: rgba(255, 65, 108, 0.3);
  box-shadow: 0 4px 20px rgba(255, 65, 108, 0.1);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  font-weight: 600;
}

.stat-icon {
  font-size: 1.1rem;
  color: var(--text-dim);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-accent { color: var(--color-primary) !important; }

/* Progress Card */
.progress-card {
  padding: 1.25rem;
}

#progress-percentage {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary-grad);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--color-primary);
  width: 0%;
  transition: width 0.4s ease-out;
}

/* Controls Card */
.controls-card h3 {
  margin-bottom: 0.5rem;
}

.control-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.control-actions button:last-child {
  grid-column: span 2;
}

.control-divider {
  text-align: center;
  position: relative;
  margin: 1.25rem 0;
}

.control-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--border-color);
  z-index: 1;
}

.control-divider span {
  background: #111424;
  padding: 0 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  z-index: 2;
}

.displayname-action .input-group {
  display: flex;
  gap: 0.75rem;
}

.displayname-action input {
  flex: 1;
}

/* Terminal Card styling */
.terminal-card {
  height: 480px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.08);
}

.terminal-header {
  padding: 1rem 1.25rem;
  background: rgba(13, 16, 29, 0.9);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.terminal-title i {
  color: var(--color-primary);
}

.terminal-controls button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
  transition: color var(--transition-speed);
}

.terminal-controls button:hover {
  color: var(--color-danger);
}

.terminal-container {
  flex: 1;
  background: #06070d;
  padding: 0.75rem;
  font-family: var(--font-mono);
  overflow: hidden;
}

.xterm {
  padding: 4px;
}

.xterm-viewport {
  background-color: #06070d !important;
}

/* Forms & UI Inputs */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-speed) ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  background: rgba(0, 242, 254, 0.02);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.editor-textarea {
  width: 100%;
  background: #080911;
  border-color: rgba(255, 255, 255, 0.06);
}

.code-font {
  font-family: var(--font-mono) !important;
  font-size: 0.85rem !important;
}

small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Password eye button wrapper */
.password-input {
  position: relative;
  display: flex;
}

.password-input input {
  width: 100%;
  padding-right: 3rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 3rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-password:hover {
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-primary {
  background: var(--color-primary-grad);
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.btn-danger {
  background: var(--color-danger-grad);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 65, 108, 0.2);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 65, 108, 0.35);
}

.btn-accent {
  background: var(--color-accent-grad);
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 184, 0, 0.2);
}

.btn-accent:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 184, 0, 0.35);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Checkbox design */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
  color: var(--text-muted);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all var(--transition-speed);
}

.checkbox-container:hover input ~ .checkmark {
  border-color: rgba(255, 255, 255, 0.15);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ span:last-child {
  color: var(--text-main);
}

/* Toggle Switches */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
}

input:checked + .slider {
  background-color: rgba(0, 242, 254, 0.15);
  border-color: var(--color-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Sections management */
.settings-section {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-section h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  border-left: 3px solid var(--color-primary);
  padding-left: 0.5rem;
}

.section-header-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header-toggle h3 {
  margin-bottom: 0;
}

.collapsible-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* Custom Headers Key-Value editor */
.header-item-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
  animation: fadeIn 0.2s ease forwards;
}

.btn-remove-header {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem;
  transition: color var(--transition-speed);
}

.btn-remove-header:hover {
  color: var(--color-danger);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* 4. LISTS PANEL */
.lists-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lists-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 0.2rem 0.6rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-accent {
  background: rgba(0, 242, 254, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.lists-actions {
  display: flex;
  justify-content: flex-end;
}

/* 5. TEMPLATE PANEL */
.templates-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.template-selector-card {
  max-width: 800px;
}

.template-select-input {
  width: 100%;
}

.template-upload-box {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.template-upload-box h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.template-upload-box .input-group {
  display: flex;
  gap: 0.75rem;
}

.template-upload-box input[type="file"] {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.templates-editors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1000px) {
  .templates-editors {
    grid-template-columns: 1fr;
  }
}

.active-filename {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-secondary);
  background: rgba(185, 39, 252, 0.08);
  border: 1px solid rgba(185, 39, 252, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.templates-actions {
  display: flex;
  justify-content: flex-end;
}

/* 6. ATTACHMENTS PANEL */
.attachments-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .attachments-layout {
    grid-template-columns: 1fr;
  }
}

/* Dropzone styling */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 3rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--color-primary);
  background: rgba(0, 242, 254, 0.02);
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--text-dim);
  transition: color var(--transition-speed);
}

.dropzone:hover .dropzone-icon {
  color: var(--color-primary);
}

.dropzone p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dropzone p span {
  color: var(--color-primary);
  font-weight: 600;
}

.upload-progress-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upload-progress-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  animation: fadeIn 0.2s ease;
}

/* Table styling */
.attachments-list-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

.attachments-table th, .attachments-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.attachments-table th {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.attachments-table td {
  font-size: 0.9rem;
}

.attachments-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.btn-delete-file {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition-speed);
}

.btn-delete-file:hover {
  color: var(--color-danger);
}

.attachments-footer {
  display: flex;
  justify-content: flex-end;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
}

.toast {
  background: rgba(18, 20, 38, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  color: var(--text-main);
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
}

.toast.success { border-left-color: var(--color-success); }
.toast.danger { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-accent); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Session Management Bar */
.session-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(20, 23, 42, 0.4);
  padding: 0.75rem 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.session-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.session-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 2px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.session-tabs::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.session-tabs {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.session-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-speed) ease;
  position: relative;
}

.session-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.session-tab-btn.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.session-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background-color: var(--text-dim);
}

.session-status-dot.idle {
  background-color: var(--text-dim);
}

.session-status-dot.running {
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: pulseSuccess 1.5s infinite alternate;
}

@keyframes pulseSuccess {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 1; }
}

.btn-delete-session {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem;
  font-size: 0.75rem;
  margin-left: 0.25rem;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  transition: all 0.2s ease;
}

.btn-delete-session:hover {
  background: rgba(255, 65, 108, 0.2);
  color: var(--color-danger);
}

.btn-add-session {
  background: var(--color-primary-grad);
  border: none;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 2px 10px rgba(0, 242, 254, 0.2);
  white-space: nowrap;
}

.btn-add-session:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

/* Logout Button in Header */
.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  margin-left: 0.75rem;
  border-left: 1px solid var(--border-color);
  padding-left: 0.75rem;
  font-size: 0.95rem;
  transition: color var(--transition-speed) ease;
}

.btn-logout:hover {
  color: var(--color-danger);
}

/* Login Page Styling */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #05060c;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  background: rgba(20, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  backdrop-filter: blur(25px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 242, 254, 0.05);
  animation: loginCardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardAppear {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.login-logo h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 3px;
  background: var(--color-primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 0.5rem;
}

.login-logo p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.input-with-icon input {
  padding-left: 3.25rem;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-speed) ease;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.remember-me-row {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.btn-login {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
}

