/* ============================================================ */
/* AQUAQUEST v1.0 — MAIN STYLESHEET                              */
/* Reset · Typography · Layout · Nav · Buttons · Modals          */
/* ============================================================ */

/* ============================================================ */
/* 1. RESET                                                      */
/* ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--pc-text);
  background: var(--pc-bg);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: var(--pc-topnav-height);
  padding-bottom: var(--pc-bottomnav-height);
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ============================================================ */
/* 2. TYPOGRAPHY                                                 */
/* ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--pc-text);
}

h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

p { color: var(--pc-text-2); line-height: 1.55; }
small { font-size: 12px; color: var(--pc-text-muted); }

.text-script { font-family: 'Caveat', cursive; font-weight: 700; }
.text-muted { color: var(--pc-text-muted); }
.text-accent { color: var(--pc-accent); }

/* ============================================================ */
/* 3. TOP NAV                                                    */
/* ============================================================ */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--pc-topnav-height);
  background: var(--pc-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pc-page-padding);
  z-index: 900;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.top-nav.nav-hidden { transform: translateY(-100%); }

.top-nav.scrolled {
  box-shadow: 0 2px 12px rgba(14, 58, 76, 0.08);
}

body.dark-mode .top-nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

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

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* ============================================================ */
/* 4. BRAND                                                      */
/* ============================================================ */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* NEW — Force logo alignment */
.brand-logo {
  width: 28px !important;
  height: 28px !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  align-self: center !important;
}

.brand-name {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  font-weight: 700;
  color: var(--pc-text);
  letter-spacing: 0.3px;
}

/* ============================================================ */
/* 5. HAMBURGER                                                  */
/* ============================================================ */
.hamburger-btn {
  width: 34px;
  height: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
  transition: background 0.2s ease;
  flex-shrink: 0;
  background: none;
  border: none;
}

.hamburger-btn:hover { background: rgba(0, 0, 0, 0.05); }
body.dark-mode .hamburger-btn:hover { background: rgba(255, 255, 255, 0.08); }

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pc-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}

.hamburger-btn.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================ */
/* 6. HEADER ICONS                                               */
/* ============================================================ */
.notif-icon,
.search-icon {
  font-size: 20px;
  color: var(--pc-text);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
  vertical-align: middle;
}

.notif-icon { padding-top: 3px; }
.notif-icon:hover, .search-icon:hover { color: var(--pc-accent); }

.notif-icon[data-count]:not([data-count="0"])::after {
  content: attr(data-count);
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--pc-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================ */
/* 7. NAV SEARCH EXPANSION                                       */
/* ============================================================ */
.nav-search-wrap {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.top-nav.search-mode {
  background: var(--pc-card);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.top-nav.search-mode .top-nav-left,
.top-nav.search-mode .top-nav-right { display: none; }
.top-nav.search-mode .nav-search-wrap { display: flex; }

.nav-search-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--pc-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.nav-search-back:hover { background: var(--pc-paper); }

.nav-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
}

.search-input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-text-muted);
  font-size: 15px;
  pointer-events: none;
  z-index: 2;
}

.nav-search-input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 48px;
  border: none;
  background: var(--pc-paper);
  border-radius: 50px;
  font-size: 14px;
  font-family: inherit;
  color: var(--pc-text);
  outline: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search-input:focus {
  background: var(--pc-card);
  box-shadow: 0 0 0 2px var(--pc-accent-soft);
}

.nav-search-input::placeholder { color: var(--pc-placeholder); }

.nav-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pc-border-light);
  border: none;
  color: var(--pc-text-muted);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  z-index: 3;
}

.nav-search-clear.visible { display: flex; }

/* ============================================================ */
/* 8. PAGE SYSTEM                                                */
/* ============================================================ */
.page {
  display: none;
  min-height: calc(100vh - var(--pc-topnav-height) - var(--pc-bottomnav-height));
  padding-bottom: 20px;
  padding-top: 12px;
}

.page.active { display: block; animation: pageFadeIn 0.3s ease; }

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

.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--pc-page-padding);
}

.content-loaded { animation: contentFadeIn 0.35s ease; }

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

/* ============================================================ */
/* 9. BOTTOM NAV (5 items with center +)                         */
/* ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--pc-bottomnav-height);
  background: var(--pc-nav-bg);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 900;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
  padding: 0 8px;
  transition: background 0.3s ease;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  color: var(--pc-nav-inactive);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: 12px;
  transition: color 0.2s ease, transform 0.2s ease;
  max-width: 80px;
  min-width: 0;
  cursor: pointer;
  background: none;
  border: none;
  position: relative;
}

.nav-item i { font-size: 20px; transition: transform 0.2s ease; }
.nav-item.active { color: var(--pc-nav-active); }
.nav-item.active i { transform: translateY(-2px); }
.nav-item:hover { color: var(--pc-nav-active); }

.nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- Center + button ---------- */
.nav-item-add {
  flex: 0 0 auto;
  max-width: 70px;
  padding: 0;
  gap: 0;
  margin-top: -20px;
  pointer-events: auto;
}

.nav-item-add span.nav-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pc-accent), var(--pc-primary));
  color: #fff;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.45),
              0 0 0 4px var(--pc-nav-bg),
              0 0 0 5px rgba(34, 211, 238, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: visible;
}

.nav-item-add .nav-add-btn i {
  font-size: 22px;
  color: #fff;
  transform: none;
  transition: transform 0.3s ease;
}

.nav-item-add:hover .nav-add-btn {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.55),
              0 0 0 4px var(--pc-nav-bg),
              0 0 0 5px rgba(34, 211, 238, 0.3);
}

.nav-item-add:active .nav-add-btn {
  transform: scale(0.96);
}

.nav-item-add:hover .nav-add-btn i {
  transform: rotate(90deg);
}

/* ============================================================ */
/* 10. ACTION SHEET                                              */
/* ============================================================ */
.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.action-sheet.active {
  opacity: 1;
  visibility: visible;
}

.action-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 30, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.action-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--pc-card);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 12px 20px 24px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.action-sheet.active .action-sheet-panel {
  transform: translateY(0);
}

.action-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 20px;
  background: var(--pc-border);
  margin: 0 auto 16px;
}

.action-sheet-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--pc-text);
  text-align: center;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.action-sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: var(--pc-paper);
  border: 1px solid transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.action-sheet-item:hover {
  background: var(--pc-card);
  border-color: var(--pc-accent);
  transform: translateX(4px);
  box-shadow: var(--pc-shadow-sm);
}

.action-sheet-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.action-sheet-info { flex: 1; min-width: 0; }

.action-sheet-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--pc-text);
  margin-bottom: 3px;
}

.action-sheet-sub {
  font-size: 11.5px;
  color: var(--pc-text-muted);
  line-height: 1.35;
}

.action-sheet-chevron {
  color: var(--pc-text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.action-sheet-cancel {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: transparent;
  border: 1.5px solid var(--pc-border);
  color: var(--pc-text-2);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  margin-top: 6px;
}

.action-sheet-cancel:hover {
  background: var(--pc-paper);
  color: var(--pc-text);
}

/* ============================================================ */
/* 11. CARDS                                                     */
/* ============================================================ */
.card {
  background: var(--pc-card);
  border-radius: var(--pc-radius);
  padding: var(--pc-card-padding);
  box-shadow: var(--pc-shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover { box-shadow: var(--pc-shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.card-header h3 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i { color: var(--pc-accent); }

.card-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--pc-brown);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
  background: none;
  border: none;
  font-family: inherit;
}

.card-link:hover { background: var(--pc-accent-soft); }

/* ============================================================ */
/* 12. BUTTONS                                                   */
/* ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: none;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--pc-primary);
  color: var(--pc-text-on-dark);
  box-shadow: 0 4px 12px rgba(14, 58, 76, 0.25);
}

.btn-primary:hover {
  background: var(--pc-primary-hover);
  box-shadow: 0 6px 18px rgba(14, 58, 76, 0.35);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--pc-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-accent:hover {
  background: var(--pc-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(8, 145, 178, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--pc-text);
  border: 1.5px solid var(--pc-border);
}

.btn-outline:hover {
  background: var(--pc-accent-soft);
  border-color: var(--pc-accent);
  color: var(--pc-accent);
}

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

.btn-danger:hover { filter: brightness(0.9); }

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

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: var(--pc-primary);
  color: var(--pc-text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.w-full { width: 100%; }

/* ============================================================ */
/* 13. CHIPS                                                     */
/* ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 25px;
  background: var(--pc-card);
  color: var(--pc-text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--pc-border-light);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.chip:hover {
  border-color: var(--pc-accent);
  background: var(--pc-accent-soft);
}

.chip.active {
  background: var(--pc-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

/* ============================================================ */
/* 14. BADGES                                                    */
/* ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.badge-success { background: var(--pc-success-soft); color: var(--pc-success); }
.badge-warning { background: var(--pc-warning-soft); color: var(--pc-warning); }
.badge-danger  { background: var(--pc-danger-soft); color: var(--pc-danger); }
.badge-info    { background: var(--pc-info-soft); color: var(--pc-info); }
.badge-accent  { background: var(--pc-accent-soft); color: var(--pc-accent); }

/* ============================================================ */
/* 15. MODAL BASE                                                */
/* ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 30, 42, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;              /* ⭐ NOT clickable when hidden */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;              /* ⭐ Clickable when active */
}

.modal-content {
  background: var(--pc-card);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  border-radius: var(--pc-radius);
  padding: 25px;
  overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-large { max-width: 720px; }

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

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-right: 30px;
  color: var(--pc-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title i { color: var(--pc-accent); }

.close-modal {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  color: var(--pc-text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  background: none;
  border: none;
  z-index: 3;
}

.close-modal:hover {
  background: var(--pc-accent-soft);
  color: var(--pc-text);
}

/* ============================================================ */
/* 16. INPUTS                                                    */
/* ============================================================ */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--pc-border-light);
  border-radius: var(--pc-radius-sm);
  background: var(--pc-input-bg);
  font-size: 14px;
  font-family: inherit;
  color: var(--pc-text);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder,
input::placeholder,
textarea::placeholder { color: var(--pc-placeholder); }

.input:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--pc-accent);
  background: var(--pc-card);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

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

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pc-text-2);
  margin-bottom: 6px;
}

/* ============================================================ */
/* 17. TOAST                                                     */
/* ============================================================ */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--pc-primary);
  color: var(--pc-text-on-dark);
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  z-index: 1200;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================ */
/* 18. BACK TO TOP                                               */
/* ============================================================ */
.back-to-top {
  position: fixed;
  bottom: calc(var(--pc-bottomnav-height) + 16px);
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pc-primary);
  color: var(--pc-text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 800;
  box-shadow: 0 6px 20px rgba(14, 58, 76, 0.35);
  border: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--pc-primary-hover);
  transform: translateY(-2px);
}

/* ============================================================ */
/* 19. DRAWER                                                    */
/* ============================================================ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 30, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.active { opacity: 1; visibility: visible; }

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 88vw;
  height: 100vh;
  background: var(--pc-card);
  z-index: 1100;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.2);
}

.side-drawer.active { transform: translateX(0); }

.drawer-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 20px 20px;
  background: linear-gradient(135deg, var(--pc-primary), var(--pc-accent));
  color: #fff;
  flex-shrink: 0;
}

.drawer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  overflow: hidden;
}

.drawer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-avatar.logged-in {
  background: linear-gradient(135deg, #4DD0E1, #22D3EE);
  color: #0C2D3E;
}

.drawer-user-info { flex: 1; min-width: 0; }

.drawer-user-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-user-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-signin-banner {
  margin: 14px 16px 4px;
  padding: 14px;
  background: var(--pc-warning-soft);
  border: 1.5px dashed var(--pc-warning);
  border-radius: var(--pc-radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.drawer-signin-banner.hidden { display: none; }

.drawer-signin-banner p {
  font-size: 12.5px;
  color: var(--pc-warning);
  line-height: 1.4;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-signin-btn {
  background: var(--pc-primary);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
  font-family: inherit;
}

.drawer-signin-btn:hover { background: var(--pc-primary-hover); }

.drawer-section {
  padding: 12px 12px 4px;
  flex-shrink: 0;
}

.drawer-section + .drawer-section {
  border-top: 1px solid var(--pc-border-light);
  margin-top: 8px;
  padding-top: 16px;
}

.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pc-text-muted);
  padding: 0 10px 8px;
}

.drawer-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--pc-text);
  text-align: left;
  transition: background 0.2s ease, transform 0.2s ease;
  background: none;
  border: none;
  font-family: inherit;
}

.drawer-item:hover {
  background: var(--pc-accent-soft);
  transform: translateX(3px);
}

.drawer-item > i:first-child {
  width: 20px;
  text-align: center;
  color: var(--pc-accent);
  flex-shrink: 0;
}

.drawer-item > span:not(.drawer-badge) { flex: 1; }

.drawer-chevron {
  font-size: 11px;
  color: var(--pc-text-muted);
  flex-shrink: 0;
}

.drawer-badge {
  background: var(--pc-accent-soft);
  color: var(--pc-accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}

.drawer-badge.hidden { display: none; }

.drawer-item-danger > i:first-child { color: var(--pc-danger); }
.drawer-item-danger:hover { background: var(--pc-danger-soft); }

.drawer-toggle-item { cursor: default; }

.drawer-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.drawer-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.drawer-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--pc-border);
  border-radius: 25px;
  transition: background 0.3s ease;
}

.drawer-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.drawer-switch input:checked + .drawer-switch-slider { background: var(--pc-success); }
.drawer-switch input:checked + .drawer-switch-slider::before { transform: translateX(20px); }

.drawer-footer {
  margin-top: auto;
  padding: 16px 12px 20px;
  border-top: 1px solid var(--pc-border-light);
  flex-shrink: 0;
}

.drawer-auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--pc-primary), var(--pc-accent));
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 6px;
  box-shadow: 0 4px 14px rgba(14, 58, 76, 0.3);
  border: none;
  font-family: inherit;
}

.drawer-auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 58, 76, 0.4);
}

.drawer-auth-btn.logged-in {
  background: var(--pc-accent-soft);
  color: var(--pc-text);
  box-shadow: none;
}

.drawer-version {
  text-align: center;
  font-size: 11px;
  color: var(--pc-text-muted);
  margin-top: 14px;
}

/* ============================================================ */
/* 20. UTILITIES                                                 */
/* ============================================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--pc-text-muted);
  font-size: 14px;
}

.empty-state i {
  font-size: 42px;
  margin-bottom: 14px;
  opacity: 0.4;
  display: block;
}

/* ============================================================ */
/* 21. SCROLLBAR                                                 */
/* ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--pc-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--pc-text-muted); }

/* ============================================================ */
/* 22. RESPONSIVE                                                */
/* ============================================================ */
@media (max-width: 768px) {
  :root {
    --pc-page-padding: 16px;
    --pc-card-padding: 16px;
  }

  .modal-content {
    padding: 20px;
    max-height: 92vh;
  }
}

@media (max-width: 480px) {
  :root { --pc-page-padding: 14px; }

  .nav-item { font-size: 9.5px; }
  .nav-item i { font-size: 18px; }

  .nav-item-add span.nav-add-btn {
    width: 52px;
    height: 52px;
  }
  .nav-item-add .nav-add-btn i { font-size: 20px; }

  .brand-name { font-size: 20px; }
  .brand-logo { width: 28px; height: 28px; }

  .notif-icon,
  .search-icon { font-size: 18px; }

  .side-drawer { width: 300px; }
}

/* ============================================================ */
/* 23. REDUCED MOTION                                            */
/* ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}