/* =========================================
   Dot — Design System
   Black & White · Sharp Corners · No Rounding
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --black: #000000;
  --white: #ffffff;
  --dark-gray: #1a1a1a;
  --medium-gray: #555555;
  --light-gray: #999999;
  --border-gray: #e5e5e5;
  --hover-blue: #3b82f6;
  --hover-light-blue: #eff6ff;
  --radius: 0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: var(--radius) !important;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-gray);
  max-width: 100vw;
  overflow-x: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand img { width: 28px; height: 28px; }

.nav-actions { display: flex; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--black);
  background: var(--white);
  color: var(--black);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--hover-blue);
  color: var(--hover-blue);
}

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

.btn-primary:hover {
  background: var(--hover-blue);
  border-color: var(--hover-blue);
  color: var(--white);
}

.btn-danger {
  border-color: #dc2626;
  color: #dc2626;
}
.btn-danger:hover {
  background: #dc2626;
  color: var(--white);
}

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-ghost { border-color: var(--border-gray); color: var(--medium-gray); }
.btn-ghost:hover { border-color: var(--hover-blue); color: var(--hover-blue); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 24px 60px;
  max-width: 100vw;
  overflow-x: hidden;
}

.hero-grid {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}

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

.hero-text .dot-mark {
  width: 64px;
  height: 64px;
  border: 2px solid var(--black);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-text .dot-mark span {
  width: 16px;
  height: 16px;
  background: var(--black);
}

.hero-text h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-text p {
  font-size: 18px;
  color: var(--medium-gray);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Phone preview */
.hero-preview {
  flex-shrink: 0;
}

.phone-frame {
  width: 260px;
  height: 520px;
  border: 2px solid var(--black);
  position: relative;
  padding: 28px 16px 20px;
  background: var(--white);
}

.phone-notch {
  width: 80px;
  height: 6px;
  background: var(--black);
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.phone-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.phone-profile {
  text-align: center;
  margin-bottom: 20px;
}

.phone-avatar {
  width: 56px;
  height: 56px;
  border: 1px solid var(--black);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  background: #f5f5f5;
}

.phone-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.phone-bio {
  font-size: 11px;
  color: var(--medium-gray);
}

.phone-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.phone-link {
  padding: 10px 12px;
  border: 1px solid var(--black);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.phone-portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 100%;
}

.phone-portfolio-item {
  aspect-ratio: 1;
  background: #f0f0f0;
  border: 1px solid var(--border-gray);
}

/* ---------- Features ---------- */
.features {
  padding: 60px 24px 100px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border-gray);
  border: 1px solid var(--border-gray);
  max-width: 1100px;
  margin: 0 auto 100px;
}

.feature {
  background: var(--white);
  padding: 32px 28px;
}

.feature .num {
  font-size: 13px;
  color: var(--light-gray);
  font-weight: 700;
  margin-bottom: 16px;
}

.feature h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature p {
  color: var(--medium-gray);
  font-size: 14px;
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border: 1px solid var(--black);
  width: 100%;
  max-width: 420px;
  padding: 36px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 20px;
  background: none;
  border: none;
  line-height: 1;
  color: var(--medium-gray);
}
.modal-close:hover { color: var(--black); }

.modal h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
}

.modal-switch {
  margin-top: 20px;
  font-size: 14px;
  color: var(--medium-gray);
  text-align: center;
}
.modal-switch a { color: var(--hover-blue); font-weight: 600; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-gray);
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--black);
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--hover-blue);
  background: var(--hover-light-blue);
}

.field textarea { resize: vertical; min-height: 80px; }
.field small { display: block; margin-top: 6px; font-size: 12px; color: var(--light-gray); }
.field-hint { font-size: 12px; color: var(--light-gray); margin-top: 6px; }

.alert {
  padding: 12px 14px;
  border: 1px solid #dc2626;
  color: #dc2626;
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
}
.alert.active { display: block; }

.alert-success {
  border-color: #16a34a;
  color: #16a34a;
}

/* ---------- Dashboard ---------- */
.dash-wrap {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

.dash-sidebar {
  width: 240px;
  border-right: 1px solid var(--border-gray);
  padding: 24px 0;
  flex-shrink: 0;
}

.dash-sidebar .brand { padding: 0 24px 28px; }

.dash-nav a {
  display: block;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--medium-gray);
  border-left: 2px solid transparent;
}

.dash-nav a:hover { color: var(--black); background: #fafafa; }
.dash-nav a.active {
  color: var(--black);
  border-left-color: var(--black);
  font-weight: 700;
  background: #fafafa;
}

.dash-main {
  flex: 1;
  padding: 40px;
  max-width: 900px;
  overflow-x: hidden;
}

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

.dash-header h1 { font-size: 26px; font-weight: 800; }

.dash-section { display: none; }
.dash-section.active { display: block; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border-gray);
  border: 1px solid var(--border-gray);
  margin-bottom: 36px;
  max-width: 100%;
}

.stat-card {
  background: var(--white);
  padding: 24px;
}

.stat-card .value { font-size: 32px; font-weight: 800; }
.stat-card .label { font-size: 13px; color: var(--medium-gray); margin-top: 4px; }

/* Cards / list items */
.card {
  border: 1px solid var(--border-gray);
  padding: 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 100%;
}

.card-drag { color: var(--light-gray); cursor: grab; font-size: 16px; }
.card-body { flex: 1; min-width: 0; }
.card-title { font-weight: 700; font-size: 15px; }
.card-sub { font-size: 13px; color: var(--medium-gray); word-break: break-all; }
.card-actions { display: flex; gap: 8px; flex-shrink: 0; }

.card-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--border-gray);
  flex-shrink: 0;
  background: #f5f5f5;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--light-gray);
  border: 1px dashed var(--border-gray);
}
.empty-state p { margin-top: 8px; font-size: 14px; }

/* Toggle switch */
.toggle {
  width: 40px;
  height: 22px;
  background: var(--border-gray);
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border-gray);
  flex-shrink: 0;
}
.toggle.on { background: var(--black); border-color: var(--black); }
.toggle .knob {
  width: 16px;
  height: 16px;
  background: var(--white);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.15s ease;
}
.toggle.on .knob { left: 20px; }

/* Avatar upload */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border: 1px solid var(--border-gray);
  object-fit: cover;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-gray);
  font-size: 24px;
  font-weight: 700;
}

.section-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.section-desc { font-size: 14px; color: var(--medium-gray); margin-bottom: 20px; }

.divider { height: 1px; background: var(--border-gray); margin: 32px 0; }

.copy-row {
  display: flex;
  gap: 8px;
  border: 1px solid var(--border-gray);
  padding: 4px;
  align-items: center;
  max-width: 100%;
}
.copy-row input {
  border: none;
  flex: 1;
  padding: 8px;
  font-size: 13px;
  color: var(--medium-gray);
  background: transparent;
  min-width: 0;
}
.copy-row input:focus { outline: none; }

/* ---------- Public link page ---------- */
.public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 40px;
}

.profile-header { text-align: center; max-width: 480px; margin-bottom: 32px; }

.profile-avatar {
  width: 96px;
  height: 96px;
  border: 1px solid var(--black);
  object-fit: cover;
  margin: 0 auto 20px;
  background: #f5f5f5;
}

.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.profile-bio { font-size: 14px; color: var(--medium-gray); margin-bottom: 6px; }
.profile-location { font-size: 13px; color: var(--light-gray); }

.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
}
.social-icon:hover { border-color: var(--hover-blue); color: var(--hover-blue); }

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 36px;
  border: 1px solid var(--border-gray);
}

.portfolio-item {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid var(--border-gray);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.portfolio-item:hover img { transform: scale(1.05); }

.portfolio-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.75);
  color: var(--white);
  font-size: 10px;
  padding: 6px 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.portfolio-item:hover .portfolio-caption { opacity: 1; }

/* Links list */
.links-list {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--black);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.link-btn:hover {
  background: var(--black);
  color: var(--white);
}

.public-footer {
  margin-top: 60px;
  font-size: 12px;
  color: var(--light-gray);
  letter-spacing: 0.05em;
}
.public-footer a { color: var(--medium-gray); font-weight: 600; }
.public-footer a:hover { color: var(--hover-blue); }

/* ---------- 404 ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.error-page h1 { font-size: 96px; font-weight: 800; }
.error-page p { color: var(--medium-gray); margin: 12px 0 28px; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-muted { color: var(--medium-gray); }
.text-sm { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- Table (admin) ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-gray);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}
th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-gray);
  white-space: nowrap;
}
th { font-weight: 700; background: #fafafa; }
tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-gray);
}
.badge-active { border-color: #16a34a; color: #16a34a; }
.badge-inactive { border-color: #dc2626; color: #dc2626; }
.badge-admin { border-color: var(--black); background: var(--black); color: var(--white); }

.search-row { display: flex; gap: 8px; margin-bottom: 20px; }
.search-row input { flex: 1; }

.table-empty {
  text-align: center !important;
  color: var(--light-gray);
  padding: 32px 16px !important;
}

/* =========================================
   SHARED COMPONENTS
   ========================================= */

/* ─── Loading Overlay ──────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
}

.spinner-box {
  width: 8px;
  height: 8px;
  background: var(--black);
  animation: bounce 0.6s ease-in-out infinite;
}

.spinner-box:nth-child(1) { animation-delay: 0s; }
.spinner-box:nth-child(2) { animation-delay: 0.1s; }
.spinner-box:nth-child(3) { animation-delay: 0.2s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ─── Button loading state ─────────────── */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  opacity: 1;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--black);
  animation: bounce 0.6s ease-in-out infinite;
}

.btn-primary.loading::after,
.btn-danger.loading::after {
  background: var(--white);
}

/* ─── Toast Notifications ──────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  background: var(--black);
  color: var(--white);
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--black);
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-error {
  background: #dc2626;
  border-color: #dc2626;
}

.toast-success {
  background: #16a34a;
  border-color: #16a34a;
}

/* ─── Confirm Dialog ───────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.15s ease;
}

.confirm-box {
  background: var(--white);
  border: 1px solid var(--black);
  padding: 32px;
  max-width: 380px;
  width: 90%;
}

.confirm-box p {
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

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

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 800px) {
  .dash-wrap {
    flex-direction: column;
  }

  .dash-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-gray);
    padding: 12px 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 100;
    overflow: hidden;
  }

  .dash-sidebar .brand {
    padding: 0 16px 12px;
    font-size: 18px;
  }

  .dash-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px 2px;
    gap: 0;
    scrollbar-width: none;
    max-width: 100vw;
  }

  .dash-nav::-webkit-scrollbar {
    display: none;
  }

  .dash-nav a {
    border-left: none !important;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    padding: 8px 11px;
    font-size: 12px;
    flex-shrink: 0;
    letter-spacing: -0.01em;
  }

  .dash-nav a.active {
    border-left: none !important;
    border-bottom-color: var(--black);
  }

  .dash-main {
    padding: 20px 16px;
    max-width: 100%;
    width: 100%;
  }

  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
  }

  .dash-header h1 {
    font-size: 22px;
  }

  .dash-header .flex {
    width: 100%;
  }

  .dash-header .btn {
    flex: 1;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .value {
    font-size: 24px;
  }

  .card {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    max-width: 100%;
  }

  .card-drag {
    display: none;
  }

  .card-body {
    flex: 1 1 100%;
    order: 1;
    min-width: 0;
  }

  .card-body .card-sub {
    word-break: break-all;
  }

  .card-thumb {
    width: 48px;
    height: 48px;
    order: 0;
  }

  .card-actions {
    width: 100%;
    justify-content: flex-end;
    order: 2;
    flex-wrap: wrap;
  }

  .card-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .table-wrap {
    margin: 0 -16px;
    border-left: none;
    border-right: none;
    width: calc(100% + 32px);
    max-width: calc(100% + 32px);
  }

  th, td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .search-row {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .search-row input {
    min-width: 100%;
  }

  .badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .chart-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .chart-box {
    padding: 16px;
    max-width: 100%;
  }

  .chart-box canvas {
    margin-top: 8px;
    max-width: 100%;
  }

  .avatar-upload {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .copy-row {
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
  }

  .copy-row input {
    font-size: 12px;
    padding: 8px;
    max-width: 100%;
  }

  .copy-row .btn {
    width: 100%;
    justify-content: center;
  }

  .modal {
    max-width: 95%;
    padding: 24px 20px;
    margin: 0 10px;
  }

  .modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .confirm-box {
    padding: 24px 20px;
    max-width: 90vw;
  }

  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    font-size: 13px;
    padding: 12px 16px;
  }

  .portfolio-grid {
    max-width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 50px 20px 40px;
  }

  .hero-grid {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .hero-text .dot-mark {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .phone-frame {
    width: 220px;
    height: 440px;
  }

  .hero-text h1 {
    font-size: clamp(28px, 8vw, 48px);
  }

  .hero-text p {
    font-size: 16px;
  }

  .hero-actions .btn {
    width: auto;
    max-width: none;
  }

  .features {
    padding: 40px 16px 60px;
    margin: 0 16px 60px;
  }

  .navbar {
    padding: 14px 16px;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-actions .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .sidebar-footer {
    flex-direction: row;
    padding: 12px 16px;
    gap: 8px;
  }

  .sidebar-footer .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
  }

  .cleanup-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
    max-width: 100%;
  }

  .cleanup-stat .stat-number {
    font-size: 36px;
  }
}

@media (max-width: 400px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dash-header h1 {
    font-size: 20px;
  }

  .dash-nav a {
    padding: 7px 9px;
    font-size: 11px;
  }

  .brand {
    font-size: 16px;
  }

  .brand img {
    width: 24px;
    height: 24px;
  }

  .card-title {
    font-size: 14px;
  }

  .card-sub {
    font-size: 12px;
  }

  .card-actions {
    gap: 6px;
  }

  .card-actions .btn {
    padding: 5px 8px;
    font-size: 11px;
  }

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

  .stat-card {
    padding: 14px;
  }

  .stat-card .value {
    font-size: 22px;
  }

  .stat-card .label {
    font-size: 12px;
  }

  .hero {
    padding: 40px 16px 30px;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .hero-text p {
    font-size: 15px;
  }

  .phone-frame {
    width: 180px;
    height: 360px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .features {
    grid-template-columns: 1fr;
    margin: 0 12px 40px;
  }

  .navbar .brand {
    font-size: 16px;
    gap: 6px;
  }

  .modal {
    padding: 20px 16px;
  }

  .modal h2 {
    font-size: 18px;
  }

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