:root {
  font-size: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body, html {
  height: 100%;
}

button {
  font: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: white;
  padding: 0.35rem;
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.app-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--card);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 10px rgba(92,64,51,0.06);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.25s ease;
}

.app-sidebar.open {
  transform: translateX(0);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 50;
}

.sidebar-overlay.open {
  display: block;
}

.app-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-header h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.page-description {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.page-content {
  display: grid;
  gap: 1rem;
}

.empty-state {
  background: var(--card);
  border: 1px dashed var(--border);
  padding: 1.5rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}

.backup-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.backup-actions {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (max-width: 900px) {
  .app-body {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    min-width: 0;
  }
}
