/* Data Management Page Styles */

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

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg-surface);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 32px;
}

.header h1 {
  font-size: 28px;
  font-weight: 600;
}

.header-right {
  display: flex;
  gap: 12px;
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 14px;
}

/* Philosophy Grid */
.philosophy-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.philosophy-item {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.philosophy-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.philosophy-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.philosophy-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.storage-stat {
  background: var(--bg-elevated);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.storage-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

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

.storage-details {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.storage-detail {
  font-size: 13px;
}

.detail-label {
  color: var(--text-muted);
  margin-right: 8px;
}

.detail-value {
  color: var(--text-secondary);
}

.unsaved-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--warning-bg, #3d3000);
  color: var(--warning, #ffc107);
  border-radius: 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Action Grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.action-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.action-card.primary {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-elevated), rgba(168, 85, 247, 0.1));
}

.action-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.action-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.action-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  filter: brightness(1.1);
}

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

.btn-secondary:hover {
  background: var(--bg-hover);
}

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

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

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid var(--error);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
}

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

/* Restore Options */
.restore-options {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 500;
}

.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.toggle-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  margin-left: 30px;
}

/* Recovery Note */
.recovery-note {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.recovery-note code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* Danger Zone */
.danger-zone {
  border-color: var(--error);
  background: linear-gradient(135deg, var(--bg-surface), rgba(98, 6, 6, 0.88));
}

.danger-zone h2 {
  color: var(--error);
}

.danger-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.danger-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.danger-action strong {
  display: block;
  margin-bottom: 4px;
}

.danger-action p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-success {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.toast-error {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.toast-info {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

.toast-warning {
  background: rgba(245, 158, 11, 0.9);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px 16px;
  }
  
  .header {
    flex-direction: column;
    gap: 16px;
  }
  
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
  
  .danger-action {
    flex-direction: column;
    text-align: center;
  }
}

