/* WeaponLog Theme - brushed gunmetal background, bronze highlights, light text */
:root{
  --bg: #1b1d20;
  --panel: rgba(40, 42, 46, 0.70);
  --panel-2: rgba(32, 34, 38, 0.85);
  --border: rgba(255,255,255,0.08);
  --text: rgba(240,243,255,0.92);
  --muted: rgba(240,243,255,0.70);
  --bronze: #b08d57;
  --bronze-2: #8f6c3a;
  --danger: #d9534f;
}

html, body { height: 100%; }
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.04), transparent 45%),
              radial-gradient(circle at 80% 30%, rgba(176,141,87,0.12), transparent 50%),
              linear-gradient(180deg, rgba(24,26,30,1) 0%, rgba(15,16,18,1) 100%);
  color: var(--text);
}

a { color: var(--bronze); text-decoration: none; }
a:hover { color: #d2b07a; }

.container { max-width: 1100px; margin: 0 auto; padding: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(176,141,87,0.35);
  background: linear-gradient(180deg, rgba(176,141,87,0.18), rgba(176,141,87,0.08));
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { border-color: rgba(176,141,87,0.65); }
.btn.secondary {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(176,141,87,0.65);
  box-shadow: 0 0 0 3px rgba(176,141,87,0.15);
}
label { color: var(--muted); font-size: 0.9rem; }

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(18,19,22,0.55);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand{ display:flex; align-items:center; gap:12px; font-weight: 800; letter-spacing: 0.4px; }
.brand-logo{height:96px;width:auto;display:block;}
.navlinks{ display:flex; gap:12px; flex-wrap: wrap; }

.kv { display:grid; grid-template-columns: 140px 1fr; gap: 8px 12px; }
.k { color: var(--muted); }
.v { color: var(--text); }

.muted { color: var(--muted); }

/* Auth pages */
.auth-card { max-width: 520px; }
.auth-form input, .auth-form select, .auth-form textarea {
  width: 320px;
  max-width: 100%;
}


/* Auth pages (centered, industry-standard) */
.auth-center {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
}
.auth-card { width: 560px; max-width: 92vw; }
.auth-form { width: 100%; }
.auth-form .field-wrap { width: 360px; max-width: 100%; margin: 0 auto 14px auto; }
.auth-form label { display:block; margin-bottom: 6px; }
.auth-form input, .auth-form select, .auth-form textarea { width: 100%; }
.auth-form .actions { display:flex; justify-content:center; margin-top: 6px; }

.auth-links{ text-align:center; margin-top: 12px; }


/* Layout: constrain main app width */
.container, .page, .page-wrap, .content, main.container {
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 900px) {
  .container, .page, .page-wrap, .content, main.container {
    max-width: 95%;
  }
}


/* Top navigation as connected tabs */
.top-nav{
  display:flex;
  /* Make tabs clearly separate */
  gap:14px;
  align-items:flex-end;
  /* Pull the tabs up into the dark header bar (bottom-aligned inside it) */
  padding:0 12px 0 12px;
  margin-top:-26px;
  margin-bottom:0;
}
.top-nav a{
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:12px 12px 0 0;
  text-decoration:none;
  color:rgba(235,235,235,.9);
  background:rgba(10,10,10,.25);
  border:1px solid rgba(180,140,80,.28);
  border-bottom:none;
  position:relative;
  top:1px;
}
.top-nav a:hover{filter:brightness(1.08);}
.top-nav a.active{
  background:rgba(35,35,35,.85);
  color:rgba(255,255,255,.98);
  box-shadow:0 8px 18px rgba(0,0,0,.35);
}


/* Header brand logo sizing */
/* Triple-ish the logo size so it's readable in the top bar */
.brand-logo{height:150px;width:auto;display:block;}
.header{min-height:150px;}

/* =========================
   v26 Layout + Consistent Spacing
   ========================= */

/* Overall page container (80% width) */
.page{min-height:100vh;}
.content{
  width:90%;
  max-width:1200px;
  margin:0 auto;
  padding:22px 0 48px;
}

/* Header with connected tabs */
.app-header{
  background:rgba(0,0,0,.28);
  border-bottom:1px solid rgba(255,255,255,.06);
  padding:12px 0 0;
}
.app-header .header-inner{
  width:80%;
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;}
.brand-logo{height:72px;width:auto;display:block;}

.header-right{
  display:flex;
  align-items:center;
  gap:12px;
  color:rgba(235,235,235,.82);
}

.top-tabs{
  max-width:1200px;
  margin:10px auto 0;
  display:flex;
  align-items:flex-end;
  gap:14px; /* make items clearly independent */
  padding:0 0 1px;
}
.top-tabs .tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:10px 16px;
  border-radius:12px 12px 0 0;
  text-decoration:none;
  color:var(--bronze);
  background:rgba(0,0,0,.18);
  border:1px solid rgba(180,140,80,.32);
  border-bottom:none;
  position:relative;
  top:1px;
}
.top-tabs .tab:hover{filter:brightness(1.08);}
.top-tabs .tab.active{
  background:rgba(35,35,35,.88);
  color:rgba(255,255,255,.96);
  box-shadow:0 10px 22px rgba(0,0,0,.35);
}

/* Cards/panels spacing */
.card,
.panel,
.box{
  margin-top:18px;
}
.card + .card,
.panel + .panel,
.box + .box{margin-top:18px;}

/* Button bars should have breathing room from cards */
.actions,
.action-row,
.btn-row{margin:14px 0 16px;}

/* Standardized buttons (same height; similar widths) */
.btn,
button.btn,
a.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 16px;
  border-radius:14px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}
button.btn{font:inherit;}

/* Give action buttons a consistent baseline width */
.btn-ghost,
.btn-secondary,
.btn-danger{
  min-width:92px;
}

/* Ensure inline forms don't distort button sizing */
form{margin:0;}

/* Responsive media (weapon photos, invoice previews, etc.) */
.weapon-photo img,
img.responsive-img{
  max-width:100%;
  height:auto;
  display:block;
  border-radius:14px;
}
/* Ensure the image inside behaves nicely */
.ammo-photo img{
  max-width:100%;
  height:auto;
  display:block;
  border-radius:14px;
}

/* If a photo is shown in a grid/card, keep it sane */
.media-frame{max-width:100%;}
.media-frame img{max-width:100%;height:auto;}

/* =========================
   Header layout (v29)
   Matches the "desired" layout:
   - big logo left
   - tabs centered in header
   - user/Logout on the right
   ========================= */

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(25, 26, 30, 0.95), rgba(25, 26, 30, 0.75));
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

/* Row 1: logo and user block - constrained to match content width */
.topbar-row1{
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px 0;
  box-sizing: border-box;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo{
  height: 100px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.35));
}

.topbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.topbar-user{
  color: var(--muted);
  font-size: 0.95rem;
}

/* Row 2: tabs aligned to the content box and sitting at the bottom of the header */
.topbar-row2{
  width: 100%;
  padding: 0 0 0;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
}

.topbar-tabs-container{
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.top-tabs{
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}


/* Mobile-only primary navigation: standalone button with hamburger dropdown */
.mobile-tabs-container{ display:none; }
.mobile-tabs{ position: relative; }
.mobile-tabs__summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  min-width: 150px;
  padding:8px 16px;
  border-radius:12px;
  text-decoration:none;
  background:rgba(35,35,35,.88);
  color:rgba(255,255,255,.96);
  border:1px solid rgba(180,140,80,.32);
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  font-size: 0.95rem;
}
.mobile-tabs__summary::-webkit-details-marker{ display:none; }
.mobile-tabs__hamb{ color:var(--bronze); font-weight:700; font-size: 1rem; }
.mobile-tabs__label{ flex:1 1 auto; }

.mobile-tabs__dropdown{
  position:absolute;
  left:10px;
  right:0;
  top:calc(100% + 8px);
  min-width: 200px;
  z-index:60;
  background:rgba(25,26,30,.98);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  padding:6px;
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}
.mobile-tabs__item{
  display:flex;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  color:rgba(235,235,235,.92);
  text-decoration:none;
}
.mobile-tabs__item:hover{ background:rgba(255,255,255,0.06); }
.mobile-tabs__item.active{
  background:rgba(180,140,80,0.12);
  border:1px solid rgba(180,140,80,0.22);
}

/* Mobile detection: use pointer:coarse to detect touch devices (phones/tablets)
   This ensures mobile menu is shown on phones even in landscape orientation */
@media (pointer: coarse) {
  .topbar-row1{ padding: 12px 0 6px; }
  .brand-logo{ height: 46px; }

  /* On touch devices, always use mobile menu */
  .top-tabs{ display:none !important; }
  .mobile-tabs-container{
    display:block;
    margin:12px auto 18px;
  }
  /* Make the button auto-width (shrink to content) */
  .mobile-tabs{
    display:inline-block;
  }
}

/* Fallback for devices that don't support pointer media query - use width */
@media (max-width: 700px){
  .topbar-row1{ padding: 12px 0 6px; }
  .brand-logo{ height: 46px; }

  /* On narrow screens, hide the full tab row and show the single active tab dropdown */
  .top-tabs{ display:none; }
  .mobile-tabs-container{
    display:block;
    margin:12px auto 18px;
  }
  /* Make the button auto-width (shrink to content) */
  .mobile-tabs{
    display:inline-block;
  }
}

/* On smaller screens, use more width */
@media (max-width: 900px) {
  .topbar-row1{ width: 95%; }
  .topbar-tabs-container{ width: 95%; }
}

/* Desktop: only show full tabs on non-touch devices with sufficient width */
@media (pointer: fine) and (min-width: 701px){
  .mobile-tabs-container{ display:none !important; }
  .top-tabs{ display:flex; }
}

/* Add breathing room above the dashboard button row */
.card .btn {
  margin-top: 10px;
  margin-bottom: 5px
}

/* Left-align all table content */
table th,
table td {
  text-align: left !important;
}
.table th:not(:last-child),
.table td:not(:last-child){
  padding-right: 20px;
}

/* Dashboard stat grid */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 18px;
}

/* 3 columns on desktop, collapses to 2 then 1 */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 18px;
}

/* 4 columns on desktop, collapses to 2 then 1 */
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 18px;
}

.grid5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 18px;
}

@media (max-width: 1100px) {
  .grid3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .grid3 {
    grid-template-columns: 1fr;
  }
  .grid4 {
    grid-template-columns: 1fr;
  }
  .grid5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .grid5 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--bronze);
  background: linear-gradient(165deg, rgba(30, 32, 36, 0.95) 0%, rgba(20, 22, 26, 0.9) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 160, 73, 0.35);
  border-top-color: var(--bronze);
}

.dash-card--empty {
  visibility: hidden;
  min-height: 0;
}

@media (max-width: 1100px) {
  .dash-card--empty {
    display: none;
  }
}

.dash-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.dash-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.dash-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Secondary text in value (like "Rounds" or "/Year") */
.dash-value .dash-secondary {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.trend-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.trend-arrow.up {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.trend-arrow.down {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.trend-arrow.flat {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.dash-empty {
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.08);
  min-height: 72px;
}

/* =========================
   USER DROPDOWN (TOP RIGHT)
   ========================= */

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

.user-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-menu__dropdown {
  display: none; /* hidden by default */
  position: absolute;
  right: 10px;
  top: calc(100% + 8px);
  min-width: 190px;
  z-index: 999;
  border-radius: 14px;
  border: 1px solid rgba(212, 160, 73, 0.22);
  background: rgba(18, 18, 18, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.user-menu.is-open .user-menu__dropdown,
.user-menu[open] .user-menu__dropdown {
  display: block;
}

/* <details>/<summary> dropdown marker + layout */
.user-menu > summary {
  list-style: none;
}
.user-menu > summary::-webkit-details-marker {
  display: none;
}

.user-menu__item,
.user-menu__form button.user-menu__item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  display: block;
  border: 0;
  background: transparent;
  color: rgba(240, 243, 255, 0.95);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.user-menu__item:hover {
  background: rgba(212, 160, 73, 0.10);
}

.user-menu__item--danger {
  color: rgba(255, 120, 120, 0.95);
}

.user-menu__item--danger:hover {
  background: rgba(255, 120, 120, 0.10);
}

/* -------------------------
   Modal (Profile)
-------------------------- */
.wl-modal-open { overflow: hidden; }

.wl-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  z-index: 999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Ensure the HTML [hidden] attribute always wins (so the modal doesn't auto-show) */
.wl-modal-backdrop[hidden] {
  display: none !important;
}

.wl-modal {
  width: min(720px, 100%);
  max-height: none;
  margin: auto 0;
  border-radius: 16px;
  border: 1px solid rgba(212, 160, 73, 0.25);
  background: rgba(22, 22, 22, 0.95);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  overflow: visible;
  flex-shrink: 0;
}

.wl-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(212, 160, 73, 0.15);
  position: sticky;
  top: 0;
  background: rgba(22, 22, 22, 0.98);
  border-radius: 16px 16px 0 0;
  z-index: 10;
}

.wl-modal__title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.wl-modal__close {
  padding: 6px 10px;
}

.wl-modal__body {
  padding: 14px;
}

/* Mobile modal adjustments */
@media (max-width: 600px) {
  .wl-modal-backdrop {
    padding: 16px 10px;
    align-items: flex-start;
  }
  
  .wl-modal {
    width: 100%;
    margin: 0;
    border-radius: 14px;
  }
  
  .wl-modal__header {
    border-radius: 14px 14px 0 0;
  }
  
  .wl-modal__body {
    padding: 12px;
  }
  
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

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

.profile-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-grid label {
  font-size: 12px;
  color: rgba(240, 243, 255, 0.75);
}

.profile-grid input[type="text"],
.profile-grid input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(240, 243, 255, 0.95);
}

.profile-grid .full {
  grid-column: 1 / -1;
}

.profile-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: rgba(240, 243, 255, 0.95);
}

.profile-share__text {
  font-size: 14px;
  color: rgba(240, 243, 255, 0.95);
}

.profile-share input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.profile-delete-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  justify-content: flex-end;
}

.profile-consent {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(212, 160, 73, 0.10);
  border: 1px solid rgba(212, 160, 73, 0.18);
}

/* -------------------------
   Spinner and Progress Bar
-------------------------- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(212, 160, 73, 0.25);
  border-top-color: var(--bronze);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bronze-2), var(--bronze));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-bar.indeterminate {
  width: 30% !important;
  animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
  0% { margin-left: 0; }
  50% { margin-left: 70%; }
  100% { margin-left: 0; }
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* -------------------------
   Collapsible Profile Sections
-------------------------- */
.profile-section {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.profile-section:first-child {
  margin-top: 0;
}

.profile-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease;
  list-style: none;
}

.profile-section__header::-webkit-details-marker {
  display: none;
}

.profile-section__header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.profile-section__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.profile-section__chevron {
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.profile-section[open] .profile-section__header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.profile-section[open] .profile-section__chevron {
  transform: rotate(180deg);
}

.profile-section__content {
  padding: 14px;
}

.profile-section--danger {
  border-color: rgba(255, 100, 100, 0.15);
  background: rgba(255, 100, 100, 0.05);
  padding: 12px 14px;
}

/* =========================
   NOTIFICATION SYSTEM
   ========================= */

/* Notification Menu (Envelope Icon) */
.notif-menu {
  position: relative;
  display: inline-block;
}

.notif-menu > summary {
  list-style: none;
}

.notif-menu > summary::-webkit-details-marker {
  display: none;
}

.notif-menu__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.notif-menu__btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(176, 141, 87, 0.25);
}

.notif-menu[open] .notif-menu__btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(176, 141, 87, 0.35);
}

/* Envelope Icon States */
.notif-icon {
  transition: color 0.2s ease, transform 0.2s ease;
}

.notif-icon--inactive {
  color: rgba(240, 243, 255, 0.5);
}

.notif-icon--active {
  color: var(--bronze);
}

.notif-icon--pulse {
  animation: notif-pulse 0.5s ease-in-out 3;
}

@keyframes notif-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Badge */
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--bronze);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* Dropdown - matches user menu style */
.notif-menu__dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  max-width: 320px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 999;
  border-radius: 14px;
  border: 1px solid rgba(212, 160, 73, 0.22);
  background: rgba(18, 18, 18, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.notif-menu[open] .notif-menu__dropdown {
  display: block;
}

.notif-dropdown__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.notif-dropdown__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px;
  color: var(--muted);
}

.notif-dropdown__empty-icon {
  font-size: 28px;
  opacity: 0.6;
}

.notif-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  text-decoration: none;
  color: rgba(240, 243, 255, 0.95);
  transition: background 0.1s ease;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.notif-dropdown__item:hover {
  background: rgba(212, 160, 73, 0.10);
}

.notif-dropdown__item--unread {
  background: rgba(212, 160, 73, 0.05);
}

.notif-dropdown__category {
  flex-shrink: 0;
  font-size: 14px;
}

.notif-dropdown__title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-dropdown__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bronze);
  flex-shrink: 0;
}

.notif-dropdown__footer {
  padding: 10px 12px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-dropdown__view-all {
  font-size: 13px;
  color: var(--bronze);
  text-decoration: none;
}

.notif-dropdown__view-all:hover {
  text-decoration: underline;
}

/* -------------------------
   Notification Modal
-------------------------- */
.wl-modal--wide {
  width: min(900px, 95vw);
}

.wl-modal__body--no-pad {
  padding: 0;
}

.notif-modal__split {
  display: flex;
  min-height: 400px;
  max-height: 70vh;
}

.notif-modal__list {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.15);
}

.notif-modal__list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  font-size: 14px;
}

.notif-modal__list-items {
  flex: 1;
  overflow-y: auto;
}

.notif-modal__list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.1s ease;
}

.notif-modal__list-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-modal__list-item--selected {
  background: rgba(212, 160, 73, 0.12);
}

.notif-modal__list-item--unread {
  background: rgba(212, 160, 73, 0.06);
}

.notif-modal__checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.notif-modal__list-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.notif-modal__list-category {
  flex-shrink: 0;
  font-size: 13px;
}

.notif-modal__list-title {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-modal__list-title--unread {
  font-weight: 700;
}

.notif-modal__list-date {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
}

.notif-modal__list-actions {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.1);
}

.notif-modal__list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--muted);
  flex: 1;
}

.notif-modal__empty-icon {
  font-size: 40px;
  opacity: 0.5;
}

/* Right Content Pane */
.notif-modal__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px;
}

.notif-modal__content-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  color: var(--muted);
}

/* Message Container - wraps the actual message content */
.notif-modal__message-container {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.notif-modal__content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.notif-modal__content-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.notif-modal__content-category--news {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.notif-modal__content-category--feature {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.notif-modal__content-category--maintenance {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
}

.notif-modal__content-category--tips {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.notif-modal__content-date {
  font-size: 12px;
  color: var(--muted);
}

.notif-modal__content-title {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-modal__content-body {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(240, 243, 255, 0.85);
}

.notif-modal__content-body p {
  margin: 0 0 12px 0;
}

.notif-modal__content-body p:last-child {
  margin-bottom: 0;
}

.notif-modal__content-image {
  margin-top: 16px;
}

.notif-modal__content-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Small buttons */
.btn-sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 700px) {
  .notif-menu__dropdown {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    width: auto;
    min-width: unset;
    max-width: none;
  }

  .notif-modal__split {
    flex-direction: column;
    max-height: none;
  }

  .notif-modal__list {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 200px;
  }

  .notif-modal__content {
    min-height: 250px;
  }

  .wl-modal--wide {
    width: 100%;
  }
}
