/* =========================================================
   NAVIGATION
========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(14px);

  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sidebar-logout {
  margin-top:12px;
}
.nav-inner > div:nth-child(2) {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo img {
  max-height: 50px;
  height: auto;
  width: auto;
}

/* =========================================================
   CONTAINER + CARD
========================================================= */
.container {
  max-width:1000px;
  margin:auto;
  padding:20px;
}

.card {
  background: var(--card-bg);
  padding: 28px;
  border-radius: 18px;

  border: 1px solid rgba(0,0,0,0.06);

  box-shadow:
    0 20px 60px rgba(0,0,0,0.06),
    0 8px 20px rgba(0,0,0,0.04);
}

/* =========================================================
   FORM
========================================================= */
label {
  display:block;
  margin-top:15px;
  font-size:14px;
  color:var(--muted);
}

input {
  width:100%;
  padding:12px;
  margin-top:6px;
  border-radius:8px;
  border:1px solid var(--border);
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.2);
}

/* =========================================================
   BUTTONS
========================================================= */
button {
  padding:12px 14px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;

  background: var(--brand-fill);
  border: 1px solid var(--brand-border);
}

button:hover {
  background: var(--brand);
  color: var(--brand-text);
}

button.primary {
  background: var(--brand);
  color: var(--brand-text);
}

button.delete {
  background:#dc2626;
  color:#fff;
}

/* =========================================================
   TOAST SYSTEM (auto-dismiss + progress bar)
========================================================= */

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  z-index: 9999;
}

.toast {
  position: relative;

  min-width: 240px;
  max-width: 90vw;

  padding: 14px 18px;
  border-radius: 12px;

  color: #fff;
  font-weight: 600;
  text-align: center;

  box-shadow: 0 12px 30px rgba(0,0,0,0.2);

  animation: fadeInUp 0.25s ease;
  overflow: hidden;
}

/* Progress bar */
.toast::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,0.6);

  animation: toastProgress var(--duration, 3000ms) linear forwards;
}

/* Variants */
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }

/* Entrance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Exit */
.toast.hide {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
}

/* Progress animation */
@keyframes toastProgress {
  from { width: 0%; }
  to { width: 100%; }
}
/* =========================================================
   MODAL
========================================================= */
.modal {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.4);
  display:flex;
  align-items:center;
  justify-content:center;
}

/* =========================================================
   NAV TOGGLE + MOBILE MENU
========================================================= */
.nav-toggle {
  display: none;
}

@media (max-width: 768px) {

  .nav-toggle {
    display: block;
  }

.nav-actions {
  display: flex;
  flex-direction: column;

  position: absolute;
  top: 60px;
  right: 16px;

  background: rgba(255,255,255,0.95);
  padding: 12px;
  border-radius: 12px;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.nav-actions.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

  .logo img {
    height: 40px;
  }
}

/* ===== BUTTON SYSTEM ===== */
.btn {
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-text);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(0,0,0,0.25);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
}

.btn-secondary:hover {
  background: var(--brand);
  color: var(--brand-text);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}


.sidebar-logout .btn,
.sidebar-logout button {
  width: 100%;
}

.sidebar-logout .btn.btn-danger,
.sidebar-logout button.btn-danger {
  background: rgba(239,68,68,0.14) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239,68,68,0.24) !important;
  box-shadow: 0 16px 36px rgba(239,68,68,0.14) !important;
}

.sidebar-logout .btn.btn-danger:hover,
.sidebar-logout button.btn-danger:hover {
  filter: brightness(1.04);
}

/* =========================================================
   MOBILE SIDEBAR / HAMBURGER MENU
========================================================= */
.mobile-topbar,
.mobile-menu {
  display: none;
}

.mobile-topbar {
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(7, 15, 28, 0.92);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mobile-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.mobile-topbar-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #e11d74, #fb7185);
  box-shadow: 0 10px 24px rgba(225, 29, 116, 0.22);
}

.mobile-topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.mobile-topbar-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #94a3b8;
  margin-top: 4px;
}

.mobile-menu-toggle {
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.mobile-menu {
  padding: 14px 16px 18px;
  background: rgba(7, 15, 28, 0.96);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-footer {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu .sidebar-link {
  min-height: 46px;
  padding: 0 14px;
}

@media (max-width: 1100px) {
  .mobile-topbar {
    display: flex;
  }

  .sidebar {
    display: none !important;
  }
}

.sidebar-shell {
  display:block;
  min-width:0;
}
/* =========================================================
   SHARED SIDEBAR SYSTEM
========================================================= */
.sidebar-shell {
  display:block;
  min-width:0;
}

.sidebar {
  background:rgba(7, 15, 28, 0.88);
  border-right:1px solid rgba(255,255,255,0.06);
  padding:28px 20px;
  display:flex;
  flex-direction:column;
  min-height:100vh;
  gap:28px;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.03);
}

.sidebar-brand {
  display:flex;
  align-items:center;
  gap:14px;
}

.sidebar-logo {
  width:48px;
  height:48px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:18px;
  color:#fff;
  background:linear-gradient(135deg, #e11d74, #fb7185);
  box-shadow:0 12px 28px rgba(225, 29, 116, 0.28);
}

.sidebar-title {
  font-size:24px;
  font-weight:700;
  color:#fff;
  line-height:1;
}

.sidebar-subtitle {
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.16em;
  color:#94a3b8;
  margin-top:4px;
}

.sidebar-nav {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sidebar-link {
  display:flex;
  align-items:center;
  min-height:48px;
  padding:0 16px;
  border-radius:14px;
  color:#cbd5e1;
  text-decoration:none;
  font-weight:500;
  background:transparent;
  border:1px solid transparent;
  transition:all 0.2s ease;
}

.sidebar-link:hover {
  background:rgba(255,255,255,0.04);
  color:#fff;
  border-color:rgba(255,255,255,0.05);
}

.sidebar-link.active {
  background:linear-gradient(135deg, rgba(225,29,116,0.28), rgba(244,63,94,0.18));
  color:#fff;
  border-color:rgba(244,114,182,0.24);
  box-shadow:0 10px 26px rgba(225, 29, 116, 0.16);
}

.sidebar-plan,
.sidebar-user {
  background:rgba(11, 20, 36, 0.78);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:18px;
  padding:18px 16px;
}

.sidebar-plan-title {
  font-size:13px;
  font-weight:700;
  color:#fff;
  margin-bottom:8px;
}

.sidebar-plan-text,
.sidebar-user-email {
  font-size:13px;
  color:#94a3b8;
  line-height:1.5;
}

.sidebar-user {
  margin-top:auto;
  display:flex;
  align-items:center;
  gap:12px;
}

.sidebar-user-avatar {
  width:42px;
  height:42px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, #e11d74, #7c3aed);
  color:#fff;
  font-weight:700;
  flex-shrink:0;
}

.sidebar-user-name {
  color:#fff;
  font-weight:600;
  font-size:14px;
}

.sidebar-logout {
  margin-top:12px;
}

.sidebar-logout .btn,
.sidebar-logout button {
  width:100%;
}

.sidebar-logout .btn.btn-danger,
.sidebar-logout button.btn-danger {
  background: rgba(239,68,68,0.14) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239,68,68,0.24) !important;
  box-shadow: 0 16px 36px rgba(239,68,68,0.14) !important;
}

.sidebar-logout .btn.btn-danger:hover,
.sidebar-logout button.btn-danger:hover {
  filter: brightness(1.04);
}

.mobile-topbar-right {
  display:flex;
  align-items:center;
  gap:10px;
}

.mobile-credit-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  color:#e2e8f0;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

@media (max-width: 420px) {
  .mobile-credit-pill {
    font-size:11px;
    padding:0 10px;
    min-height:34px;
  }
}