/* CSE Optimizer App — Mockup styles
   Uses brand identity from Manual de Marca v1.3
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --teal: #1FCC9A;
  --teal-dark: #179E78;
  --cyan: #45B8B0;
  --navy: #1B3A4E;
  --navy-dark: #0F2330;
  --navy-mid: #1A2D3B;
  --gray-muted: #5C7A8C;
  --gray-light: #E5ECF0;
  --gray-bg: #F5F8FA;
  --white: #FFFFFF;
  --orange: #F5A524;
  --purple: #9B59B6;
  --red: #D9534F;
  --sidebar-text: #9AB3C2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--navy);
  background: var(--gray-bg);
  -webkit-font-smoothing: antialiased;
}

/* =============== SHARED BUTTONS =============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 4px 12px rgba(31,204,154,0.3); }
.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--gray-light);
}
.btn-secondary:hover { background: var(--gray-bg); }
.btn-large { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* =============== LOGIN PAGE =============== */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-bg) 100%);
}

.login-top-bar {
  background: var(--gray-bg);
  border-bottom: 1px solid var(--gray-light);
  padding: 8px 0;
}
.login-top-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 11px;
  color: var(--gray-muted);
}

.login-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px -20px rgba(15,35,48,0.15);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

.login-brand svg.brand-mark {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

.login-brand .brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.login-brand .brand-tagline {
  font-size: 9px;
  font-weight: 500;
  color: var(--gray-muted);
  letter-spacing: 2.5px;
  margin-top: 2px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--gray-muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

.google-btn {
  width: 100%;
  padding: 13px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.google-btn:hover {
  border-color: var(--teal);
  background: var(--gray-bg);
  box-shadow: 0 4px 12px rgba(15,35,48,0.06);
}
.google-btn svg { width: 20px; height: 20px; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
  font-size: 11px;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-light);
}

.login-info {
  font-size: 12.5px;
  color: var(--gray-muted);
  text-align: center;
  line-height: 1.6;
}
.login-info a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid var(--teal);
}
.login-info a:hover { color: var(--teal-dark); }

.login-bullets {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.login-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--gray-muted);
}
.login-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-weight: 700;
  font-size: 12px;
}

.login-disclaimer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-light);
  font-size: 11.5px;
  color: var(--gray-muted);
  text-align: center;
  line-height: 1.55;
}

.login-footer {
  border-top: 1px solid var(--gray-light);
  background: var(--white);
  padding: 16px 24px;
}
.login-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--gray-muted);
}
.login-footer-legal a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px dotted var(--gray-muted);
}
.login-footer-legal a:hover { color: var(--teal); border-bottom-color: var(--teal); }

/* =============== PENDING APPROVAL PAGE =============== */
.pending-card {
  width: 100%;
  max-width: 520px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 20px 60px -20px rgba(15,35,48,0.15);
}

.pending-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  background: rgba(245,165,36,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}

.pending-card h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.pending-card .lead {
  font-size: 15px;
  color: var(--gray-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.pending-user {
  background: var(--gray-bg);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--navy);
}
.pending-user strong { color: var(--navy); font-weight: 600; }

.pending-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pending-info {
  font-size: 12.5px;
  color: var(--gray-muted);
  line-height: 1.55;
  padding-top: 20px;
  border-top: 1px solid var(--gray-light);
}

/* =============== DASHBOARD LAYOUT =============== */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--navy-dark);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.sidebar-brand .brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}
.sidebar-brand .brand-tagline {
  font-size: 8px;
  font-weight: 500;
  color: var(--sidebar-text);
  letter-spacing: 2px;
  margin-top: 1px;
}

.sidebar-nav {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.sidebar-nav li { margin: 1px 8px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.sidebar-nav a:hover {
  background: var(--navy-mid);
  color: var(--white);
}
.sidebar-nav a.active {
  background: var(--navy-mid);
  color: var(--teal);
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--teal);
  border-radius: 2px;
}
.sidebar-nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-user:hover { background: var(--navy-mid); }

.sidebar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user .meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.sidebar-user .meta .name {
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .meta .email {
  color: var(--sidebar-text);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main content area */
.main {
  background: var(--gray-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
  letter-spacing: -0.3px;
}

.main-search {
  flex: 0 0 280px;
  position: relative;
}
.main-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--gray-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--navy);
  transition: border-color 0.15s, background 0.15s;
}
.main-search input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--teal);
}
.main-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--gray-muted);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-icon:hover { background: var(--teal-dark); }
.btn-icon svg { width: 18px; height: 18px; }

.main-content {
  padding: 24px 28px 40px;
  flex: 1;
}

.main-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

/* Server cards grid */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.server-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
}
.server-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(15,35,48,0.12);
  border-color: var(--gray-muted);
}

.server-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-light);
}
.server-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.3px;
}
.server-card-status {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(31,204,154,0.18);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 10px;
}
.metric-donut {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.metric-info {
  flex: 1;
  min-width: 0;
}
.metric-label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.metric-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 1px;
  line-height: 1.1;
}
.metric-value.warning { color: var(--orange); }

/* =============== KEBAB MENU =============== */
.kebab {
  position: relative;
}
.kebab summary {
  list-style: none;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-muted);
  transition: background 0.15s, color 0.15s;
}
.kebab summary::-webkit-details-marker { display: none; }
.kebab summary:hover {
  background: var(--gray-bg);
  color: var(--navy);
}
.kebab[open] summary {
  background: var(--gray-bg);
  color: var(--navy);
}
.kebab-menu {
  position: absolute;
  top: 32px;
  right: 0;
  min-width: 170px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(15,35,48,0.18);
  padding: 6px;
  z-index: 50;
}
.kebab-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.kebab-menu button:hover { background: var(--gray-bg); }
.kebab-menu button svg { width: 16px; height: 16px; flex-shrink: 0; }
.kebab-menu .menu-divider {
  height: 1px;
  background: var(--gray-light);
  margin: 4px 0;
}
.kebab-menu .danger { color: var(--red); }
.kebab-menu .danger:hover { background: rgba(217,83,79,0.08); }

/* Header re-layout for card with kebab */
.server-card-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =============== DASHBOARD OVERVIEW =============== */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy-dark) 0%, #14283A 100%);
  color: var(--white);
  border-radius: 14px;
  padding: 26px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.welcome-banner h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.welcome-banner p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.7);
  max-width: 540px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-card-label svg { width: 12px; height: 12px; }
.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  line-height: 1;
}
.stat-card-meta {
  font-size: 11.5px;
  color: var(--gray-muted);
  margin-top: 6px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.action-tile {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--navy);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.action-tile:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: 0 10px 24px -10px rgba(15,35,48,0.12);
}
.action-tile-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(31,204,154,0.12);
  color: var(--teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-tile-icon svg { width: 20px; height: 20px; }
.action-tile h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.action-tile p {
  font-size: 12.5px;
  color: var(--gray-muted);
  line-height: 1.5;
}

.dashboard-cols {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}
.dashboard-panel {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 20px;
}
.dashboard-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dashboard-panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.dashboard-panel-header a {
  font-size: 12px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

/* Activity feed */
.activity-list { list-style: none; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: var(--gray-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}
.activity-dot svg { width: 14px; height: 14px; }
.activity-text {
  flex: 1;
  font-size: 12.5px;
  color: var(--navy);
  line-height: 1.55;
}
.activity-time {
  font-size: 11px;
  color: var(--gray-muted);
  margin-top: 2px;
}

/* Top servers list */
.top-servers { list-style: none; }
.top-server-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-light);
  font-size: 13px;
}
.top-server-item:last-child { border-bottom: none; }
.top-server-name {
  font-weight: 600;
  color: var(--teal);
  font-size: 12px;
}
.top-server-meta {
  font-size: 11px;
  color: var(--gray-muted);
  margin-top: 2px;
}
.top-server-pct {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
}
.top-server-pct.warning { color: var(--orange); }

/* =============== MERGE BANNER =============== */
.merge-banner {
  background: linear-gradient(90deg, rgba(31,204,154,0.10), rgba(69,184,176,0.06));
  border: 1px solid rgba(31,204,154,0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.merge-banner-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--teal);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.merge-banner-icon svg { width: 20px; height: 20px; }
.merge-banner-text {
  flex: 1;
}
.merge-banner-text strong {
  display: block;
  font-size: 13.5px;
  color: var(--navy);
  margin-bottom: 2px;
}
.merge-banner-text span {
  font-size: 12px;
  color: var(--gray-muted);
}

/* =============== PROVIDER CARDS =============== */
.providers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.provider-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.provider-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.provider-card-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.provider-card-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.provider-card-status.connected {
  background: rgba(31,204,154,0.14);
  color: var(--teal-dark);
}
.provider-card-status.not-connected {
  background: var(--gray-bg);
  color: var(--gray-muted);
}
.provider-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.provider-card .desc {
  font-size: 12.5px;
  color: var(--gray-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}
.provider-card .meta {
  font-size: 11.5px;
  color: var(--gray-muted);
  margin-bottom: 14px;
}
.provider-card .meta strong { color: var(--navy); }

/* =============== FORMS (request/connect) =============== */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 28px;
  max-width: 680px;
}
.form-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-card p.sub {
  font-size: 13px;
  color: var(--gray-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}
.form-group {
  margin-bottom: 18px;
}
.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  background: var(--white);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31,204,154,0.15);
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235C7A8C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
textarea.form-control { resize: vertical; min-height: 90px; font-family: inherit; }

.spec-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.spec-tile {
  background: var(--gray-bg);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.spec-tile-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}
.spec-tile .form-control {
  background: var(--white);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.info-banner {
  background: rgba(31,204,154,0.08);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--navy);
  line-height: 1.6;
}
.info-banner strong { font-weight: 600; }

.code-block {
  background: var(--navy-dark);
  color: #9AE6CA;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 14px;
  overflow-x: auto;
}
.code-block .comment { color: #6B859A; }

/* Method tabs */
.method-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--gray-bg);
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
}
.method-tab {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-muted);
  background: none;
  border: none;
  cursor: pointer;
}
.method-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 2px 4px rgba(15,35,48,0.06);
}

/* =============== USER DROPDOWN (sidebar) =============== */
details.user-menu { position: relative; }
details.user-menu summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
details.user-menu summary::-webkit-details-marker { display: none; }
details.user-menu summary:hover { background: var(--navy-mid); }
details.user-menu[open] summary { background: var(--navy-mid); }
details.user-menu .user-menu-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 -8px 28px rgba(15,35,48,0.18);
  z-index: 50;
}
details.user-menu .user-menu-popup a,
details.user-menu .user-menu-popup button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
details.user-menu .user-menu-popup a:hover,
details.user-menu .user-menu-popup button:hover {
  background: var(--gray-bg);
}
details.user-menu .user-menu-popup svg {
  width: 16px;
  height: 16px;
  color: var(--gray-muted);
  flex-shrink: 0;
}
details.user-menu .user-menu-popup .menu-divider {
  height: 1px;
  background: var(--gray-light);
  margin: 4px 0;
}
details.user-menu .user-menu-popup .danger { color: var(--red); }
details.user-menu .user-menu-popup .danger svg { color: var(--red); }
details.user-menu .user-menu-popup .danger:hover { background: rgba(217,83,79,0.08); }

/* =============== MODAL =============== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,35,48,0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  overflow-y: auto;
  padding: 60px 20px;
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  padding: 0;
  box-shadow: 0 30px 80px -20px rgba(15,35,48,0.4);
  overflow: hidden;
}
.modal-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}
.modal-header .modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-muted);
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.modal-header .modal-close:hover { background: var(--gray-bg); color: var(--navy); }
.modal-body { padding: 22px 28px; }
.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--gray-light);
  background: var(--gray-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Merge suggestion items */
.merge-step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}
.merge-suggestion {
  border: 1.5px solid var(--gray-light);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.merge-suggestion:hover { border-color: var(--gray-muted); }
.merge-suggestion.selected {
  border-color: var(--teal);
  background: rgba(31,204,154,0.04);
}
.merge-suggestion-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.merge-suggestion-radio {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gray-light);
  border-radius: 50%;
  position: relative;
  background: var(--white);
}
.merge-suggestion.selected .merge-suggestion-radio {
  border-color: var(--teal);
  background: var(--teal);
}
.merge-suggestion.selected .merge-suggestion-radio::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--white);
  border-radius: 50%;
}
.merge-suggestion-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  flex: 1;
}
.merge-saving {
  background: rgba(31,204,154,0.14);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.merge-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 10px 0 12px;
}
.merge-pair-server {
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 10px 14px;
}
.merge-pair-server-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
}
.merge-pair-server-meta {
  font-size: 11px;
  color: var(--gray-muted);
  line-height: 1.5;
}
.merge-pair-arrow {
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.merge-pair-arrow svg { width: 22px; height: 22px; }
.merge-reason {
  font-size: 12.5px;
  color: var(--navy);
  background: var(--gray-bg);
  padding: 10px 14px;
  border-radius: 8px;
  line-height: 1.55;
}
.merge-reason strong { color: var(--teal-dark); font-weight: 600; }

/* Merge step indicator */
.merge-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  align-items: center;
}
.merge-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-muted);
}
.merge-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gray-bg);
  color: var(--gray-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.merge-step.active .merge-step-num { background: var(--teal); color: var(--white); }
.merge-step.active { color: var(--navy); }
.merge-step.complete .merge-step-num { background: rgba(31,204,154,0.18); color: var(--teal-dark); }
.merge-step-line { flex: 0 0 16px; height: 1px; background: var(--gray-light); }

/* Schedule pickers */
.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Pending merger badge on cards */
.server-card.pending-merger {
  background: linear-gradient(180deg, rgba(245,165,36,0.04), var(--white));
  border-color: rgba(245,165,36,0.4);
}
.pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,165,36,0.14);
  color: #B07414;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.pending-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  animation: pendingPulse 2s ease-in-out infinite;
}
@keyframes pendingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.server-card.pending-merger .server-card-status { display: none; }

/* =============== ACCOUNT PAGES (profile/billing/settings) =============== */
.settings-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 24px;
}
.settings-tab {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.settings-tab:hover { color: var(--navy); }
.settings-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.account-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}
.account-side {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  height: fit-content;
}
.account-avatar {
  width: 96px;
  height: 96px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 36px;
  font-weight: 700;
  margin: 0 auto 14px;
}
.account-side h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}
.account-side .email {
  font-size: 12px;
  color: var(--gray-muted);
  margin-bottom: 14px;
}
.account-meta {
  font-size: 11px;
  color: var(--gray-muted);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-light);
  line-height: 1.7;
}

/* Billing */
.billing-summary {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.billing-plan {
  background: linear-gradient(135deg, #1A2D3B 0%, #0F2330 100%);
  color: var(--white);
  border-radius: 14px;
  padding: 24px;
}
.billing-plan h3 {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}
.billing-plan .plan-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.billing-plan .plan-price {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 18px;
}
.billing-plan .plan-bullets {
  list-style: none;
  font-size: 12.5px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 18px;
}
.billing-plan .plan-bullets li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
  line-height: 1.5;
}
.billing-plan .plan-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-weight: 700;
}
.billing-next {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 14px;
  padding: 22px;
}
.billing-next h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}
.billing-next .amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.billing-next .date {
  font-size: 12.5px;
  color: var(--gray-muted);
  margin-top: 4px;
  margin-bottom: 16px;
}
.billing-next .method {
  font-size: 12.5px;
  color: var(--navy);
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
}
.invoice-table th,
.invoice-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
}
.invoice-table th {
  background: var(--gray-bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.invoice-table tr { border-bottom: 1px solid var(--gray-light); }
.invoice-table tr:last-child { border-bottom: none; }
.invoice-table .status-paid {
  background: rgba(31,204,154,0.14);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Settings toggle */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-light);
}
.setting-row:last-child { border-bottom: none; }
.setting-row-text { flex: 1; padding-right: 20px; }
.setting-row-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}
.setting-row-text span {
  font-size: 12px;
  color: var(--gray-muted);
  line-height: 1.5;
}
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--gray-light);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  box-shadow: 0 2px 4px rgba(15,35,48,0.15);
  transition: transform 0.2s;
}
.toggle.on { background: var(--teal); }
.toggle.on::after { transform: translateX(20px); }

/* =============== RESPONSIVE =============== */
@media (max-width: 1100px) {
  .servers-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .servers-grid { grid-template-columns: 1fr; }
  .main-search { flex: 1; }
  .login-footer-inner { flex-direction: column; }
}

/* =============================================================
   MOBILE OPTIMIZATIONS (Level 1 + 2 + 3)
   Append-only. Desktop layout untouched above 881px.
   ============================================================= */

/* Hamburger button (auto-injected by auth.js on app pages) */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 35, 48, 0.10);
}
.mobile-menu-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--navy);
}
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 35, 48, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1050;
  animation: fadeIn 0.2s ease;
}
.mobile-drawer-overlay.open { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ----------- Tablet/Mobile breakpoint (<= 880px) ----------- */
@media (max-width: 880px) {
  /* Sidebar becomes off-canvas drawer */
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    z-index: 1100;
    transition: left 0.28s ease;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.35);
  }
  .sidebar.open { left: 0; }
  .mobile-menu-toggle { display: flex; }
  body.drawer-open { overflow: hidden; }

  /* Main content uses full width with hamburger space */
  .main { padding: 0; }
  .main-header {
    padding: 18px 20px 14px 70px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .main-title { font-size: 22px; }
  .main-search { flex: 1; min-width: 100%; order: 2; }
  .main-content { padding: 14px 16px 28px; }

  /* Server grid + cards (Server Monitoring) */
  .servers-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .server-card { padding: 16px 18px; }
  .server-card-header h3 { font-size: 14px; }
  .server-card-donuts {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .donut-label { font-size: 9px; }
  .donut-pct { font-size: 13px; }

  /* Merge banner stacks */
  .welcome-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 22px 22px;
  }
  .welcome-banner > a,
  .welcome-banner > .btn { width: 100%; text-align: center; min-height: 48px; }

  .merge-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px;
  }
  .merge-banner > .btn { width: 100%; }

  /* Merge modal full-screen */
  .modal-backdrop { padding: 0; align-items: stretch; }
  .modal {
    width: 100%;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    margin: 0;
  }
  .modal-body { padding: 18px 16px 24px; }
  .merge-steps { gap: 4px; }
  .merge-step-line { display: none; }
  .merge-suggestion { padding: 14px 12px; }
  .merge-pair {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  .merge-pair-arrow { display: none; }

  /* Dashboard stats — 2x2 grid on tablet, 1x4 below */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .stat-card { padding: 14px 16px; }
  .stat-card .stat-value { font-size: 26px; }
  .quick-actions {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .dashboard-bottom,
  .dashboard-cols {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Forms — all 1-col */
  .form-row,
  .form-row-two,
  .account-grid,
  .billing-summary,
  .form-row-three,
  .form-row-four,
  .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .form-control,
  .auth-input,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    padding: 12px 14px;
    font-size: 16px;  /* prevents iOS auto-zoom */
    min-height: 44px;
    box-sizing: border-box;
  }

  /* Buttons larger touch targets */
  .btn {
    padding: 12px 20px;
    min-height: 44px;
    font-size: 14px;
  }
  .btn-large { padding: 14px 22px; font-size: 15px; }
  .kebab-trigger { width: 36px; height: 36px; }

  /* User menu popup spans full bottom */
  .user-menu-popup {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  /* Login card */
  .login-card { padding: 26px 22px; }
  .login-title { font-size: 22px; }

  /* Pending card */
  .pending-card { padding: 32px 22px; }
  .pending-card h1 { font-size: 24px; }

  /* Profile / Billing / Settings — tighter */
  .settings-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .settings-tab { white-space: nowrap; flex-shrink: 0; }
  .profile-avatar-lg { width: 80px; height: 80px; }
  .plan-card { padding: 18px 16px; }
  .plan-card .price { font-size: 28px; }

  /* Invoice History table -> stacked cards on mobile */
  .invoice-table { display: block; }
  .invoice-table thead { display: none; }
  .invoice-table tbody { display: block; }
  .invoice-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
  }
  .invoice-table td {
    display: block;
    padding: 2px 0;
    border: none;
    font-size: 13px;
  }
  .invoice-table td:first-child {
    font-weight: 600;
    color: var(--navy);
    grid-column: 1;
  }
  .invoice-table td:last-child {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
  }

  /* Code blocks (Connect Server) scroll horizontally */
  .code-block {
    font-size: 11px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Method tabs (Connect Server) */
  .method-tabs { flex-direction: column; gap: 6px; }
  .method-tab { width: 100%; }

  /* Step indicators (Connect Server) */
  .step-indicator { font-size: 13px; }

  /* Sidebar drawer interior tightening on mobile */
  .sidebar-brand { padding: 18px 18px; }
  .sidebar-nav a { padding: 13px 18px; min-height: 48px; font-size: 14px; }
  .sidebar-footer { padding: 14px 14px 22px; }
  .sidebar-user { padding: 12px; }
}

/* ----------- Smaller phones (<= 400px) ----------- */
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr !important; }
  .main-title { font-size: 20px; }
  .server-card-donuts { gap: 6px; }
  .donut-pct { font-size: 12px; }
  .login-card { padding: 22px 18px; }
}

/* ----------- Touch device hover suppression ----------- */
@media (hover: none) {
  .btn:hover, .sidebar-nav a:hover, .server-card:hover { transform: none; }
}

/* ----------- Larger touch targets for tablets ----------- */
@media (max-width: 1100px) and (min-width: 881px) {
  .servers-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============== Server section header (search inline with title) =============== */
.servers-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.servers-section-header .main-section-title {
  margin: 0;
}
.main-search-inline {
  flex: 0 1 320px;
  min-width: 220px;
}
.main-search-inline input {
  width: 100%;
}

@media (max-width: 880px) {
  .servers-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .main-search-inline {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
}
