/* Modern Social Media Theme for ThePupCircle - MOBILE OPTIMIZED */
:root {
  --bg: #f8fafb;
  --card: #ffffff;
  --muted: #6b7280;
  --text-secondary: #9ca3af;
  --accent: #1fb6ff; /* bright cyan accent */
  --accent-dark: #0ea5e9;
  --primary: #0f1724; /* dark text */
  --danger: #ef4444;
  --success: #10b981;
  --soft-shadow: 0 6px 18px rgba(15,23,36,0.08);
  --medium-shadow: 0 10px 30px rgba(15,23,36,0.12);
  --round: 14px;
  --transition: 250ms cubic-bezier(.4,0,.2,1);
  --sidebar-width: 280px;
  --sidebar-collapsed: 80px;
}

html { 
  font-size: 15px; 
  scroll-behavior: smooth;
}
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  background: var(--bg);
  color: var(--primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

body.sidebar-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ============================================
   MOBILE NAVBAR (Top navbar - mobile only)
   ============================================ */
.mobile-navbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, #1a2332 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 1100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-navbar-content {
  height: 100%;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-menu-toggle {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
}

.mobile-menu-toggle:active {
  background-color: rgba(255,255,255,0.1);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}

.mobile-brand img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.mobile-notifications {
  position: relative;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
}

.mobile-notifications:active {
  background-color: rgba(255,255,255,0.1);
}

.mobile-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  border: 2px solid var(--primary);
  min-width: 18px;
  min-height: 18px;
}

/* LAYOUT: sidebar + content */
.app-shell { 
  display: flex; 
  min-height: 100vh; 
  position: relative;
}

.sidebar { 
  width: var(--sidebar-width); 
  background: linear-gradient(135deg, var(--primary) 0%, #1a2332 100%);
  color: white;
  border-right: 1px solid rgba(255,255,255,0.08); 
  padding: 24px 16px; 
  box-shadow: 0 4px 20px rgba(15,23,36,0.15); 
  position: fixed; 
  top: 0; 
  left: 0; 
  bottom: 0; 
  overflow-y: auto; 
  overflow-x: hidden;
  transition: width var(--transition), transform var(--transition); 
  z-index: 1200;
  -webkit-overflow-scrolling: touch;
}

.sidebar.collapsed { 
  width: var(--sidebar-collapsed); 
  padding: 24px 10px; 
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1150;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
  display: block;
}

.main { 
  margin-left: var(--sidebar-width); 
  flex: 1; 
  padding: 40px; 
  transition: margin-left var(--transition); 
  width: 100%;
  overflow-x: hidden;
}

.sidebar.collapsed ~ .main { 
  margin-left: var(--sidebar-collapsed); 
}

/* sidebar content */
.sidebar .brand { 
  font-weight: 800; 
  font-size: 1.25rem; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}

.sidebar.collapsed .brand { 
  display: none; 
}

.sidebar.collapsed .brand-icon { 
  display: flex; 
  justify-content: center; 
  margin-bottom: 24px; 
  font-size: 1.5rem; 
}

.brand-icon { 
  display: none; 
}

.sidebar .menu { 
  margin-top: 12px; 
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar .menu a { 
  display: flex; 
  gap: 14px; 
  align-items: center; 
  padding: 12px 14px; 
  border-radius: 10px; 
  color: rgba(255,255,255,0.8); 
  text-decoration: none; 
  transition: all var(--transition);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.sidebar .menu a:hover { 
  background: rgba(255,255,255,0.12); 
  color: white;
  transform: translateX(4px);
}

.sidebar .menu a:active {
  background: rgba(255,255,255,0.15);
}

.sidebar .menu a .icon { 
  width: 28px; 
  text-align: center; 
  flex-shrink: 0; 
  display: inline-block; 
  font-size: 1.1rem; 
}

.sidebar .menu a .label { 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .menu a .label { 
  display: none; 
}

.sidebar.collapsed .menu a { 
  justify-content: center; 
  padding: 14px; 
}

/* Notification badge */
.notification-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  background-color: var(--danger);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* toggle button */
.sidebar-toggle { 
  position: fixed; 
  left: calc(var(--sidebar-width) - 26px); 
  top: 20px; 
  width: 48px; 
  height: 48px; 
  border-radius: 12px; 
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); 
  color: white; 
  border: none; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  box-shadow: 0 8px 24px rgba(31,182,255,0.3); 
  cursor: pointer; 
  z-index: 9999; 
  transition: all var(--transition); 
  font-size: 1.1rem;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-toggle:hover { 
  transform: scale(1.12); 
  box-shadow: 0 12px 32px rgba(31,182,255,0.4);
}

.sidebar-toggle:active { 
  transform: scale(0.95); 
}

.sidebar.collapsed ~ .sidebar-toggle { 
  left: calc(var(--sidebar-collapsed) - 26px); 
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #1a2332 50%, var(--accent) 100%);
  background-attachment: fixed;
  color: white;
  padding: 80px 40px;
  border-radius: var(--round);
  margin-bottom: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM36 0V4h4v2h-4zm-8 0v4h4V0h-4zm-8 8V6H8v2h20zm24 8h-2V8h2v4zm0 8h-2v-4h2v4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.hero-section h1 {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-section p {
  position: relative;
  z-index: 1;
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 32px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-section > div[style*="display: flex"] {
  position: relative;
  z-index: 2;
}

.hero-section .btn-outline,
.hero-section a.btn-outline {
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.22) !important;
  background: rgba(255,255,255,0.02);
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}

.hero-section .btn-outline .bi,
.hero-section a.btn-outline .bi {
  color: #ffffff !important;
}

.hero-section .btn-outline:hover,
.hero-section a.btn-outline:hover,
.hero-section .btn-outline:focus,
.hero-section a.btn-outline:focus {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.32) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.hero-section .btn-outline:active,
.hero-section a.btn-outline:active {
  transform: translateY(0) !important;
}

.hero-section .btn { 
  box-shadow: 0 8px 20px rgba(15,23,36,0.08); 
}

.hero-section .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important;
  box-shadow: 0 8px 24px rgba(31,182,255,0.35) !important;
}

.hero-section .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(31,182,255,0.45) !important;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 24px;
    margin-bottom: 40px;
  }

  .hero-section h1 {
    font-size: 2rem;
    gap: 12px;
  }

  .hero-section p {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 40px 16px;
    margin-bottom: 32px;
    border-radius: 8px;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section p {
    font-size: 0.95rem;
  }
}

/* FEED & SIDEBAR WIDGETS */
.grid { 
  display: grid; 
  grid-template-columns: 1fr 340px; 
  gap: 40px; 
}

@media (max-width: 1200px) {
  .grid { 
    grid-template-columns: 1fr 300px;
    gap: 32px;
  }
}

@media (max-width: 992px) { 
  .grid { 
    grid-template-columns: 1fr; 
  }
}

.search-section {
  background: var(--card);
  padding: 32px;
  border-radius: var(--round);
  box-shadow: var(--soft-shadow);
  margin-bottom: 40px;
}

.search-section h2 {
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.search-section .form-control-lg {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  transition: all var(--transition);
  width: 100%;
}

.search-section .form-control-lg:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,182,255,0.1);
}

@media (max-width: 576px) {
  .search-section {
    padding: 20px;
    margin-bottom: 24px;
  }

  .search-section h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }

  .search-section .form-control-lg {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
}

.card-dog { 
  background: var(--card); 
  border-radius: var(--round); 
  box-shadow: var(--soft-shadow); 
  overflow: hidden; 
  transition: all var(--transition);
  border: 1px solid #f0f0f0;
}

.card-dog:hover { 
  transform: translateY(-8px); 
  box-shadow: var(--medium-shadow);
  border-color: var(--accent);
}

.card-header { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  padding: 16px; 
  background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
}

.avatar { 
  width: 56px; 
  height: 56px; 
  border-radius: 999px; 
  object-fit: cover; 
  flex-shrink: 0; 
  border: 3px solid var(--accent);
  box-shadow: 0 4px 12px rgba(31,182,255,0.2);
}

.owner-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-media img { 
  width: 100%; 
  height: 420px; 
  object-fit: cover; 
  display: block; 
}

@media (max-width: 576px) { 
  .card-media img { 
    height: 240px; 
  }
}

.card-body { 
  padding: 20px; 
}

.card-title { 
  font-weight: 700; 
  font-size: 1.1rem;
  margin-bottom: 8px; 
  color: var(--primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card-sub { 
  color: var(--text-secondary); 
  font-size: 0.95rem; 
  margin-bottom: 0;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.action-bar { 
  display: flex; 
  gap: 12px; 
  padding: 16px 20px; 
  border-top: 1px solid #f0f0f0; 
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .action-bar {
    gap: 8px;
    padding: 12px 16px;
  }
}

.action-btn { 
  background: transparent; 
  border: none; 
  color: var(--muted); 
  font-weight: 600; 
  display: inline-flex; 
  gap: 8px; 
  align-items: center; 
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all var(--transition);
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.action-btn:hover {
  color: var(--accent);
  background: rgba(31,182,255,0.08);
  text-decoration: none;
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn.like { 
  color: var(--muted); 
}

.action-btn.like:hover { 
  color: var(--danger); 
}

.action-btn.follow { 
  margin-left: auto; 
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white; 
  padding: 10px 16px; 
  border-radius: 10px;
  font-weight: 600;
  border: none;
}

.action-btn.follow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31,182,255,0.3);
  color: white;
  text-decoration: none;
}

.action-btn.follow:active {
  transform: translateY(0);
}

@media (max-width: 576px) {
  .action-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .action-btn.follow {
    padding: 8px 12px;
  }
}

.sidebar-card { 
  padding: 24px; 
  border-radius: var(--round); 
  background: var(--card); 
  box-shadow: var(--soft-shadow);
  border: 1px solid #f0f0f0;
  margin-bottom: 24px;
}

.sidebar-card h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary);
}

.sidebar-card p {
  margin: 0;
  color: var(--muted);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.suggest-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item .meta {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-item .muted {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Profile Section */
.profile-hero { 
  border-radius: var(--round); 
  overflow: hidden; 
  margin-bottom: 24px; 
  position: relative;
  box-shadow: var(--medium-shadow);
}

.profile-cover { 
  width: 100%; 
  height: 240px; 
  object-fit: cover; 
  display: block; 
}

.profile-avatar { 
  position: absolute; 
  left: 32px; 
  bottom: -48px; 
  width: 120px; 
  height: 120px; 
  border-radius: 999px; 
  border: 6px solid white;
  box-shadow: 0 8px 24px rgba(15,23,36,0.15);
}

.profile-meta { 
  padding-top: 64px; 
  padding-left: 32px;
  margin-bottom: 32px;
}

.profile-meta h2 {
  margin-bottom: 16px;
}

.profile-stats { 
  display: flex; 
  gap: 32px; 
  margin-top: 16px;
  flex-wrap: wrap;
}

.profile-stats .stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--muted);
  white-space: nowrap;
}

.profile-stats .stat i {
  color: var(--accent);
  font-size: 1.1rem;
}

@media (max-width: 576px) {
  .profile-cover {
    height: 160px;
  }

  .profile-avatar {
    left: 16px;
    width: 80px;
    height: 80px;
    border-width: 4px;
  }

  .profile-meta {
    padding-top: 48px;
    padding-left: 16px;
  }

  .profile-stats {
    gap: 16px;
  }
}

/* Form Elements */
.form-control, .form-label {
  font-family: inherit;
}

.form-label {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-label i {
  color: var(--accent);
}

.form-control {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all var(--transition);
  width: 100%;
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,182,255,0.1);
  outline: none;
}

@media (max-width: 576px) {
  .form-control {
    padding: 11px 12px;
    font-size: 0.95rem;
  }
}

.form-control.is-invalid {
  border-color: var(--danger);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='12 12 24 24'%3e%3ccircle cx='24' cy='24' r='11' fill='none' stroke='%23ef4444' stroke-width='2'/%3e%3cpath fill='%23ef4444' d='M24 16v8m0 4v.01'/%3e%3c/svg%3E");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(1.5em + 0.75rem) calc(1.5em + 0.75rem);
}

.form-control.is-valid {
  border-color: var(--success);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3E");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(1.5em + 0.75rem) calc(1.5em + 0.75rem);
}

.invalid-feedback {
  display: block;
  color: var(--danger);
  font-size: 0.875em;
  margin-top: 0.25rem;
}

.form-check-input {
  -webkit-tap-highlight-color: transparent;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-check-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(31, 182, 255, 0.25);
}

.profile-section {
  max-width: 500px;
}

.form-text {
  font-size: 0.85rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.form-text ul {
  margin: 8px 0;
  padding-left: 20px;
}

.form-text li {
  list-style: none;
  padding-left: 20px;
  position: relative;
}

.form-text li::before {
  content: "?";
  position: absolute;
  left: 0;
  color: #6b7280;
  font-weight: bold;
}

.form-text li[style*="color: rgb(16, 185, 129)"]::before {
  color: var(--success);
}

/* Buttons */
.btn {
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 24px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary { 
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); 
  border: none !important;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31,182,255,0.3);
  color: white;
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline { 
  border: 2px solid #e5e7eb; 
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(31,182,255,0.04);
  text-decoration: none;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  .btn {
    padding: 10px 16px;
    font-size: 0.95rem;
    gap: 6px;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .main {
    padding: 16px;
  }

  .container {
    padding: 0;
  }

  .row {
    margin-left: -8px;
    margin-right: -8px;
  }

  .row > * {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 991px) {
  .sidebar { 
    position: fixed; 
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }
  
  .sidebar.open { 
    transform: translateX(0);
  }
  
  .sidebar.collapsed { 
    width: var(--sidebar-width); 
    transform: translateX(-100%);
  }
  
  .sidebar.collapsed.open {
    transform: translateX(0);
  }
  
  .sidebar.collapsed .menu a .label { 
    display: inline; 
  }
  
  .sidebar.collapsed .menu a { 
    justify-content: flex-start; 
    padding: 12px 14px; 
  }
  
  .main { 
    margin-left: 0; 
    padding: 24px;
    padding-top: 80px;
  }
  
  .sidebar.collapsed ~ .main { 
    margin-left: 0; 
  }
  
  .sidebar-toggle { 
    left: 16px; 
    top: 16px; 
    width: 44px; 
    height: 44px; 
    font-size: 1rem;
    display: none !important;
  }
  
  .mobile-navbar {
    display: block !important;
  }
}

@media (max-width: 576px) {
  .sidebar {
    width: 100%;
    max-width: 85vw;
  }
  
  .sidebar-toggle {
    left: 12px;
    top: 12px;
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
}
