/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Jua", sans-serif;

  /* Chrome and Opera */
  user-select: none;

  /* Safari */
  -webkit-user-select: none;

  /* Konqueror HTML */
  -khtml-user-select: none;

  /* Firefox */
  -moz-user-select: none;

  /* Internet Explorer/Edge */
  -ms-user-select: none;
}

:link {
  color: #6f6; 
}

:visited {
  color: #66f;
}

/* ===== THEME VARIABLES ===== */
:root {
  --brand: #ccffcc;
  --brand-dark: #99ee99;
  --brand-darker: #66cc66;
  --brand-rgb: 204, 255, 204;

  --bg: #f0fff0;
  --bg2: #e8ffe8;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-hover: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.80);
  --border: rgba(180, 240, 180, 0.45);
  --border-strong: rgba(120, 200, 120, 0.6);
  --shadow: rgba(100, 200, 100, 0.18);
  --shadow-deep: rgba(80, 160, 80, 0.22);

  --text: #1a3a1a;
  --text-muted: #4a7a4a;
  --text-light: #7aaa7a;

  --danger: #e05555;
  --danger-light: rgba(224, 85, 85, 0.12);
  --success: #2db52d;
  --success-light: rgba(45, 181, 45, 0.12);
  --warning: #e09a20;
  --info: #2080e0;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --blur: blur(18px);
  --blur-sm: blur(10px);

  --font-head: 'Jua', sans-serif;
  --font-body: 'Jua', sans-serif;

  --nav-height: 64px;
  --sidebar-width: 240px;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme variants */
[data-theme="notgreen1"] {
  --brand: #ffcccc;
  --brand-dark: #ffaaaa;
  --brand-darker: #ee8888;
  --brand-rgb: 255, 204, 204;
  --bg: #fff5f5;
  --bg2: #ffecec;
  --border: rgba(240, 180, 180, 0.45);
  --border-strong: rgba(210, 130, 130, 0.6);
  --shadow: rgba(220, 120, 120, 0.18);
  --shadow-deep: rgba(200, 80, 80, 0.22);
  --text: #3a1a1a;
  --text-muted: #7a4a4a;
  --text-light: #aa7a7a;
}

[data-theme="notgreen2"] {
  --brand: #ccccff;
  --brand-dark: #aaaaff;
  --brand-darker: #8888ee;
  --brand-rgb: 204, 204, 255;
  --bg: #f5f5ff;
  --bg2: #ececff;
  --border: rgba(180, 180, 240, 0.45);
  --border-strong: rgba(130, 130, 210, 0.6);
  --shadow: rgba(120, 120, 220, 0.18);
  --shadow-deep: rgba(80, 80, 200, 0.22);
  --text: #1a1a3a;
  --text-muted: #4a4a7a;
  --text-light: #7a7aaa;
}

[data-theme="notgreen3"] {
  --brand: #ffffcc;
  --brand-dark: #eeee99;
  --brand-darker: #cccc66;
  --brand-rgb: 255, 255, 204;
  --bg: #fffff0;
  --bg2: #ffffe8;
  --border: rgba(220, 220, 160, 0.45);
  --border-strong: rgba(190, 190, 100, 0.6);
  --shadow: rgba(200, 200, 100, 0.18);
  --shadow-deep: rgba(160, 160, 60, 0.22);
  --text: #2a2a0a;
  --text-muted: #6a6a3a;
  --text-light: #9a9a6a;
}

[data-theme="notgreen4"] {
  --brand: #ffccff;
  --brand-dark: #ffaaff;
  --brand-darker: #ee88ee;
  --brand-rgb: 255, 204, 255;
  --bg: #fff5ff;
  --bg2: #ffecff;
  --border: rgba(220, 160, 220, 0.45);
  --border-strong: rgba(190, 100, 190, 0.6);
  --shadow: rgba(200, 100, 200, 0.18);
  --shadow-deep: rgba(160, 60, 160, 0.22);
  --text: #2a0a2a;
  --text-muted: #6a3a6a;
  --text-light: #9a6a9a;
}

[data-theme="notgreen5"] {
  --brand: #ccffff;
  --brand-dark: #aaffff;
  --brand-darker: #88eeee;
  --brand-rgb: 204, 255, 255;
  --bg: #f0ffff;
  --bg2: #e8ffff;
  --border: rgba(160, 220, 220, 0.45);
  --border-strong: rgba(100, 190, 190, 0.6);
  --shadow: rgba(100, 200, 200, 0.18);
  --shadow-deep: rgba(60, 160, 160, 0.22);
  --text: #0a2a2a;
  --text-muted: #3a6a6a;
  --text-light: #6a9a9a;
}

[data-theme="rrlgreen"] {
  --brand: #ffffff;
  --brand-dark: #f0f0f0;
  --brand-darker: #e0e0e0;
  --brand-rgb: 255, 255, 255;
  --bg: #fafafa;
  --bg2: #f5f5f5;
  --surface: rgba(255, 255, 255, 0.7);
  --border: rgba(220, 220, 220, 0.5);
  --border-strong: rgba(180, 180, 180, 0.6);
  --shadow: rgba(150, 150, 150, 0.15);
  --shadow-deep: rgba(100, 100, 100, 0.2);
  --text: #1a1a1a;
  --text-muted: #666;
  --text-light: #999;
}

[data-theme="hellotheme"] {
  --brand: #fedc00;
  --brand-dark: #e8c800;
  --brand-darker: #ccb000;
  --brand-rgb: 254, 220, 0;
  --bg: #fffef0;
  --bg2: #fffce0;
  --border: rgba(240, 210, 0, 0.45);
  --border-strong: rgba(200, 170, 0, 0.6);
  --shadow: rgba(220, 190, 0, 0.2);
  --shadow-deep: rgba(180, 150, 0, 0.25);
  --text: #2a2000;
  --text-muted: #6a5a00;
  --text-light: #9a8a30;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

/* Animated bg blobs */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(var(--brand-rgb), 0.35), transparent),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(var(--brand-rgb), 0.25), transparent),
    radial-gradient(ellipse 40% 40% at 60% 30%, rgba(var(--brand-rgb), 0.15), transparent);
  animation: blobshift 14s ease-in-out infinite alternate;
}

@keyframes blobshift {
  0% {
    transform: scale(1) translateX(0);
  }

  50% {
    transform: scale(1.08) translateX(1%);
  }

  100% {
    transform: scale(1) translateX(-1%);
  }
}

/* ===== GLASSMORPHISM CARD ===== */
.glass {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 32px var(--shadow), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.glass:hover {
  box-shadow: 0 8px 40px var(--shadow-deep), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.glass-strong {
  background: var(--surface-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 8px 48px var(--shadow-deep), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 20px var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  user-select: none;
}

.nav-brand .brand-dot {
  width: 10px;
  height: 10px;
  background: var(--brand-darker);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--brand-darker);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.7;
    transform: scale(1.2)
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  background: var(--brand);
  border-color: var(--brand-darker);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: var(--brand);
  border-color: var(--brand-darker);
}

.nav-btn-icon {
  font-size: 1rem;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--brand-darker);
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--transition);
}

.nav-avatar:hover {
  transform: scale(1.1);
}

.avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--brand-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.nav-theme-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}

.nav-theme-btn:hover {
  background: var(--brand);
  transform: rotate(20deg);
}

/* ===== MAIN LAYOUT ===== */
#app-container {
  padding-top: calc(var(--nav-height) + 24px);
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 40px;
}

/* ===== PAGE SECTIONS ===== */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

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

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

/* ===== AUTH PAGES ===== */
.auth-wrap {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
}

.auth-card h2 {
  font-family: var(--font-head);
  font-size: 1.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.auth-switch {
  text-align: center;
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--brand-darker);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Pending approval */
.pending-card {
  text-align: center;
  padding: 60px 40px;
  max-width: 480px;
  margin: 60px auto;
}

.pending-card .pending-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.pending-card h2 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.pending-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  transition: all var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--brand-darker);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.3);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Tags input */
.tags-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 44px;
  cursor: text;
  transition: all var(--transition);
}

.tags-input-wrap:focus-within {
  border-color: var(--brand-darker);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.3);
}

.tag-chip {
  background: var(--brand);
  border: 1px solid var(--brand-darker);
  border-radius: 20px;
  padding: 2px 10px 2px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag-chip button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.tag-chip button:hover {
  color: var(--danger);
}

.tags-input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
  min-width: 80px;
}

.tags-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand-darker);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--shadow);
}

.btn-secondary {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg2);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}

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

.btn-success {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.btn-success:hover {
  background: var(--success);
  color: #fff;
}

.btn-warning {
  background: rgba(224, 154, 32, 0.12);
  border-color: var(--warning);
  color: var(--warning);
}

.btn-warning:hover {
  background: var(--warning);
  color: #fff;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-icon {
  padding: 7px;
  border-radius: 8px;
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--text);
}

.btn-icon:hover {
  background: var(--brand);
  border-color: var(--brand-darker);
}

.btn-full {
  width: 100%;
}

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-error {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}

.alert-success {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.alert-info {
  background: rgba(32, 128, 224, 0.1);
  border-color: var(--info);
  color: var(--info);
}

.alert-warning {
  background: rgba(224, 154, 32, 0.12);
  border-color: var(--warning);
  color: var(--warning);
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--text);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(var(--brand-rgb), 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 7px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.tab-btn.active {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 2px 8px var(--shadow);
}

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  font-size: 1rem;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--surface-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  border-color: var(--brand-darker);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.3);
}

.search-type-select {
  padding: 10px 14px;
  background: var(--surface-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
}

.search-type-select:focus {
  border-color: var(--brand-darker);
}

/* ===== DIRECTORY TABLE ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead tr {
  background: rgba(var(--brand-rgb), 0.25);
  border-bottom: 2px solid var(--border-strong);
}

th {
  padding: 12px 14px;
  text-align: left;
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:hover {
  background: rgba(var(--brand-rgb), 0.12);
}

tbody tr:last-child {
  border-bottom: none;
}

td {
  padding: 12px 14px;
  vertical-align: middle;
}

.td-slug {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}

.td-dest {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.td-dest a {
  color: var(--text-muted);
  text-decoration: none;
}

.td-dest a:hover {
  color: var(--text);
  text-decoration: underline;
}

.td-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.td-user-clickable {
  cursor: pointer;
}
.td-user-clickable:hover {
  text-decoration: underline;
  color: var(--brand-darker);
}

.td-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

.td-avatar-ph {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  border: 1.5px solid var(--brand-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-active {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success);
}

.badge-inactive {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.badge-pending {
  background: rgba(224, 154, 32, 0.12);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.badge-admin {
  background: rgba(32, 128, 224, 0.1);
  color: var(--info);
  border: 1px solid var(--info);
}

.badge-editor {
  background: rgba(32, 180, 100, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.badge-viewer {
  background: rgba(130, 100, 220, 0.1);
  color: #8264dc;
  border: 1px solid #8264dc;
}

/* Tags */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-pill {
  background: rgba(var(--brand-rgb), 0.4);
  border: 1px solid var(--brand-darker);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Access count */
.access-count {
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== DASHBOARD CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 20px 22px;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--text);
}

.stat-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 480px;
  padding: 36px 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 4px 8px;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.modal h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.modal .modal-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Large modal */
.modal-lg {
  max-width: 700px;
}

/* Theme picker modal */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.theme-swatch {
  border-radius: 12px;
  padding: 14px 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.theme-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.theme-swatch.active {
  border-color: #555;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.theme-swatch-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.12);
}

.theme-swatch-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
  text-align: center;
}

/* ===== PROFILE ===== */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-darker);
  box-shadow: 0 4px 16px var(--shadow);
}

.profile-avatar-ph {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid var(--brand-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--text);
  box-shadow: 0 4px 16px var(--shadow);
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--brand-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform var(--transition);
}

.profile-avatar-edit:hover {
  transform: scale(1.15);
}

.profile-info {
  flex: 1;
}

.profile-display-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.profile-username {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.profile-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--brand);
  border-color: var(--brand-darker);
}

/* Social links editor */
.social-links-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.social-link-row .form-control {
  flex: 1;
}

/* ===== ADMIN PANEL ===== */
.admin-tabs {
  margin-bottom: 20px;
}

.admin-user-row td {
  vertical-align: middle;
}

.action-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Admin manage modal sections */
.admin-modal-section {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.admin-modal-section:last-child {
  margin-bottom: 0;
}

.admin-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-modal-danger {
  border-color: var(--danger);
}

.admin-modal-danger .admin-section-title {
  color: var(--danger);
}

.admin-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-danger-row + .admin-danger-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-danger-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 320px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(24px)
  }

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

.toast-success {
  background: #fff;
  border-left: 4px solid var(--success);
  color: var(--success);
}

.toast-error {
  background: #fff;
  border-left: 4px solid var(--danger);
  color: var(--danger);
}

.toast-info {
  background: #fff;
  border-left: 4px solid var(--info);
  color: var(--info);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 0.9rem;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-darker);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

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

.loading-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 24px;
  transition: background 0.2s;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: white;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.toggle input:checked+.toggle-slider {
  background: var(--brand-darker);
}

.toggle input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== ACTIVE CHECKBOX ===== */
.active-check {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  display: block;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.active-check:checked {
  background: var(--brand-darker);
  border-color: var(--brand-darker);
}
.active-check:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.active-check:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ===== INLINE COPY BUTTON ===== */
.btn-copy-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s;
}
.btn-copy-inline:hover {
  background: var(--brand);
  color: var(--text);
  border-color: var(--brand-darker);
}

/* ===== COPY BUTTON ===== */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(var(--brand-rgb), 0.35);
  border: 1px solid var(--border);
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: var(--brand);
  border-color: var(--brand-darker);
}

.copy-btn.copied {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

/* ===== QR BUTTON ===== */
.qr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(var(--brand-rgb), 0.35);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.qr-btn:hover {
  background: var(--brand);
  border-color: var(--brand-darker);
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== MOBILE MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--surface-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  z-index: 99;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-drawer.open {
  display: flex;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #app-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  table {
    font-size: 0.8rem;
  }

  td,
  th {
    padding: 9px 8px;
  }

  .modal {
    padding: 24px 20px;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-social {
    justify-content: center;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-darker);
}

/* ===== CONFIRM STEP ===== */
.confirm-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.confirm-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.2s;
}

.confirm-step-dot.done {
  background: var(--danger);
}

.admin-delete-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.2s;
}

.admin-delete-step-dot.done {
  background: var(--danger);
}

/* Password strength */
.pwd-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: 6px;
  transition: all 0.3s;
}

.pwd-strength-0 {
  width: 20%;
  background: var(--danger);
}

.pwd-strength-1 {
  width: 40%;
  background: var(--warning);
}

.pwd-strength-2 {
  width: 60%;
  background: var(--warning);
}

.pwd-strength-3 {
  width: 80%;
  background: var(--success);
}

.pwd-strength-4 {
  width: 100%;
  background: var(--success);
}

/* ===== PROFILE VIEWERS ===== */
.profile-viewers {
  margin-top: 14px;
  text-align: left;
}

.profile-viewers-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-align: center;
}

.profile-viewers-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.viewer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1;
}

.viewer-pill:hover {
  background: var(--brand-light, rgba(0, 160, 80, 0.08));
  border-color: var(--brand);
  color: var(--text);
}

.viewer-pill-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.viewer-pill-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-text, #fff);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== PUBLIC HOMEPAGE ===== */

/* Homepage overrides: full-width, no padding constraints */
#page-home {
  margin: 0 -24px;
  padding: 0;
}

/* Hero section */
.home-hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.home-hero-content {
  max-width: 640px;
  width: 100%;
}

.home-hero-title {
  font-family: var(--font-head);
  font-size: 2.8rem;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 18px;
}

.home-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Typing animation search box */
.home-search-box {
  display: inline-flex;
  align-items: center;
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  font-family: monospace;
  font-size: 1.25rem;
  margin-bottom: 32px;
  min-width: 340px;
  justify-content: center;
  gap: 0;
}

.home-search-prefix {
  color: var(--text-muted);
  font-weight: 700;
}

.home-search-slug {
  color: var(--text);
  font-weight: 700;
}

.home-typing-cursor {
  color: var(--brand-darker);
  font-weight: 300;
  animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.home-cta-btn {
  font-size: 1.05rem;
  padding: 14px 36px;
  border-radius: var(--radius-lg);
}

/* Sections */
.home-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.home-section-title {
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: var(--text);
  text-align: center;
  margin-bottom: 48px;
}

/* Features grid */
.home-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.home-feature-card {
  padding: 32px 28px;
  text-align: left;
}

.home-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(var(--brand-rgb), 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--text);
}

.home-feature-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 10px;
}

.home-feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Stats section */
.home-stats-section {
  text-align: center;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.home-stat-card {
  padding: 36px 20px;
  text-align: center;
}

.home-stat-number {
  font-family: var(--font-head);
  font-size: 2.8rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1;
}

.home-stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Footer */
.home-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 40px;
}

.home-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.home-footer-left {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 700;
}

.home-footer-right {
  text-align: right;
}

.home-footer-links {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.home-footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.home-footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Public navbar buttons */
.nav-btn-outline {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* Homepage responsive */
@media (max-width: 768px) {
  #page-home {
    margin: 0 -16px;
  }

  .home-hero-title {
    font-size: 1.9rem;
  }

  .home-hero-subtitle {
    font-size: 0.95rem;
  }

  .home-search-box {
    min-width: unset;
    width: 100%;
    max-width: 340px;
    font-size: 1.05rem;
    padding: 14px 20px;
  }

  .home-features-grid {
    grid-template-columns: 1fr;
  }

  .home-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-stat-number {
    font-size: 2.2rem;
  }

  .home-section {
    padding: 48px 20px;
  }

  .home-section-title {
    font-size: 1.5rem;
    margin-bottom: 32px;
  }

  .home-footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .home-footer-right {
    text-align: center;
  }

  .home-footer-links {
    justify-content: center;
  }
}
/* ===== TOTP 2FA ===== */
.totp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.totp-status-on {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success);
}

.totp-qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 208px;
  height: 208px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.totp-qr-img {
  width: 200px;
  height: 200px;
  display: block;
}

.totp-spinner {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
}

.totp-manual-key {
  font-family: monospace;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  word-break: break-all;
  cursor: pointer;
  transition: background var(--transition);
  user-select: text;
  -webkit-user-select: text;
}

.totp-manual-key:hover {
  background: var(--brand);
}

.totp-code-input {
  font-size: 1.6rem;
  letter-spacing: 0.3em;
  text-align: center;
  font-family: monospace;
}

.totp-trust-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.totp-trust-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-darker);
  cursor: pointer;
  flex-shrink: 0;
}

/* Backup codes grid */
.backup-codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.backup-code-item {
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

.backup-code-item code {
  font-family: monospace;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--text);
  user-select: all;
  -webkit-user-select: all;
}

/* Subtle link-style button (no box, just text) */
.btn-link-subtle {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--brand-darker);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link-subtle:hover {
  opacity: 0.75;
}
