:root {
  --bg: #07090f;
  --surface: #0d1117;
  --surface2: #161b27;
  --surface3: #1c2333;
  --border: rgba(88, 166, 255, 0.1);
  --border2: rgba(88, 166, 255, 0.18);
  --accent: #58a6ff;
  --accent-rgb: 88, 166, 255;
  --accent2: #79c0ff;
  --green: #56d364;
  --green2: #3fb950;
  --red: #f85149;
  --orange: #d29922;
  --text: #e6edf3;
  --text2: #8b949e;
  --text3: #484f58;
  --card: #0d1117;
  --radius: 16px;
  --radius-lg: 24px;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(88, 166, 255, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 166, 255, 0.4);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 166, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 166, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(88, 166, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── LANDING PAGE ── */
#landingPage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.08), transparent), #07090f;
  z-index: 21000;
  overflow-y: auto;
  padding-bottom: 80px;
  display: block;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-hero {
  text-align: center;
  padding: 100px 20px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.landing-hero h1 {
  font-size: clamp(32px, 8vw, 64px);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -2px;
  background: linear-gradient(to right, #fff, #58a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero p {
  font-size: clamp(16px, 4vw, 20px);
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 24px;
}

.landing-footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text3);
  max-width: 1200px;
  margin: 0 auto;
}

[class*="landing-"]:not(#landingPage) {
  animation: indicatorIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.landing-hero {
  animation-delay: 0.1s;
}

.features-grid {
  animation-delay: 0.2s;
}

@media (max-width: 600px) {
  .landing-nav {
    padding: 20px;
  }

  .landing-hero {
    padding: 60px 20px 40px;
  }
}

/* ── LAYOUT ── */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.logo-name span {
  color: var(--accent);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0 10px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.nav-item.active {
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent);
}

.nav-item .icon {
  width: 18px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

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

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

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid rgba(248, 81, 73, 0.2);
  color: rgba(248, 81, 73, 0.7);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(248, 81, 73, 0.08);
  color: var(--red);
  border-color: rgba(248, 81, 73, 0.4);
}

/* ── MAIN CONTENT ── */
.main {
  padding: 32px 40px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

/* Maintain original narrow layout for most sections */
#accounts,
#addSection,
#settingsSection,
#cloudSection,
#tempmailSection,
.stats-bar,
.page-header {
  max-width: 800px;
}

/* Allow ONLY passwords section to be wider for the 6-column grid */
#passwordsSection {
  max-width: 100%;
}

.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-sub {
  font-size: 14px;
  color: var(--text2);
}

/* ── UNLOCK / MASTER PASS PAGE ── */
#unlockPage {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, var(--surface2) 0%, var(--bg) 100%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(10px);
  padding: 20px;
}

.unlock-card {
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: unlockIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes unlockIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.unlock-icon-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--surface2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border2);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.unlock-icon-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.unlock-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.unlock-desc {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── AUTH PAGE ── */
#authPage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 36px;
  animation: fadeDown 0.5s ease both;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-logo-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-logo-name span {
  color: var(--accent);
}

.auth-tagline {
  color: var(--text2);
  font-size: 14px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  animation: fadeUp 0.5s ease 0.1s both;
}

.auth-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--surface3);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.08);
}

input::placeholder {
  color: var(--text3);
}

.btn {
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb, 31, 111, 235), 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(31, 111, 235, 0.45);
}

.btn-primary:active {
  transform: none;
}

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

.btn-google {
  width: 100%;
  padding: 11px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-google:hover {
  background: var(--surface3);
  border-color: var(--border2);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text3);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── ADD PANEL ── */
.add-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
}

.panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
}

.field-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.field-row input {
  flex: 1;
}

/* ── GROUPED PASSWORDS ── */
.pass-account-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  min-width: 0;
  flex-wrap: wrap;
}

.pass-account-row:first-of-type {
  border-top: none;
  padding-top: 4px;
}

.pass-account-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.pass-account-user {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  word-break: break-all;
  cursor: pointer;
}

.pass-account-user:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pass-account-meta {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  position: relative;
}

.pass-account-meta[title]:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--text2);
}

.pass-account-notes {
  font-size: 11px;
  color: var(--accent);
  opacity: 0.6;
  margin-top: 3px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-account-meta[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 7px;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-account-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.btn-mini-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mini-icon:hover {
  background: var(--surface3);
  color: var(--text);
  border-color: var(--accent);
}

.btn-mini-icon.primary {
  background: var(--accent);
  color: white;
  border: none;
}

.btn-mini-icon.primary:hover {
  filter: brightness(1.2);
}

.btn-remove-folder {
  border-color: var(--orange) !important;
  border-width: 1.5px !important;
}

.btn-remove-folder:hover {
  border-color: var(--orange) !important;
  color: var(--orange) !important;
}

.password-display-inline {
  background: var(--surface3);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 9px;
  font-family: monospace;
  font-size: 15px;
  text-align: center;
  margin: 10px 0;
  display: none;
  word-break: break-all;
}

.btn-outline {
  padding: 11px 16px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--accent);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}

.btn-outline:hover {
  background: rgba(88, 166, 255, 0.07);
}

.btn-ghost {
  width: 100%;
  padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: var(--surface3);
  color: var(--text);
}

#reader {
  border-radius: 10px;
  overflow: hidden;
  margin-top: 12px;
  display: none;
  background: var(--surface2);
}

#reader.full-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999 !important;
  background: #000 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
  border-radius: 0 !important;
}

#reader.full-screen video {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: cover !important;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-frame {
  width: 260px;
  height: 260px;
  border: 2px solid rgba(88, 166, 255, 0.5);
  border-radius: 20px;
  position: relative;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.5);
}

.scanner-frame::before,
.scanner-frame::after,
.scanner-frame-corner-bl,
.scanner-frame-corner-br {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 4px solid var(--accent);
}

.scanner-frame::before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 12px;
}

.scanner-frame::after {
  top: -2px;
  right: -2px;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 12px;
}

.scanner-frame-corner-bl {
  bottom: -2px;
  left: -2px;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 12px;
}

.scanner-frame-corner-br {
  bottom: -2px;
  right: -2px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 12px;
}

.scanner-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 30px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2005;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

.scanner-title {
  font-weight: 700;
  font-size: 18px;
}

.btn-close-scanner {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-close-scanner:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile scanner improvements */
@media (max-width: 768px) {
  .scanner-header {
    padding: 20px 16px;
  }

  .scanner-title {
    font-size: 16px;
  }

  .scanner-frame {
    width: 220px;
    height: 220px;
    border: 2px solid rgba(88, 166, 255, 0.5);
  }

  .btn-close-scanner {
    padding: 6px 12px;
    font-size: 14px;
  }

  #reader {
    display: none !important;
  }

  #reader.full-screen {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .scanner-frame {
    width: 180px;
    height: 180px;
  }

  .scanner-frame::before,
  .scanner-frame::after,
  .scanner-frame-corner-bl,
  .scanner-frame-corner-br {
    width: 15px;
    height: 15px;
    border-width: 3px;
  }
}

/* ── ACCOUNTS ── */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  align-items: stretch;
}

#backupGrid {
  align-items: start;
}


#passwordsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 16px;
  align-items: start;
}

#passwordsGrid .account-card {
  padding: 18px !important;
}

@media (max-width: 1300px) {
  #passwordsGrid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pass-account-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .pass-account-info {
    width: 100%;
  }

  .pass-account-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  #passwordsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardIn 0.4s ease both;
}

.pass-accounts-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.account-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(88, 166, 255, 0.1);
  background: var(--surface2);
}

.account-card.copied {
  border-color: var(--green) !important;
  background: rgba(86, 211, 100, 0.08) !important;
  box-shadow: 0 0 24px rgba(86, 211, 100, 0.25) !important;
  transform: scale(0.98);
}

.account-card.warning {
  border-color: rgba(210, 153, 34, 0.45);
  background: rgba(210, 153, 34, 0.02);
}

.account-card.warning.copied {
  border-color: var(--green) !important;
  background: rgba(86, 211, 100, 0.08) !important;
}

.card-top {
  position: relative;
  margin-bottom: 16px;
}

.drag-handle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--text3);
  opacity: 0.5;
  transition: all 0.2s;
  border-radius: 6px;
  margin-top: 2px;
}

.drag-handle:hover {
  opacity: 1;
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
}

.drag-handle:active {
  cursor: grabbing;
  opacity: 1;
}

/* Masquer la poignée sur desktop, visible uniquement sur mobile */
@media (min-width: 769px) {
  .drag-handle {
    display: none;
  }

  .account-card {
    cursor: grab;
  }

  .account-card:active {
    cursor: grabbing;
  }
}

/* Sur mobile, la poignée est visible et la carte n'est plus draggable */
@media (max-width: 768px) {
  .drag-handle {
    display: flex;
    opacity: 0.7;
  }

  .account-card {
    cursor: default;
  }
}

.account-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.account-issuer {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.btn-delete {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(248, 81, 73, 0.2);
  color: rgba(248, 81, 73, 0.6);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-delete:hover {
  background: rgba(248, 81, 73, 0.1);
  color: var(--red);
  border-color: rgba(248, 81, 73, 0.4);
}

.btn-edit {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(88, 166, 255, 0.2);
  color: rgba(88, 166, 255, 0.6);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-edit:hover {
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent);
  border-color: rgba(88, 166, 255, 0.4);
}

.account-info-container {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  padding-right: 110px;
}

.card-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  flex-shrink: 0;
}

.edit-mode-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
  flex: 1;
}

.edit-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.edit-input:focus {
  border-color: var(--accent);
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-save {
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-cancel {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.totp-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--text);
}

.totp-code .sep {
  color: var(--text3);
  margin: 0 3px;
  letter-spacing: 0;
}

.copy-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 5px;
}

.progress-ring {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--surface3);
  stroke-width: 3;
}

.ring-fill {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  transition: stroke-dashoffset 1s linear, stroke 0.5s;
}

.ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text2);
}

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed rgba(88, 166, 255, 0.12);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.7;
}

/* ── LOADING ── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(88, 166, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

/* ── TOAST ── */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
}

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

#toast.error {
  border-color: rgba(248, 81, 73, 0.4);
  color: var(--red);
}

#toast.success {
  border-color: rgba(86, 211, 100, 0.4);
  color: var(--green);
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
}

.stat-chip strong {
  font-size: 20px;
  font-weight: 800;
  display: block;
  color: var(--accent);
}

.stat-chip span {
  color: var(--text2);
  font-size: 11px;
}

/* ── ANIMATIONS ── */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes indicatorIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 768px) {
  #passwordsSection>div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 0 !important;
  }

  #passwordsSection aside {
    width: 100% !important;
    flex-shrink: 1 !important;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }

  #passwordsSection aside>div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }

  #folderList {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
    gap: 10px !important;
  }

  #passwordsSection>div>div:nth-child(2) {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .add-panel {
    margin-bottom: 20px !important;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 10px 16px;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 100;
    gap: 0;
  }

  .logo {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 0;
    flex: 1;
    justify-content: space-around;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    padding: 6px 4px;
    border-radius: 8px;
    align-items: center;
    text-align: center;
    width: 100%;
    order: 0;
  }

  #nav-add { order: 4; }
  #nav-tempmail { order: 3; }
  #nav-home { order: 1; }
  #nav-password { order: 2; }
  #nav-generator { order: 5; }
  #nav-backup { order: 6; }
  #nav-cloud { order: 7; }


  .nav-item .icon {
    width: auto;
    font-size: 18px;
  }

  .sidebar-footer {
    display: none;
  }

  .main {
    padding: 20px 16px 80px;
  }

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

  #passwordsGrid {
    grid-template-columns: 1fr !important;
    gap: 12px 8px !important;
  }

  .account-card,
  .pass-card {
    cursor: default;
    padding: 14px !important;
    min-height: auto;
  }

  .account-card:active,
  .pass-card:active {
    cursor: default;
  }

  .drag-handle {
    opacity: 1 !important;
  }

  .card-top {
    margin-bottom: 12px;
  }

  .account-name {
    font-size: 14px;
  }

  .account-issuer {
    font-size: 11px;
  }

  .account-info-container {
    padding-right: 130px !important;
  }

  .btn-edit,
  .btn-delete,
  .btn-mini-icon {
    padding: 6px 8px !important;
    font-size: 10px !important;
    border-radius: 4px;
  }

  .pass-card-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
  }

  .sortable-ghost {
    opacity: 0.4;
    background: var(--surface3) !important;
    border: 2px dashed var(--accent) !important;
  }

  .stats-bar,
  #viewToggles {
    display: none !important;
  }

  #tagFiltersContainer {
    margin-bottom: 16px !important;
  }

  .filter-tag-btn {
    padding: 6px 12px !important;
    font-size: 11px !important;
  }

  .totp-code {
    font-size: 26px;
    letter-spacing: 3px;
  }

  /* Password Search on Mobile */
  #passwordsSection .search-container {
    margin-bottom: 16px !important;
  }

  #passSearch {
    font-size: 14px !important;
    padding: 12px 14px !important;
  }
}

@media (max-width: 480px) {
  .field-row {
    flex-direction: column;
  }

  .btn-outline {
    width: 100%;
  }
}

#addSection {
  display: none;
}

/* ── MOBILE USER PANEL ── */
.mobile-user-btn {
  display: none;
  position: fixed;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.mobile-user-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-panel {
  display: none;
  position: fixed;
  top: 70px;
  right: 16px;
  width: calc(100% - 32px);
  max-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 1002;
  animation: panelIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-panel .user-info {
  margin-bottom: 20px;
  text-align: center;
}

.user-panel .user-avatar {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  font-size: 24px;
}

.user-panel .user-name {
  font-size: 16px;
  margin-bottom: 4px;
}

.user-panel .user-email {
  font-size: 13px;
}

.user-panel .btn-logout {
  padding: 12px;
  font-size: 14px;
}

@media (min-width: 769px) {
  .user-panel {
    top: auto;
    bottom: 98px;
    left: 20px;
    right: auto;
    width: 220px;
    padding: 16px;
    transform-origin: bottom center;
    animation: panelInDesktop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .user-panel .user-info {
    margin-bottom: 14px;
  }

  .user-panel .user-avatar {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    font-size: 20px;
  }

  .user-panel .user-name {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .user-panel .user-email {
    font-size: 11px;
  }

  .user-panel .btn-logout,
  .user-panel .btn-ghost {
    padding: 10px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .mobile-user-btn {
    display: flex;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── PASSWORD CARDS ── */
.pass-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.btn-mini-icon.danger:hover {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
  border-color: rgba(248, 81, 73, 0.4);
}

/* ── TEMP MAIL STYLES ── */
.temp-mail-grid-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.management-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.security-alert-box {
  background: rgba(210, 153, 34, 0.08);
  border: 1px dashed rgba(210, 153, 34, 0.3);
  color: #d29922;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.security-alert-box svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.security-alert-box strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.security-alert-box p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.4;
  opacity: 0.9;
}

.address-management {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.management-field label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text3);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.select-wrapper select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
}

.address-display-box {
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 14px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#tempEmailAddress {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  word-break: break-all;
  text-align: center;
  padding: 8px;
  background: rgba(88, 166, 255, 0.05);
  border-radius: 8px;
}

.address-control-btns {
  display: flex;
  gap: 8px;
}

.address-control-btns button {
  flex: 1;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
}

.address-control-btns button:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

.expiry-timer-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text3);
  padding: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 100px;
}

#tempExpiryTimer {
  font-weight: 800;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

/* Inbox area */
.inbox-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  min-height: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.inbox-header-bar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inbox-header-bar h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.btn-refresh-inbox {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-refresh-inbox:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.inbox-scroll-list {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  max-height: 600px;
  display: block;
}

.inbox-scroll-list.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-inbox-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  width: 100%;
}

.empty-icon-mail {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.empty-inbox-state p {
  font-size: 16px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 8px;
}

.empty-inbox-state span {
  font-size: 12px;
  color: var(--text3);
  max-width: 240px;
}

.inbox-item {
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 16px 20px;
  border-radius: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.inbox-item:hover {
  border-color: var(--accent);
  background: var(--surface3);
  transform: translateX(4px);
}

.inbox-item .item-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}

.inbox-item .item-subject {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.inbox-item .item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
}

/* ── FOLDER SYSTEM (PASSWORD ORGANIZATION) ── */
.folder-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
  min-width: 100px;
}

.folder-card:hover {
  border-color: var(--accent);
  background: var(--surface3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.folder-card.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.folder-card.active .folder-icon {
  color: #000;
}

.folder-card.active .folder-name {
  font-weight: 700;
  color: #000;
}

.folder-card.drag-over {
  border: 2px dashed var(--accent);
  background: rgba(88, 166, 255, 0.1);
}

.folder-card-top {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 8px;
}

.folder-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.2s;
}

.folder-card:hover .folder-icon {
  transform: scale(1.1);
}

.btn-delete-folder {
  position: absolute;
  right: -4px;
  top: -4px;
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
  color: var(--red);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
}

.folder-card:hover .btn-delete-folder {
  opacity: 1;
}

.btn-delete-folder:hover {
  background: rgba(248, 81, 73, 0.2);
  border-color: rgba(248, 81, 73, 0.6);
}

.folder-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.2s;
}

.stagger-in {
  animation: staggerIn 0.4s ease var(--stagger-delay, 0s) both;
}

@keyframes staggerIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
}

.modal-folders-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 16px 0;
  padding-right: 8px;
}

.modal-label {
  display: flex;
  align-items: center;
  padding: 10px;
  margin: 6px 0;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.2s;
  background: rgba(88, 166, 255, 0.05);
  border: 1px solid transparent;
}

.modal-label:hover {
  background: rgba(88, 166, 255, 0.1);
  color: var(--text);
  border-color: var(--border);
}

.modal-label input[type="checkbox"] {
  margin-right: 12px;
  cursor: pointer;
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  flex: 1;
}

.modal-btn-primary {
  background: var(--accent);
  color: var(--bg);
  transition: all 0.2s ease;
}

.modal-btn-primary:hover {
  background: rgba(88, 166, 255, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(88, 166, 255, 0.2);
  opacity: 0.95;
}

.modal-btn-secondary {
  background: var(--surface3);
  color: var(--text2);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.modal-btn-secondary:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border2);
  transform: translateY(-2px);
}




@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.modal-content button:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}

.modal-content button:active {
  transform: translateY(0);
}

.folder-checkbox {
  accent-color: var(--accent);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .folder-card {
    padding: 10px;
    min-width: 80px;
  }

  .folder-icon {
    font-size: 18px;
  }

  .folder-name {
    font-size: 11px;
  }
}




/* Error/Empty */
.inbox-item.error {
  border-color: rgba(248, 56, 56, 0.3);
  color: var(--red);
  text-align: center;
}

/* Overlay View */
.temp-message-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.message-content-card {
  width: 100%;
  max-width: 800px;
  height: 90%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
}

.message-header-view {
  padding: 30px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.msg-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.msg-header-top h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
}

.btn-close-message {
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-meta-view {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.msg-from span {
  color: var(--text3);
  margin-right: 5px;
}

.msg-from strong {
  color: var(--accent);
}

.msg-date {
  color: var(--text3);
  font-weight: 600;
}

.message-body-view {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: white;
  color: #333;
  line-height: 1.6;
}

.message-body-view blockquote {
  border-left: 4px solid var(--accent);
  margin-left: 0;
  padding-left: 15px;
  color: #666;
}

/* Responsive TempMail */
@media (max-width: 900px) {
  .temp-mail-grid-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .inbox-card {
    min-height: 480px;
  }
}

@media (max-width: 768px) {
  #tempmailSection .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
    margin-bottom: 20px !important;
  }

  .inbox-status {
    width: 100% !important;
    justify-content: center;
    order: 2;
  }

  #tempmailSection .page-header>div {
    order: 1;
  }

  .management-card {
    padding: 16px;
  }

  .security-alert-box {
    margin-bottom: 16px;
  }

  .address-display-box {
    padding: 10px;
  }

  #tempEmailAddress {
    font-size: 13px;
  }

  .inbox-card {
    border-radius: 16px;
  }

  .inbox-header-bar {
    padding: 14px 18px;
  }

  .inbox-scroll-list {
    padding: 10px;
  }

  .inbox-item {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .inbox-item .item-subject {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Overlay on Phone */
  .temp-message-overlay {
    padding: 0;
  }

  .message-content-card {
    height: 100vh;
    border-radius: 0;
    max-height: none;
    border: none;
  }

  .message-header-view {
    padding: 16px 18px;
  }

  .msg-header-top h2 {
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .message-body-view {
    padding: 16px;
    font-size: 14px;
  }
}

/* ── UPLOAD PROGRESS FLOATER ── */
.upload-indicator {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 280px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  z-index: 10005;
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: indicatorIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.upload-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text2);
}

.upload-filename {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.progress-track {
  height: 6px;
  background: var(--surface3);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

.upload-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text3);
}

/* ── MOVE SELECTION BAR ── */
#moveBar {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  display: none;
  align-items: center;
  gap: 20px;
  z-index: 10006;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.4);
  animation: indicatorIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── TAGS & FAVORITES ── */
.btn-favorite {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.2s;
  color: #666;
  filter: grayscale(100%);
}

.btn-favorite:hover {
  filter: grayscale(0%);
  transform: scale(1.15);
  color: #FFD700;
}

.btn-favorite.active {
  filter: grayscale(0%);
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-badge {
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid rgba(88, 166, 255, 0.3);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tag-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tag-chip:hover {
  background: var(--surface3);
  border-color: var(--accent);
  color: var(--accent);
}

.tag-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.filter-tag-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.filter-tag-btn:hover {
  background: var(--surface3);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-tag-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

.btn-pwned-check {
  border-color: rgba(255, 193, 7, 0.3) !important;
  color: #FFC107 !important;
}

.btn-pwned-check:hover {
  background: rgba(255, 193, 7, 0.1) !important;
  border-color: rgba(255, 193, 7, 0.5) !important;
}

/* ── GENERATOR ── */
.generator-panel {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.generator-result-container {
  position: relative;
  margin-bottom: 24px;
}

.generator-input {
  width: 100%;
  padding: 20px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  outline: none;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.generator-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.generator-actions button {
  flex: 1;
  padding: 12px;
}

.generator-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.check-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s;
}

.check-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.check-container span {
  font-size: 14px;
  font-weight: 600;
}

.check-container:hover {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.05);
}

@media (max-width: 600px) {
  .generator-input {
    font-size: 16px;
    padding: 15px;
  }
  
  .generator-options-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .generator-actions {
    flex-direction: column;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}


.modal-content {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  border: none;
  transition: all 0.2s;
}

.modal-btn-primary {
  background: var(--accent);
  color: white;
}

.modal-btn-secondary {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}

.modal-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}