/* ============================================================
   BackupVault — Premium Dark UI
   ============================================================ */

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

:root {
  --bg-base: #0a0c12;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 179, 237, 0.5);

  --text-primary: #f0f2f8;
  --text-secondary: #8892a4;
  --text-muted: #4a556a;

  --accent-teal: #00d4aa;
  --accent-purple: #a78bfa;
  --accent-blue: #60a5fa;
  --accent-orange: #fb923c;
  --accent-red: #f87171;
  --accent-green: #4ade80;

  --grad-teal: linear-gradient(135deg, #00d4aa, #0099cc);
  --grad-purple: linear-gradient(135deg, #a78bfa, #7c3aed);
  --grad-green: linear-gradient(135deg, #4ade80, #22c55e);
  --grad-red: linear-gradient(135deg, #f87171, #dc2626);

  --sidebar-w: 230px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --transition: all .2s ease;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, .4);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, .7);
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ---- Ambient Background ---- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .12;
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: #00d4aa;
  top: -150px;
  left: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: #7c3aed;
  bottom: -100px;
  right: -80px;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: #60a5fa;
  top: 40%;
  left: 40%;
  transform: translate(-50%, -50%);
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(10, 12, 18, .85);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--grad-teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  background: var(--grad-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(0, 212, 170, .12);
  color: var(--accent-teal);
}

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

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.server-count-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .5;
    transform: scale(0.85);
  }
}

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

/* ---- Top Header ---- */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 18, .6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(0, 212, 170, .12);
  color: var(--accent-teal);
  border: 1px solid rgba(0, 212, 170, .2);
  transition: var(--transition);
}

.status-badge.busy {
  background: rgba(251, 146, 60, .12);
  color: var(--accent-orange);
  border-color: rgba(251, 146, 60, .2);
}

.status-badge.error {
  background: rgba(248, 113, 113, .12);
  color: var(--accent-red);
  border-color: rgba(248, 113, 113, .2);
}

/* ---- Tabs ---- */
.tab-content {
  display: none;
  padding: 28px;
}

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

/* ---- Stat Cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.teal {
  background: rgba(0, 212, 170, .15);
  color: var(--accent-teal);
}

.stat-icon.purple {
  background: rgba(167, 139, 250, .15);
  color: var(--accent-purple);
}

.stat-icon.blue {
  background: rgba(96, 165, 250, .15);
  color: var(--accent-blue);
}

.stat-icon.orange {
  background: rgba(251, 146, 60, .15);
  color: var(--accent-orange);
}

.stat-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---- Section cards ---- */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
}

.section-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---- Forms ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.req {
  color: var(--accent-red);
}

.form-input,
.form-select {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 12px;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, .07);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select option {
  background: #1a1e2a;
}

.form-select-sm {
  width: auto;
  min-width: 130px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.form-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12.5px;
}

.btn-primary {
  background: var(--grad-teal);
  color: #fff;
}

.btn-success {
  background: var(--grad-green);
  color: #fff;
}

.btn-danger {
  background: var(--grad-red);
  color: #fff;
}

.btn-ghost {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.btn-primary:hover,
.btn-success:hover,
.btn-danger:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.btn-icon-only {
  padding: 8px;
}

/* Spinner */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Log box */
.log-box {
  margin-top: 16px;
  background: rgba(0, 0, 0, .4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

.log-box.success {
  border-color: rgba(74, 222, 128, .3);
  color: var(--accent-green);
}

.log-box.error {
  border-color: rgba(248, 113, 113, .3);
  color: var(--accent-red);
}

.hidden {
  display: none !important;
}

/* ---- Backup List ---- */
.backup-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.date-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  margin-top: 16px;
}

.date-group-header:first-child {
  margin-top: 0;
}

.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: var(--transition);
}

.backup-item:hover {
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
}

.backup-item:last-child {
  border-bottom: none;
}

.backup-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.backup-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.backup-icon.mysql {
  background: rgba(96, 165, 250, .15);
  color: var(--accent-blue);
}

.backup-icon.code {
  background: rgba(167, 139, 250, .15);
  color: var(--accent-purple);
}

.backup-info {
  min-width: 0;
}

.backup-filename {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace;
}

.backup-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.backup-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-mysql {
  background: rgba(96, 165, 250, .15);
  color: var(--accent-blue);
}

.badge-code {
  background: rgba(167, 139, 250, .15);
  color: var(--accent-purple);
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---- Server Cards ---- */
.server-card-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  gap: 12px;
  transition: var(--transition);
}

.server-card:hover {
  background: var(--bg-card-hover);
}

.server-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--grad-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.server-card-name {
  font-size: 14px;
  font-weight: 600;
}

.server-card-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.server-card-actions {
  display: flex;
  gap: 8px;
}

/* Server preview */
.server-preview {
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.preview-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.preview-val {
  font-size: 13px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal {
  background: #111420;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  animation: slideUp .25s ease;
}

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

  to {
    transform: none;
    opacity: 1
  }
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.modal-body {
  overflow-y: auto;
  padding: 20px 24px;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ---- Toasts ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #1a1e2a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  animation: toastIn .25s ease;
  max-width: 380px;
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0
  }

  to {
    transform: none;
    opacity: 1
  }
}

.toast.success {
  border-color: rgba(74, 222, 128, .3);
}

.toast.error {
  border-color: rgba(248, 113, 113, .3);
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast.success .toast-dot {
  background: var(--accent-green);
}

.toast.error .toast-dot {
  background: var(--accent-red);
}

.toast.info .toast-dot {
  background: var(--accent-blue);
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 13.5px;
}

/* ---- Schedule-specific ---- */
.cron-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.preset-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.preset-btn {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.preset-btn:hover {
  background: rgba(0, 212, 170, .12);
  color: var(--accent-teal);
  border-color: rgba(0, 212, 170, .3);
}

.cron-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.cron-preview-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, .3);
  border-radius: 6px;
  padding: 8px 12px;
}

.cron-preview-line code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-teal);
  font-size: 12.5px;
}

.cron-desc {
  color: var(--text-secondary);
  font-size: 12px;
}

/* Toggle switch */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 6px;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 38px;
  height: 20px;
  background: rgba(255, 255, 255, .1);
  border-radius: 20px;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent-teal);
}

.toggle-switch input:checked+.toggle-slider::after {
  transform: translateX(18px);
}

.toggle-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Schedule card status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.active {
  background: var(--accent-green);
  box-shadow: 0 0 6px rgba(74, 222, 128, .5);
}

.status-dot.paused {
  background: var(--text-muted);
}

.status-dot.error {
  background: var(--accent-red);
  box-shadow: 0 0 6px rgba(248, 113, 113, .5);
}

.schedule-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  gap: 12px;
  transition: var(--transition);
}

.schedule-card:hover {
  background: var(--bg-card-hover);
}

.schedule-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.schedule-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 212, 170, .12);
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.schedule-card-name {
  font-size: 14px;
  font-weight: 600;
}

.schedule-card-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.next-run-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  background: rgba(96, 165, 250, .12);
  color: var(--accent-blue);
  border: 1px solid rgba(96, 165, 250, .2);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    display: none;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .server-preview {
    grid-template-columns: 1fr 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cron-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ---- SSH Auth Mode Tabs ---- */
.auth-mode-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: rgba(0,0,0,.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin: 14px 0 10px;
}
.auth-mode-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .03em;
  margin-right: 4px;
  white-space: nowrap;
}
.auth-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab:hover { background: rgba(255,255,255,.06); color: var(--text-primary); }
.auth-tab.active {
  background: rgba(0,212,170,.14);
  border-color: rgba(0,212,170,.3);
  color: var(--accent-teal);
  font-weight: 500;
}
.auth-panel { margin-bottom: 4px; }

/* Key textarea */
.key-textarea {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  resize: vertical;
  letter-spacing: 0;
  min-height: 110px;
}

/* Key stored badge */
.key-stored-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,212,170,.1);
  border: 1px solid rgba(0,212,170,.25);
  color: var(--accent-teal);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}

/* Key encrypt hint */
.key-encrypt-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(0,0,0,.2);
  border-radius: 6px;
  padding: 7px 10px;
  margin-top: 6px;
  line-height: 1.5;
}
.key-encrypt-hint code {
  background: rgba(255,255,255,.07);
  border-radius: 3px;
  padding: 1px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

/* ---- MySQL Backup Wizard ---- */
.wizard-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.wizard-step:last-child { border-bottom: none; }
.wizard-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,212,170,.15);
  color: var(--accent-teal);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* DB list grid */
.db-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 2px;
}
.db-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,.03);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.db-item:hover { background: rgba(0,212,170,.08); border-color: rgba(0,212,170,.25); }
.db-item.selected {
  background: rgba(0,212,170,.15);
  border-color: rgba(0,212,170,.5);
  color: var(--accent-teal);
}
.db-item svg { flex-shrink: 0; }

/* count chip inside label */
.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,212,170,.15);
  color: var(--accent-teal);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  margin-left: 6px;
}

/* Format picker cards */
.format-picker {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.format-card {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 220px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.03);
  cursor: pointer;
  transition: var(--transition);
}
.format-card input[type="radio"] { display: none; }
.format-card:hover { background: rgba(255,255,255,.06); }
.format-card.active {
  border-color: rgba(0,212,170,.5);
  background: rgba(0,212,170,.08);
}
.format-card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.format-card-icon.teal { background: rgba(0,212,170,.15); color: var(--accent-teal); }
.format-card-icon.blue { background: rgba(96,165,250,.15); color: var(--accent-blue); }
.format-card-title { font-size: 13.5px; font-weight: 600; }
.format-card-desc { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; line-height: 1.5; }
.format-card-desc code { background: rgba(255,255,255,.07); border-radius: 3px; padding: 1px 4px; font-size: 11px; }

/* ---- AWS Account Cards ---- */
.aws-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.aws-account-card:hover { background: rgba(255,255,255,.06); border-color: rgba(0,212,170,.3); }
.aws-account-info { flex: 1; min-width: 0; }
.aws-account-name { font-weight: 600; font-size: 14px; }
.aws-account-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aws-account-badge {
  padding: 3px 9px;
  background: rgba(0,212,170,.12);
  color: var(--accent-teal);
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid rgba(0,212,170,.25);
  white-space: nowrap;
}
.aws-account-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---- Directory Browser ---- */
.dir-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 10px;
  background: rgba(0,0,0,.2);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.dir-crumb {
  color: var(--accent-teal);
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 3px;
  transition: var(--transition);
}
.dir-crumb:hover { background: rgba(0,212,170,.15); }
.dir-crumb-sep { color: var(--text-muted); }
.dir-crumb-current { color: var(--text-primary); font-weight: 500; }

.dir-browser {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.15);
}
.dir-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  font-size: 13px;
}
.dir-entry:last-child { border-bottom: none; }
.dir-entry:hover { background: rgba(255,255,255,.05); }
.dir-entry.selected { background: rgba(0,212,170,.12); color: var(--accent-teal); }
.dir-entry-icon { flex-shrink: 0; }
.dir-entry-icon.folder { color: #f6c90e; }
.dir-entry-icon.file   { color: var(--text-muted); }
.dir-entry-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-entry-meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.dir-entry-nav-icon { color: var(--text-muted); flex-shrink: 0; }

.dir-selected-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.25);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--accent-teal);
}
.dir-selected-bar code {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
}

/* ---- Download Bar ---- */
.download-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-top: 10px;
  background: rgba(0,212,170,.07);
  border: 1px solid rgba(0,212,170,.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.download-bar .download-label { flex: 1; color: var(--text-secondary); }
.download-bar .download-label code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-primary);
}

/* ---- Auth / User bar ---- */
.user-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #0d1a16;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.btn-xs { padding: 4px 10px; font-size: 12px; }

/* ---- Permissions grid ---- */
.perms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.perm-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.03);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  transition: var(--transition);
  user-select: none;
}
.perm-chip input { display: none; }
.perm-chip:hover { background: rgba(0,212,170,.08); }
.perm-chip.checked { border-color: rgba(0,212,170,.5); background: rgba(0,212,170,.1); color: var(--accent-teal); }
.perm-check { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; display: flex; align-items: center; justify-content: center; }
.perm-chip.checked .perm-check { background: var(--accent-teal); border-color: var(--accent-teal); }

/* ---- User card ---- */
.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.user-card:hover { background: rgba(255,255,255,.06); }
.user-card-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #0d1a16;
  flex-shrink: 0;
}
.user-card-info { flex: 1; min-width: 0; }
.user-card-name { font-weight: 600; font-size: 14px; }
.user-card-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.user-badge {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 20px; font-size: 10.5px; font-weight: 600;
  border-width: 1px; border-style: solid;
}
.user-badge.admin { background: rgba(0,212,170,.1); color: var(--accent-teal); border-color: rgba(0,212,170,.3); }
.user-badge.user  { background: rgba(96,165,250,.1); color: var(--accent-blue); border-color: rgba(96,165,250,.3); }
