/* Modern CSS Variables */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #16a34a;
  --danger-color: #dc2626;
  --warning-color: #d97706;

  --bg: #f3f6fb;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;

  --text-color: #0f172a;
  --muted-text: #64748b;

  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --topbar-bg: #ffffff;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 12px;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg);
  overflow-x: hidden;
}

/* mobile-friendly containers */
.container {
  width: 100%;
  padding: 0 15px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: 250px;
  color: #ecf0f1;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding: 24px 0;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  z-index: 1000;
  background: var(--sidebar-bg);
}

.sidebar h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .5px;
  opacity: .9;
}

.sidebar a {
  padding: 14px 28px;
  color: #cbd5e1;
  border-left: none;
  border-radius: 8px;
  margin: 4px 12px;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--sidebar-hover);
  color: #fff;
}

/* mobile toggle button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ecf0f1;
  font-size: 24px;
  cursor: pointer;
  position: relative;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    position: absolute;
    left: 20px;
    top: 18px;
    z-index: 1100;
  }
  .sidebar {
    display: none;
    width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
  }
  .sidebar.open {
    display: block;
  }
  .topbar {
    left: 0;
    padding: 0 15px;
  }
  .topbar h1 {
    margin-left: 40px;
  }
  .main-content {
    margin-left: 0;
    padding-top: 120px;
  }
}


.sidebar h2 {
  text-align: center;
  margin-bottom: 30px;
  font-weight: 300;
  letter-spacing: 1px;
}

.sidebar a {
  color: #bdc3c7;
  display: block;
  padding: 15px 30px;
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-left-color: var(--accent-color);
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 250px;
  right: 0;
  height: 70px;
  background: var(--topbar-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  box-shadow: var(--shadow-sm);
  z-index: 1100;
  border-bottom: 1px solid var(--border-color);
}

.topbar h1 {
  font-size: 20px;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  color: var(--muted-text);
  font-size: 14px;
  gap: 16px;
}

.user-info span {
  font-weight: 500;
}

/* Main content */
.main-content {
  margin-left: 250px;
  padding: 80px 20px 20px;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: 120px 10px 10px;
  }
}


/* Widgets/Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

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


.widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  text-align: left;
  border: 1px solid var(--border-color);
  transition: .2s ease;
}

.widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.widget h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-text);
  margin-bottom: 8px;
}

.widget p {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-color);
}

/* Content sections */
.content {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 28px;
}

.content h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

.content p {
  color: var(--light-text);
}

/* Process table */
.process-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.process-table th {
  background: #f8fafc;
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.process-table th,
.process-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

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

.process-table tr:hover td {
  background: #f8fafc;
}

@media (max-width: 600px) {
  .process-table th, .process-table td {
    padding: 8px;
    font-size: 14px;
  }
  .process-table button, .process-table a {
    margin: 2px 0;
    display: block;
  }
}

.process-table button, .process-table a {
  margin-right: 10px;
  padding: 5px 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
}

.process-table button:hover, .process-table a:hover {
  background: #357abd;
}

.process-table button.btn-delete {
  background: var(--danger-color);
}

.process-table button.btn-delete:hover {
  background: #b91c1c;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-online { background: #dcfce7; color: var(--success-color); }
.status-stopped { background: #fee2e2; color: var(--danger-color); }
.status-errored { background: #fee2e2; color: var(--danger-color); }
.status-launching,
.status-stopping,
.status-one-launch-status {
  background: #fef3c7;
  color: var(--warning-color);
}

.process-table select {
  padding: 5px;
  margin-right: 10px;
}

/* log viewer */
.content pre {
  background: #f6f8fa;
  padding: 15px;
  border-radius: var(--border-radius);
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Forms */
form {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-width: 500px;
  margin: 0 auto;
}

@media (max-width: 500px) {
  form {
    padding: 15px;
    max-width: 100%;
  }
}


form div {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

input, select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e8ed;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

button {
  background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

td form {
  display: inline;
  background: none;
  padding: 0;
  box-shadow: none;
  margin: 0;
}

td button {
  width: auto;
}

/* Tables */
table {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e1e8ed;
}

th {
  background: var(--topbar-bg);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--light-text);
}

tr:hover {
  background: #f8f9fa;
}

td a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

td a:hover {
  text-decoration: underline;
}

td button {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: var(--transition);
  margin-right: 5px;
}

td button:hover {
  background: #c0392b;
}

/* Error messages */
.error {
  background: #ffeaa7;
  color: #d63031;
  padding: 10px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  border-left: 4px solid #d63031;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #357abd;
}



/* Login Page */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Login Card */
.login-card {
  width: 380px;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  animation: fadeIn 0.4s ease;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 30px;
  font-weight: 500;
}

/* Improve form spacing */
.login-card form div {
  margin-bottom: 18px;
}

/* Button spacing */
.login-card button {
  margin-top: 10px;
}

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

.login-form {
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px; /* tighter gap for more even spacing */
}

.btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  transition: .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px; /* ensure consistent width for short labels */
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
}

.btn-primary:hover { background: var(--primary-hover); color: white; }

.btn-danger {
  background: var(--danger-color);
  color: white;
  border: none;
}

.btn-success {
  background: var(--success-color);
  color: white;
  border: none;
}

/* secondary button style added for edit config */
.btn-secondary {
  background: var(--secondary-color, #6c757d);
  color: white;
  border: none;
}

.btn:hover { transform: translateY(-1px); }

.select-sm {
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: white;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  /* removed gap to allow parent .actions to control spacing */
  margin: 0;
}

.inline-form button {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: .15s ease;
  text-decoration: none;
  white-space: nowrap;
}

/* Small buttons (table actions) */
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

/* Variants */
.btn-primary { background: var(--primary-color); color: white; }
.btn-success { background: var(--success-color); color: white; }
.btn-danger  { background: var(--danger-color);  color: white; }

button.btn-delete,
a.btn-delete {
  background: var(--danger-color);
  color: white;
}

button.btn-delete:hover,
a.btn-delete:hover {
  background: #b91c1c;
  color: white;
}

.btn-ghost {
  background: #eef2ff;
  color: var(--primary-color);
}

.btn:hover { transform: translateY(-1px); }

.role-admin  { background:#fee2e2; color:#dc2626; }
.role-customer   { background:#dbeafe; color:#2563eb; }


/* Better form card layout */
.form-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 32px 32px;
}

/* Header layout */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 16px;
}

.card-header h2 {
  margin: 0 0 4px 0;
}

.muted {
  color: var(--muted-text);
  font-size: 13px;
}

/* Compact centered form */
.form-compact {
  max-width: 460px;
  margin: 0 auto;
  padding: 0;
  box-shadow: none;
}

/* Tighter vertical rhythm */
.form-group {
  margin-bottom: 18px;
}

/* Stronger actions row */
.form-actions {
  margin-top: 10px;
}

/* Large primary button */
.btn-lg {
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  width: 100%;
}

input, select {
  border: 1px solid var(--border-color);
  background: #f9fafb;
}

input:focus, select:focus {
  background: white;
}

/* ===== Modern Inputs ===== */

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-color);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all .18s ease;
}

/* Hover */
input:hover,
select:hover,
textarea:hover {
  background: #f1f5f9;
  border-color: #dbe3ee;
}

/* Focus */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

/* Disabled */
input:disabled,
select:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

/* ===== Label polish ===== */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-color);
}

/* ===== Form spacing ===== */

.form-group {
  margin-bottom: 20px;
}

input, select {
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

/* Log styling */
.log-output {
  background: #f6f8fa;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  max-height: none;
  overflow-y: visible;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre;
}

.logs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.logs-toolbar {
  display: none;
}

.logs-card {
  margin-bottom: 0;
}

/* Keep log lines unwrapped in retracted mode and let height follow content. */
.logs-grid:not(.logs-expanded) .logs-card {
  height: auto;
}

.logs-grid:not(.logs-expanded) .log-output {
  max-height: 20vh;
  overflow-y: auto;
}

.logs-grid:not(.logs-expanded) .log-output code {
  white-space: pre;
}

@media (min-width: 1200px) {
  .logs-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 12px;
  }

  .logs-grid.logs-expanded {
    align-items: stretch;
  }

  .logs-grid.logs-expanded .logs-card {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
  }

  .logs-grid.logs-expanded .logs-card .log-output {
    flex: 1;
    max-height: none;
    overflow-y: auto;
  }
}

/* Card header spacing */
.card-header {
  margin-bottom: 12px;
}

/* Add subtle shadow on content cards */
.content {
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
  margin-bottom: 20px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: var(--bg-color);
  margin: 5% auto;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
  color: var(--text-color);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

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

/* Custom Checkbox Styles */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.checkbox-container:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-container label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-color);
  margin: 0;
  width: 100%;
}

/* Custom checkbox toggle switch */
.checkbox-toggle {
  position: relative;
  width: 50px;
  height: 26px;
  background: #ccc;
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkbox-toggle:before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"] {
  display: none;
}

input[type="checkbox"]:checked + .checkbox-toggle {
  background: var(--primary-color);
}

input[type="checkbox"]:checked + .checkbox-toggle:before {
  transform: translateX(24px);
}

/* Checkbox label text */
.checkbox-label {
  flex: 1;
  font-size: 14px;
}

/* Grouped grid layout for config page inputs */
#config-form {
  max-width: none;
  padding-top: 0;
}

#config-form .config-save-btn {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 8px;
  margin: 0 0 14px;
}

#config-form .config-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}

#config-form .config-stack {
  display: grid;
  gap: 16px;
}

#config-form .config-group {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
}

#config-form .config-group h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
}

#config-form .logging-group {
  height: 100%;
}

@media (max-width: 1200px) {
  #config-form .config-layout {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 820px) {
  #config-form .config-layout {
    grid-template-columns: 1fr;
  }
}


/* =========================================
   Create Process Modal
   ========================================= */

#create-process-modal.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease;
}

#create-process-modal.modal.show {
  display: flex;
}

#create-process-modal .modal-content {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.18),
    0 8px 20px rgba(15, 23, 42, 0.08);
  padding: 28px 28px 24px;
  animation: modalSlideUp 0.22s ease;
}

/* Header */
#create-process-modal h3 {
  margin: 0 32px 22px 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-color);
  letter-spacing: -0.02em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

/* Close button */
#create-process-modal .close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muted-text);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s ease;
  background: transparent;
}

#create-process-modal .close:hover {
  background: #f8fafc;
  color: var(--danger-color);
}

#create-process-modal .close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

/* Form layout */
#create-process-form {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  max-width: 100%;
}

#create-process-form .form-group {
  margin-bottom: 18px;
}

#create-process-form .form-group:last-of-type {
  margin-bottom: 22px;
}

/* Labels */
#create-process-form label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.01em;
}

/* Inputs */
#create-process-form input[type="text"],
#create-process-form input[type="number"],
#create-process-form input[type="url"] {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.18s ease;
}

#create-process-form input[type="text"]:hover,
#create-process-form input[type="number"]:hover,
#create-process-form input[type="url"]:hover {
  background: #f1f5f9;
  border-color: #dbe3ee;
}

#create-process-form input[type="text"]:focus,
#create-process-form input[type="number"]:focus,
#create-process-form input[type="url"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#create-process-form input::placeholder {
  color: #94a3b8;
}

/* Optional required field marker if you want it later */
#create-process-form label[for="process-name"]::after,
#create-process-form label[for="server-ip"]::after,
#create-process-form label[for="server-port"]::after,
#create-process-form label[for="world-name"]::after {
  content: " *";
  color: var(--danger-color);
  font-weight: 700;
}

/* Submit button */
#create-process-form .btn.btn-primary {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  transition: all 0.18s ease;
}

#create-process-form .btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
}

#create-process-form .btn.btn-primary:active {
  transform: translateY(0);
}

#create-process-form .btn.btn-primary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.14),
    0 8px 18px rgba(37, 99, 235, 0.22);
}

/* Scrollbar polish inside modal */
#create-process-modal .modal-content::-webkit-scrollbar {
  width: 10px;
}

#create-process-modal .modal-content::-webkit-scrollbar-track {
  background: transparent;
}

#create-process-modal .modal-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

#create-process-modal .modal-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* Mobile */
@media (max-width: 640px) {
  .logs-grid {
    grid-template-columns: 1fr;
  }

  #create-process-modal.modal {
    padding: 14px;
    align-items: flex-end;
  }

  #create-process-modal .modal-content {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    padding: 22px 18px 18px;
  }

  #create-process-modal h3 {
    font-size: 20px;
    margin-right: 40px;
    margin-bottom: 18px;
  }

  #create-process-modal .close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }

  #create-process-form input[type="text"],
  #create-process-form input[type="number"],
  #create-process-form input[type="url"] {
    min-height: 44px;
    font-size: 16px; /* prevents mobile zoom on some browsers */
  }
}

/* Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}