/* ==========================================================================
   Gestão Financeira Familiar - Design System & Modern UI
   ========================================================================== */

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

:root {
  /* Color Palette - Dark Premium Theme Default */
  --bg-main: #0b0f19;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --bg-surface: #1e293b;
  --bg-input: #0f172a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);

  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --info: #06b6d4;
  --info-light: rgba(6, 182, 212, 0.15);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-surface: #e2e8f0;
  --bg-input: #f8fafc;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: #6366f1;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  -webkit-font-smoothing: antialiased;
}

/* Shell de Conteúdo: coluna ao lado da sidebar (desktop) ou abaixo da barra superior (mobile) */
.content-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Barra Lateral (Desktop - Estilo WordPress Admin) */
#mobileTopbar {
  display: none !important;
}

.sidebar.wp-sidebar {
  display: flex !important;
  flex-direction: column;
  width: 255px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
}

.sidebar.wp-sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar.wp-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: var(--radius-full);
}

/* Header / Brand da Sidebar */
.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.sidebar-header .brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.sidebar-header .brand-info {
  display: flex;
  flex-direction: column;
}

.sidebar-header .brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.sidebar-header .brand-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

/* Navegação da Sidebar */
.sidebar-nav {
  flex: 1;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-group-title {
  padding: 0.25rem 0.75rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  white-space: nowrap;
}

.wp-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}

.wp-nav-item {
  position: relative;
  width: 100%;
}

.wp-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}

.wp-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.wp-nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wp-nav-link:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.wp-nav-link:hover .wp-nav-icon {
  color: var(--primary);
  transform: scale(1.08);
}

/* Item Ativo Estilo WordPress com Indicador Lateral */
.wp-nav-item.active .wp-nav-link {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.wp-nav-item.active .wp-nav-icon {
  color: var(--primary);
}

.wp-nav-active-indicator {
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3.5px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

/* Botão WordPress de Recolher Menu */
.sidebar-collapse-wrapper {
  padding: 0.4rem 0.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.sidebar-collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.sidebar-collapse-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.sidebar-collapse-btn i {
  font-size: 1.15rem;
  width: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

/* Rodapé da Sidebar */
.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding: 0.9rem;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

[data-theme="light"] .sidebar-footer {
  background: rgba(0, 0, 0, 0.02);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--success);
}

.sidebar-user-switcher .sidebar-select {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  width: 100%;
  cursor: pointer;
}

.sidebar-footer-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.sidebar-footer-actions .theme-toggle-btn {
  flex: 1;
  justify-content: center;
}

.sidebar-footer-actions .sidebar-logout-btn {
  flex: 1;
  justify-content: center;
  color: var(--danger);
}

/* Modo Recolhido (Collapsed - Ícones Compactos) */
body.sidebar-collapsed .sidebar.wp-sidebar {
  width: 68px;
}

body.sidebar-collapsed .brand-info,
body.sidebar-collapsed .nav-group-title,
body.sidebar-collapsed .wp-nav-label,
body.sidebar-collapsed .collapse-label,
body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .sidebar-user-switcher {
  display: none !important;
}

body.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding: 1.25rem 0.5rem;
}

body.sidebar-collapsed .wp-nav-link {
  justify-content: center;
  padding: 0.65rem 0;
}

body.sidebar-collapsed .sidebar-collapse-btn {
  justify-content: center;
  padding: 0.5rem 0;
}

body.sidebar-collapsed .sidebar-user-card {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-footer-actions {
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  filter: brightness(1.2);
}

/* App Header & Navigation (Navbar Mobile) */
.navbar {
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 1.25rem;
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #ec4899);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-item a:hover {
  color: var(--text-main);
  background-color: var(--bg-surface);
}

.nav-item.active a {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-badge-dropdown {
  position: relative;
  display: inline-block;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}

.user-pill:hover {
  border-color: var(--primary);
}

.user-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  font-weight: 700;
}

/* Layout Main Content */
.main-wrapper {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Period Filter Header Bar */
.period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  background: var(--bg-card);
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.period-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.period-btn {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

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

.period-title {
  font-size: 1.15rem;
  font-weight: 700;
  min-width: 170px;
  text-align: center;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.metric-card.receitas::before { background: var(--success); }
.metric-card.despesas::before { background: var(--danger); }
.metric-card.cartoes::before { background: var(--warning); }
.metric-card.saldo::before { background: var(--primary); }

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.metric-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.metric-card.receitas .metric-icon { background: var(--success-light); color: var(--success); }
.metric-card.despesas .metric-icon { background: var(--danger-light); color: var(--danger); }
.metric-card.cartoes .metric-icon { background: var(--warning-light); color: var(--warning); }
.metric-card.saldo .metric-icon { background: var(--primary-light); color: var(--primary); }

.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Cards & Containers */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  filter: brightness(1.1);
  color: #fff;
}

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

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

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

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 0.45rem;
  border-radius: var(--radius-md);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-neutral { background: var(--bg-surface); color: var(--text-muted); }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
}

.custom-table td {
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background-color: var(--bg-surface);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

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

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

/* Credit Card Virtual Representation */
.credit-card-item {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
}

.credit-card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.card-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.card-number {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Alerts and Flash messages */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success { background: var(--success-light); color: var(--success); border: 1px solid var(--success); }
.alert-error { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning); }

/* Mobile Navigation & Responsive Adjustments */
.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-user-select {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
  width: auto;
  max-width: 125px;
  background: var(--bg-surface);
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

@media (min-width: 901px) {
  #mobileTopbar {
    display: none !important;
  }
  .sidebar.wp-sidebar {
    display: flex !important;
  }
}

@media (max-width: 900px) {
  body {
    flex-direction: column !important;
  }

  #mobileTopbar {
    display: block !important;
  }

  .sidebar.wp-sidebar {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .nav-links.mobile-nav-dropdown {
    display: none;
  }

  .nav-links.mobile-nav-dropdown.mobile-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 0.85rem 1rem;
    gap: 0.35rem;
    z-index: 100;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-links.mobile-nav-dropdown.mobile-active .nav-item a {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }
}
