/* ============================================================
   SETUP.CSS
   Dashboard Setup Center — tabs, list cards, item rows,
   and the compact add/edit modal.
   ============================================================ */


/* ——————————————————————————————————————————————————————————
   TAB STRIP
   —————————————————————————————————————————————————————————— */
.setup-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid rgba(231,207,207,0.3);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.setup-tab {
  padding: 9px 18px 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.setup-tab:hover {
  color: var(--text-secondary);
  background: rgba(231,207,207,0.1);
}
.setup-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--rose);
  background: rgba(231,207,207,0.12);
}


/* ——————————————————————————————————————————————————————————
   PANELS
   —————————————————————————————————————————————————————————— */
.setup-panel { display: none; }
.setup-panel.active { display: block; }


/* ——————————————————————————————————————————————————————————
   LIST CARD GRID — 2 columns, responsive
   —————————————————————————————————————————————————————————— */
.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}


/* ——————————————————————————————————————————————————————————
   LIST CARD
   —————————————————————————————————————————————————————————— */
.setup-list-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.setup-list-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(231,207,207,0.2);
}

.setup-list-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.setup-list-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.setup-list-count {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(231,207,207,0.22);
  border-radius: 50px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}


/* ——————————————————————————————————————————————————————————
   LIST ITEMS
   —————————————————————————————————————————————————————————— */
.setup-list-items {
  padding: 8px 0;
  min-height: 40px;
}

.setup-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 22px 7px 22px;
  gap: 10px;
  transition: background 0.12s ease;
}
.setup-list-item:hover {
  background: rgba(231,207,207,0.1);
}

.setup-item-text {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.setup-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.setup-list-item:hover .setup-item-actions {
  opacity: 1;
}

.setup-item-edit-btn,
.setup-item-delete-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
  color: var(--text-muted);
  padding: 0;
}

.setup-item-edit-btn:hover {
  background: rgba(231,207,207,0.3);
  color: var(--rose);
}

.setup-item-delete-btn:hover {
  background: rgba(217,180,180,0.2);
  color: #b06060;
}

.setup-empty-items {
  padding: 16px 22px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}


/* ——————————————————————————————————————————————————————————
   ADD OPTION BUTTON — card footer
   —————————————————————————————————————————————————————————— */
.setup-add-btn {
  display: block;
  width: 100%;
  padding: 11px 22px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--rose);
  background: rgba(231,207,207,0.1);
  border: none;
  border-top: 1px solid rgba(231,207,207,0.2);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.setup-add-btn:hover {
  background: rgba(231,207,207,0.22);
  color: #8a3535;
}


/* ——————————————————————————————————————————————————————————
   MODAL SIZE OVERRIDE — compact single-input modal
   —————————————————————————————————————————————————————————— */
.setup-modal-sm {
  max-width: 400px;
}


/* ——————————————————————————————————————————————————————————
   SETUP MODAL HINT — duplicate warning
   —————————————————————————————————————————————————————————— */
.setup-modal-hint {
  font-size: 11.5px;
  color: #b06060;
  margin-top: 5px;
  min-height: 16px;
  line-height: 1.4;
}


/* ——————————————————————————————————————————————————————————
   BACKUP & RESTORE PANEL
   —————————————————————————————————————————————————————————— */
.backup-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 860px;
}

.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.backup-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.backup-card-danger-wrap {
  border: 1px solid rgba(217,180,180,0.4);
}

.backup-danger-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.backup-card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.backup-card-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.backup-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Backup action buttons */
.backup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  align-self: flex-start;
}

.backup-btn-primary {
  background: var(--sage);
  color: #3a6040;
}
.backup-btn-primary:hover {
  background: #c8d9c0;
  box-shadow: 0 2px 8px rgba(90,120,80,0.2);
}

.backup-btn-secondary {
  background: var(--lavender);
  color: #5a4070;
}
.backup-btn-secondary:hover {
  background: #d5c8e8;
  box-shadow: 0 2px 8px rgba(100,80,140,0.2);
}

.backup-btn-danger {
  background: rgba(217,180,180,0.3);
  color: #8a3535;
}
.backup-btn-danger:hover {
  background: rgba(217,180,180,0.55);
  box-shadow: 0 2px 8px rgba(180,80,80,0.15);
}

/* Status messages */
.backup-status {
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 7px;
  line-height: 1.4;
}
.backup-status-ok {
  background: rgba(150,210,160,0.2);
  color: #3a7a40;
}
.backup-status-error {
  background: rgba(217,180,180,0.25);
  color: #8a3535;
}

/* Storage note */
.backup-note {
  background: rgba(231,207,207,0.12);
  border: 1px solid rgba(231,207,207,0.3);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.backup-note strong {
  color: var(--text-primary);
  font-weight: 500;
}


/* ——————————————————————————————————————————————————————————
   RESPONSIVE
   —————————————————————————————————————————————————————————— */
@media (max-width: 700px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .backup-grid {
    grid-template-columns: 1fr;
  }
}
