/* ============================================================
   HojaDeVida — Main Stylesheet
   Design: Modern / Minimalist (Notion-inspired)
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:          #1a1d29;
  --surface:     #2a2d3a;
  --surface-2:   #3c4152;
  --surface-3:   #4a5169;
  --border:      #404756;
  --border-hover:#5a6178;
  --text:        #e2e6ea;
  --text-muted:  #a7b3c1;
  --text-light:  #8691a0;

  --accent:        #10b981;
  --accent-hover:  #059669;
  --accent-light:  #047857;
  --accent-dark:   #065f46;
  --accent-yellow: #f59e0b;
  --accent-yellow-hover: #d97706;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --warning:       #f59e0b;
  --warning-light: #fef3c7;
  --success:       #10b981;
  --success-light: #d1fae5;

  --sidebar-w:           280px;
  --sidebar-w-collapsed: 70px;
  --topbar-h:            64px;
  --radius:              12px;
  --radius-sm:           8px;
  --radius-lg:           16px;
  --shadow:              0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md:           0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:           0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  --transition:          150ms ease;
  --font:                'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg) !important;
  color: var(--text);
  line-height: 1.5;
}

/* Force background color for main content area */
.app-main {
  background: var(--bg) !important;
}

.app-content {
  background: transparent !important;
}
a { color: var(--accent); text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ── App Shell ──────────────────────────────────────────────── */
.app-body {
  display: flex;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: var(--sidebar-w);
  transition: margin-left var(--transition);
}

.app-body.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-w-collapsed);
}

.app-content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.app-body.sidebar-collapsed .sidebar {
  width: var(--sidebar-w-collapsed);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
  background: var(--surface);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.sidebar-logo__icon {
  font-size: 20px;
  flex-shrink: 0;
}
.sidebar-logo__text {
  overflow: hidden;
  color: var(--text);
  opacity: 1;
  width: auto;
}

.app-body.sidebar-collapsed .sidebar-logo__text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 2px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}


.sidebar-nav__item--active {
  background: #10b981 !important;
  color: #ffffff !important;
  font-weight: 600;
  border-left: 3px solid #059669 !important;
  border-radius: 6px;
}

/* Alternative yellow theme - uncomment these lines and comment the green version above to use yellow */
/*
.sidebar-nav__item--active {
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--accent-yellow) !important;
  font-weight: 600;
  border-left: 3px solid var(--accent-yellow) !important;
  box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.08);
}
*/

.sidebar-nav__icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.sidebar-nav__label {
  overflow: hidden;
  font-weight: 500;
  opacity: 1;
  width: auto;
}

.app-body.sidebar-collapsed .sidebar-nav__label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Tooltip for collapsed state */
.app-body.sidebar-collapsed .sidebar-nav__item[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(var(--sidebar-w-collapsed) + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--text);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 8px;
}

.sidebar-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.sidebar-user__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
  opacity: 1;
  width: auto;
}
.app-body.sidebar-collapsed .sidebar-user__info {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-user__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.sidebar-user__logout {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 99;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
}

/* ── Notifications Bell ─────────────────────────────────────── */
.notif-bell { position: relative; }

.notif-bell__btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  position: relative;
}

.notif-bell__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
}

.notif-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.notif-dropdown__list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.notif-item:last-child { border-bottom: none; }
.notif-item--unread { background: var(--accent-light); }
.notif-item__title { font-weight: 500; margin-bottom: 2px; }
.notif-item__time { color: var(--text-muted); font-size: 12px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
}

.btn--primary {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.btn--danger   { background: var(--danger); color: #fff; }
.btn--danger:hover { opacity: .9; }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn--outline {
  background: transparent;
  color: #10b981;
  border-color: #10b981;
}

.btn--full     { width: 100%; }
.btn--sm       { padding: 5px 10px; font-size: 13px; }
.btn--xs       { padding: 3px 7px; font-size: 12px; }
.btn--icon     { padding: 6px; }

.btn:disabled  { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-link { font-weight: 400; font-size: 12px; color: var(--accent); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="tel"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Botón "x" del search input visible en tema oscuro */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px; width: 14px; cursor: pointer;
  background: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18 6 6 18M6 6l12 12' stroke='black' stroke-width='2.5' stroke-linecap='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18 6 6 18M6 6l12 12' stroke='black' stroke-width='2.5' stroke-linecap='round'/></svg>") center/contain no-repeat;
}

textarea { resize: vertical; min-height: 80px; }

.form-group--check { flex-direction: row; align-items: center; gap: 8px; }

.form-group label.checkbox-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; }

/* Input de contraseña + botón ojito para mostrar/ocultar */
.pwd-wrap { position: relative; }
.pwd-wrap > input { padding-right: 40px; }
.pwd-wrap > .form-error { display: block; margin-top: 4px; }
.pwd-toggle {
  position: absolute; right: 6px; top: 8px;
  background: transparent; border: none; padding: 4px;
  color: var(--text-muted); cursor: pointer; line-height: 0;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.pwd-toggle:hover  { color: var(--text); background: var(--surface-2); }
.pwd-toggle--on    { color: var(--accent); }

.form-error { color: var(--danger); font-size: 12px; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert--success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert--danger  { background: rgba(239, 68, 68, 0.1);  color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert--warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.alert--info    { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert--dismissible { position: relative; padding-right: 36px; }
.alert__close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  color: currentColor;
  opacity: .6;
  line-height: 1;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card--clickable {
  cursor: pointer;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-body {
  padding: 24px;
}
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* Urgency border variants */
.card--danger  { border-left: 3px solid var(--danger); }
.card--warning { border-left: 3px solid var(--warning); }
.card--success { border-left: 3px solid var(--success); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.badge--danger  { background: var(--danger-light);  color: var(--danger); }
.badge--warning { background: var(--warning-light); color: #92400e; }
.badge--success { background: var(--success-light); color: #065f46; }
.badge--info    { background: var(--accent-light);  color: var(--accent); }
.badge--muted   { background: var(--surface-2); color: var(--text-muted); }

/* ── Progress Bar ────────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--success);
}
.progress-bar--warning { background: var(--warning); }
.progress-bar--danger  { background: var(--danger); }

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }

.td-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
}

.modal--sm { max-width: 380px; }
.modal--lg { max-width: 720px; }

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

.modal-title { font-size: 16px; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.modal-body { padding: 20px; flex: 1; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
}


/* ── Toasts ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 400;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  min-width: 260px;
  max-width: 360px;
  pointer-events: all;
}

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

.toast--success { background: #022c22; color: #a7f3d0; }
.toast--error   { background: #2d0a0a; color: #fca5a5; }
.toast--warning { background: #2d1a00; color: #fde68a; }
.toast--info    { background: #1e1b4b; color: #c7d2fe; }
.toast__icon    { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast__close   { margin-left: auto; background: none; border: none; color: inherit; opacity: .6; cursor: pointer; }

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--surface-2);
}

.page-header__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 40px; margin-bottom: 12px; }
.empty-state__text { font-size: 15px; margin-bottom: 16px; }

/* ── Dashboard Grid ──────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card__icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--surface-2);
  flex-shrink: 0;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.stat-card__info { flex: 1; min-width: 0; }
.stat-card__count {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text);
}
.stat-card__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card--danger  .stat-card__icon { background: var(--danger-light); }
.stat-card--warning .stat-card__icon { background: var(--warning-light); }
.stat-card--success .stat-card__icon { background: var(--success-light); }

/* ── Lang form inline ────────────────────────────────────────── */
.lang-form { display: inline-flex; }

/* ── Misc ────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); font-size: 13px; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.d-flex { display: flex; align-items: center; gap: 8px; }
.ml-auto { margin-left: auto; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* ── Mobile Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .app-main { margin-left: 0 !important; }

  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
    z-index: 101;
  }

  .sidebar.sidebar--open {
    transform: translateX(0);
  }

  .sidebar-overlay.sidebar-overlay--visible {
    display: block;
  }

  .hamburger { display: flex; }
  .sidebar-toggle { display: none; }

  .app-content { padding: 20px 16px; }

  .form-row { grid-template-columns: 1fr; }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
  }

  .card-header {
    padding: 16px 20px;
  }

  .card-body {
    padding: 20px;
  }

  .page-header__title {
    font-size: 24px;
  }

  .modal-overlay { padding: 16px; align-items: flex-end; }
  .modal { border-radius: var(--radius) var(--radius) 0 0; max-width: 100%; }

  .toast-container { right: 16px; bottom: 16px; left: 16px; }
  .toast { max-width: 100%; }

  .topbar { padding: 0 20px; }

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

@media (max-width: 480px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-header__title {
    font-size: 22px;
  }

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

  .app-content {
    padding: 16px 12px;
  }

  .stat-card {
    padding: 16px;
    gap: 12px;
  }

  .stat-card__icon {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .stat-card__count {
    font-size: 24px;
  }
}
