/* ==========================================================================
   Pepe Tab — Profiles Editor: Stylesheet
   Modern Dark Theme with rich aesthetics, glassmorphism and micro-animations
   ========================================================================== */

:root {
  --bg-main: #0b0f17;
  --bg-sidebar: #101622;
  --bg-card: #151d2c;
  --bg-card-hover: #1c263a;
  --bg-card-active: #202c42;
  --bg-input: #0e131d;
  --bg-table-row-alt: #121824;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --border-active: #2563eb;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-code: #38bdf8;
  
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-success: #10b981;
  --accent-success-hover: #059669;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-danger-hover: #dc2626;
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* View Container */
.view-container {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* ==================== LOGIN VIEW ==================== */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #172439 0%, var(--bg-main) 70%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(21, 29, 44, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  color: var(--accent-primary);
}

.brand-icon {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.login-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.login-subtitle code {
  color: var(--text-code);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon-sm {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper input {
  padding-left: 40px;
}

.sidebar-search .input-wrapper input {
  padding-left: 32px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 0.85rem;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-footer-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.login-footer-hint b {
  color: var(--text-primary);
}

.login-footer-hint code {
  color: var(--text-code);
  background: rgba(56, 189, 248, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Alert Boxes */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
}

.alert-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.btn-success {
  background: var(--accent-success);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.btn-success:hover {
  background: var(--accent-success-hover);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-danger-ghost {
  background: transparent;
  color: #f87171;
  padding: 6px;
}
.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.btn-icon-only {
  padding: 6px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.btn-icon-only.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
  padding: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 12px;
}

.badge-accent {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

/* ==================== TOP NAVIGATION ==================== */
.top-nav {
  height: 58px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 10;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-icon-sm {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.file-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  padding-left: 16px;
  border-left: 1px solid var(--border-subtle);
}

.file-tag {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-code);
  font-size: 0.8rem;
}

.stat-text {
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
  margin: 0 4px;
}

/* ==================== MAIN 2-COLUMN LAYOUT ==================== */
.main-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  height: calc(100vh - 58px);
}

/* Left Sidebar (Devices List) */
.sidebar {
  width: 320px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.sidebar-search {
  padding: 0 16px 12px;
}

.devices-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Device Card */
.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.device-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.device-card.active {
  background: var(--bg-card-active);
  border-color: var(--border-focus);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.device-card.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.device-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.device-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.device-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.device-card:hover .device-card-actions {
  opacity: 1;
}

/* Right Content Panel */
.content-panel {
  flex: 1;
  background: var(--bg-main);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  max-width: 440px;
  font-size: 0.92rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Editor State */
.editor-state {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Device Card Header in Editor */
.device-card-header {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.device-meta-form {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

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

.device-meta-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-meta-form .form-group > label,
.label-with-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 22px;
  margin: 0;
  line-height: 1.2;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.dev-type-group {
  width: 330px;
  flex-shrink: 0;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.dev-type-select {
  width: 100%;
  height: 42px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0 36px 0 14px;
  font-size: 0.90rem;
  font-family: inherit;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dev-type-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dev-type-select option {
  background: #1e293b;
  color: #f1f5f9;
  padding: 8px 12px;
}

#dev-name-input {
  height: 42px;
  box-sizing: border-box;
}

.addressing-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #bfdbfe;
}

.hint-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-primary);
}

/* Registers Section */
.registers-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.registers-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.registers-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.registers-title {
  font-size: 1.1rem;
  font-weight: 600;
}

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

.test-x-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.input-mini {
  width: 80px !important;
  padding: 4px 8px !important;
  font-size: 0.85rem !important;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Table */
.table-container {
  overflow-x: auto;
}

.registers-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  text-align: left;
}

.registers-table th {
  background: #111724;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.sub-th {
  text-transform: none;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.registers-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

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

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

.row-index {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
}

.table-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.88rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.table-input.font-mono {
  font-family: var(--font-mono);
}

.table-input:focus {
  border-color: var(--border-focus);
}

.screen-addr-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Formula Test Result Badge */
.formula-result {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.formula-result.valid {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.formula-result.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.empty-table-msg {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==================== BACKUPS MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 94%;
  max-width: 920px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  animation: scaleIn 0.25s ease-out;
}

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.modal-title-group h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.modal-body {
  padding: 22px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.backups-table-container {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  background: rgba(14, 19, 29, 0.6);
}

.backups-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.backups-table th {
  background: #111724;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.backups-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

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

.backups-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.backup-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.backup-filename {
  font-family: var(--font-mono);
  color: var(--text-code);
  font-size: 0.85rem;
  word-break: break-all;
}

.backup-size {
  white-space: nowrap;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.backup-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.backup-actions .btn {
  padding: 7px 14px;
  font-size: 0.85rem;
}

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

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

.toast {
  pointer-events: auto;
  background: #1e2738;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease-out;
  min-width: 280px;
  max-width: 420px;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
  background: #132422;
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: #2b171c;
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.toast.success .toast-icon { color: var(--accent-success); }
.toast.error .toast-icon { color: var(--accent-danger); }
