/* ============================================
   Partilhar.Link — App Styles
   ============================================ */

:root {
  --green: #81b441;
  --green-dark: #6a9634;
  --green-light: #9ecf5a;
  --green-pale: #f0f8e8;
  --dark: #1a1f2e;
  --dark2: #252b3b;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --border: #e5e7eb;
  --white: #ffffff;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body.app-body {
  font-family: var(--font);
  background: #f8faf5;
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navbar ---- */
.app-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(26,31,46,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-icon { font-size: 1.4rem; }

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.brand-dot { color: var(--green-light); }

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
}

.lang-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition);
  cursor: pointer;
}

.lang-btn:hover, .lang-btn.active {
  color: var(--green-light);
}

.lang-sep { color: rgba(255,255,255,0.2); font-size: 0.7rem; }

/* ---- Hero ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 40%, #1e3a1a 100%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(129,180,65,0.18) 0%, transparent 70%);
}

/* Particles */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: var(--green-light);
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0); opacity: 0.3; }
  50% { opacity: 0.15; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.hero-container {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  width: 100%;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero-highlight {
  color: var(--green-light);
  position: relative;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

.badge-icon { font-size: 0.9rem; }

/* ---- Share Card ---- */
.share-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

/* ---- Tab Bar ---- */
.tab-bar {
  display: flex;
  background: var(--gray-light);
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 0.5rem;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 3px solid transparent;
  position: relative;
}

.tab-btn:hover { color: var(--dark); background: rgba(0,0,0,0.03); }

.tab-btn.active {
  color: var(--green-dark);
  background: var(--white);
  border-bottom-color: var(--green);
  font-weight: 600;
}

.tab-icon { font-size: 1rem; }

/* ---- Form ---- */
.form-section { padding: 1.75rem; }

.input-group-wrap { margin-bottom: 1.25rem; }

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
}

.field-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--dark);
  background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(129,180,65,0.15);
}

.field-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--dark);
  background: #fff;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.6;
}

.field-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(129,180,65,0.15);
}

.secret-textarea { font-family: 'Courier New', monospace; background: #fafff6; }

.field-hint {
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 0.4rem;
  line-height: 1.5;
}

.field-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

/* ---- Advanced options ---- */
.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--gray-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 0.75rem;
}

.advanced-toggle:hover {
  background: #ebf3e0;
  border-color: var(--green);
  color: var(--green-dark);
}

.toggle-arrow { font-size: 0.7rem; color: var(--gray); }

.advanced-panel {
  background: #fafafa;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.option-row:last-child { border-bottom: none; }

.option-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.option-icon { font-size: 1.2rem; flex-shrink: 0; }

.option-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
}

.option-desc {
  font-size: 0.76rem;
  color: var(--gray);
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
}

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

.toggle-switch input:checked + .toggle-slider {
  background: var(--green);
}

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

/* Small inputs */
.small-input {
  width: 80px;
  padding: 0.45rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.85rem;
  text-align: center;
  outline: none;
  transition: border-color var(--transition);
}

.small-input:focus { border-color: var(--green); }

.small-select {
  padding: 0.45rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.82rem;
  outline: none;
  background: white;
  cursor: pointer;
  transition: border-color var(--transition);
}

.small-select:focus { border-color: var(--green); }

/* Password field */
.password-field {
  padding: 0.5rem 1.1rem 0.75rem;
  border-top: 1px solid var(--border);
}

.show-pwd-btn {
  position: absolute;
  right: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  color: var(--gray);
  z-index: 1;
}

/* ---- Submit button ---- */
.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(129,180,65,0.4);
  letter-spacing: 0.01em;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(129,180,65,0.5);
  background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 100%);
}

.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.submit-icon { font-size: 1.1rem; }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---- Result section ---- */
.result-section { padding: 2rem; }

.result-header { text-align: center; margin-bottom: 1.75rem; }

.result-icon { font-size: 3rem; margin-bottom: 0.75rem; }

.result-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.result-subtitle { color: var(--gray); font-size: 0.92rem; }

.result-url-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: var(--gray-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.result-url-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  color: var(--dark);
  outline: none;
  padding: 0.4rem 0.5rem;
  min-width: 0;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-btn:hover { background: var(--green-dark); }
.copy-btn.copied { background: #16a34a; }

.result-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  background: var(--green-pale);
  border: 1px solid rgba(129,180,65,0.3);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--green-dark);
}

.detail-tag.warning {
  background: #fffbeb;
  border-color: rgba(245,158,11,0.3);
  color: #92400e;
}

.result-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
}

.qr-label {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-new-share {
  display: block;
  text-align: center;
  padding: 0.8rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--gray);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-new-share:hover {
  border-color: var(--green);
  color: var(--green-dark);
  background: var(--green-pale);
}

/* ---- Features Section ---- */
.features-section {
  padding: 6rem 0;
  background: var(--white);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  background: var(--gray-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(129,180,65,0.3);
  background: var(--green-pale);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.65;
}

/* ---- Footer ---- */
.app-footer {
  margin-top: auto;
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--green-light); }

.footer-copy { font-size: 0.82rem; }

/* ---- Gate pages (password, expired) ---- */
.gate-page .hero-section { display: none; }
.gate-page .features-section { display: none; }

.gate-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 64px - 80px);
  padding-top: calc(64px + 2rem);
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
}

.gate-card {
  background: white;
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.gate-icon {
  font-size: 4rem;
  margin-bottom: 1.25rem;
  display: block;
}

.gate-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.gate-subtitle {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.gate-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gate-form { text-align: left; }

.gate-back {
  display: block;
  margin-top: 1.5rem;
  color: var(--gray);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition);
}

.gate-back:hover { color: var(--green-dark); }

/* View card */
.view-card { max-width: 600px; text-align: left; }

.view-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.secret-badge { background: #fef3c7; color: #92400e; }
.text-badge { background: var(--green-pale); color: var(--green-dark); }

.view-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
  text-align: left;
}

.burn-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.content-box {
  position: relative;
  background: var(--gray-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.content-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.content-copy-btn {
  padding: 0.4rem 0.85rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all var(--transition);
}

.content-copy-btn:hover { border-color: var(--green); color: var(--green-dark); }

.content-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--dark);
  line-height: 1.7;
  max-height: 400px;
  overflow-y: auto;
}

.blurred {
  filter: blur(6px);
  user-select: none;
  transition: filter 0.3s;
}

.secret-content { background: #fafff6; border-color: rgba(129,180,65,0.3); }

.view-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--gray);
}

.meta-icon { font-size: 0.9rem; }

/* Expired card */
.expired-icon { filter: grayscale(0.3); }

.expired-reasons {
  text-align: left;
  background: var(--gray-light);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.reasons-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reasons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.reasons-list li {
  font-size: 0.85rem;
  color: var(--dark);
}

/* ---- Legal pages ---- */
.legal-page {
  padding: 100px 1.5rem 4rem;
  flex: 1;
  background: var(--gray-light);
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.legal-updated {
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

.legal-alert {
  background: var(--green-pale);
  border: 1px solid rgba(129,180,65,0.4);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--green-dark);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.legal-section {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.legal-section p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section a {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ---- Nav link btn ---- */
.nav-link-btn {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  letter-spacing: 0.05em;
  transition: all var(--transition);
  margin-right: 0.5rem;
}
.nav-link-btn:hover { color: var(--green-light); border-color: var(--green-light); }

/* ---- Encryption badge ---- */
.detail-tag.encrypted {
  background: #f0fdf4;
  border-color: rgba(22,163,74,0.3);
  color: #166534;
}

.badge-new {
  display: inline-block;
  background: var(--green);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.06em;
  margin-left: 0.3rem;
}

/* ---- Encryption notice ---- */
.encryption-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f0fdf4;
  border: 1px solid rgba(22,163,74,0.25);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #166534;
  line-height: 1.55;
}
.enc-icon { font-size: 1.4rem; flex-shrink: 0; }
.encryption-notice strong { display: block; margin-bottom: 0.2rem; }

/* ---- Revoke details ---- */
.revoke-details {
  margin-bottom: 1rem;
  border: 1.5px dashed #fca5a5;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.revoke-details summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #dc2626;
  background: #fff5f5;
  user-select: none;
  list-style: none;
}
.revoke-details summary::-webkit-details-marker { display: none; }
.revoke-details[open] summary { border-bottom: 1px dashed #fca5a5; }
.revoke-box { padding: 0.85rem 1rem; background: #fff5f5; }
.revoke-warning {
  font-size: 0.78rem;
  color: #dc2626;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* ---- File drop zone ---- */
.file-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: #fafafa;
}
.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--green);
  background: var(--green-pale);
}
.file-drop-inner { pointer-events: none; }
.file-drop-icon { font-size: 2.5rem; display: block; margin-bottom: 0.6rem; }
.file-drop-text { font-size: 0.95rem; font-weight: 600; color: var(--dark); margin-bottom: 0.3rem; }
.file-drop-hint { font-size: 0.78rem; color: var(--gray); }

.file-selected {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--green-pale);
  border: 1.5px solid rgba(129,180,65,0.4);
  border-radius: var(--radius-sm);
}
.file-sel-icon { font-size: 1.5rem; flex-shrink: 0; }
.file-sel-info { flex: 1; min-width: 0; }
.file-sel-name { display: block; font-weight: 600; font-size: 0.88rem; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-sel-size { display: block; font-size: 0.75rem; color: var(--gray); margin-top: 0.1rem; }
.file-sel-remove {
  background: none; border: none; font-size: 1rem; cursor: pointer;
  color: var(--gray); padding: 0.25rem; flex-shrink: 0;
  transition: color var(--transition);
}
.file-sel-remove:hover { color: var(--danger); }

/* ---- Custom slug ---- */
.custom-slug-field { padding: 0.5rem 1.1rem 0.75rem; border-top: 1px solid var(--border); }
.notify-field { padding: 0.5rem 1.1rem 0.75rem; border-top: 1px solid var(--border); }

.slug-preview-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: white;
  transition: border-color var(--transition);
}
.slug-preview-wrap:focus-within { border-color: var(--green); }
.slug-prefix {
  padding: 0.75rem 0.7rem;
  background: var(--gray-light);
  font-size: 0.78rem;
  color: var(--gray);
  white-space: nowrap;
  border-right: 1px solid var(--border);
  font-family: 'Courier New', monospace;
}
.slug-input {
  border: none !important;
  border-radius: 0 !important;
  padding-left: 0.7rem !important;
  box-shadow: none !important;
}
.slug-input:focus { box-shadow: none !important; }

/* ---- Toggle switch green variant ---- */
.toggle-slider.green {}
.toggle-switch input:checked + .toggle-slider.green { background: #16a34a; }

/* ---- File view card ---- */
.file-view-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--gray-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.file-view-icon { font-size: 2.5rem; flex-shrink: 0; }
.file-view-info { flex: 1; min-width: 0; }
.file-view-name { font-weight: 700; font-size: 1rem; color: var(--dark); word-break: break-all; }
.file-view-size { font-size: 0.82rem; color: var(--gray); margin-top: 0.2rem; }
.file-view-mime { font-size: 0.75rem; color: var(--gray); margin-top: 0.1rem; font-family: monospace; }
.file-unavailable { font-size: 0.82rem; color: var(--gray); font-style: italic; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition);
  box-shadow: 0 3px 10px rgba(129,180,65,0.35);
  flex-shrink: 0;
}
.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(129,180,65,0.45);
  color: white;
}

/* ---- Decryption status ---- */
.decrypt-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  justify-content: center;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 500;
}
.spinner-dark {
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: var(--green);
}

/* ---- QR download btn ---- */
.qr-download-btn {
  margin-top: 0.6rem;
  padding: 0.35rem 0.85rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--dark);
  transition: all var(--transition);
}
.qr-download-btn:hover { border-color: var(--green); color: var(--green-dark); }

/* ---- Copy btn small ---- */
.copy-btn-sm { padding: 0.5rem 0.7rem; font-size: 1rem; }

/* ---- Revoke info box ---- */
.revoke-info-box {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.5rem;
  text-align: left;
}
.revoke-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.revoke-info-row:last-child { border-bottom: none; }
.revoke-info-row span:first-child { color: var(--gray); }
.revoke-info-row span:last-child { font-weight: 600; color: var(--dark); }

/* ---- Danger button ---- */
.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  box-shadow: 0 4px 14px rgba(220,38,38,0.35) !important;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 6px 20px rgba(220,38,38,0.45) !important;
}

/* ---- API Docs ---- */
.api-docs-page .legal-section { display: none; } /* hide legal layout reuse */
.api-endpoint {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.api-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
}
.api-method-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.api-method-badge.post { background: #dcfce7; color: #166534; }
.api-path {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.75rem;
}
.api-desc { color: var(--gray); font-size: 0.9rem; margin-bottom: 1.25rem; }
.api-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray);
  margin: 1.25rem 0 0.5rem;
}
.code-block {
  background: #0f1117;
  color: #a3e635;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  padding: 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre;
}
.inline-code {
  background: var(--gray-light);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  color: var(--dark);
}

/* ---- file badge ---- */
.file-badge { background: #eff6ff; color: #1d4ed8; }

/* ---- Hidden utility ---- */
.hidden { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 4rem 1.5rem;
    text-align: center;
  }
  .hero-badges { justify-content: center; }
  .hero-subtitle { margin: 0 auto 2rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .share-card { border-radius: 12px; }
  .gate-card { padding: 2rem 1.5rem; }
  .result-url-box { flex-direction: column; }
  .copy-btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .result-details { flex-direction: column; }
}

/* ============================================================
   NEW FEATURES — v2 additions
   ============================================================ */

/* ---- Anti-phishing banner ---- */
.antiphish-banner {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: #f0f4ff;
  border-left: 3px solid #4f7bcc;
  margin-bottom: 1.25rem;
  font-size: .82rem;
  color: #3a4a6b;
}
.antiphish-banner.antiphish-warn {
  background: #fffbea;
  border-left-color: var(--warning);
  color: #7a5500;
}
.antiphish-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.antiphish-text { display: flex; flex-direction: column; gap: .15rem; }
.antiphish-text strong { font-weight: 600; }

/* ---- Confirmation gate ---- */
.confirm-gate-card { padding: 0; overflow: hidden; }
.confirm-gate-card .antiphish-banner { border-radius: 0; margin-bottom: 0; }
.confirm-body { padding: 2rem 2.5rem; }
.confirm-shield { font-size: 3rem; margin-bottom: 1rem; text-align: center; }
.confirm-title { font-size: 1.5rem; font-weight: 700; color: var(--dark); margin-bottom: .75rem; text-align: center; }
.confirm-desc { color: var(--gray); font-size: .95rem; line-height: 1.6; margin-bottom: 1.25rem; text-align: center; }
.confirm-meta-row { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.5rem; }
.confirm-form { display: flex; flex-direction: column; gap: 1rem; }
.confirm-checkbox-label {
  display: flex; align-items: flex-start; gap: .75rem;
  font-size: .9rem; color: var(--dark); cursor: pointer; line-height: 1.5;
}
.confirm-checkbox-label input { margin-top: .25rem; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--green); }
.btn-confirm {
  width: 100%; padding: .85rem 1.5rem;
  background: var(--green); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background var(--transition);
}
.btn-confirm:hover:not(:disabled) { background: var(--green-dark); }
.btn-confirm:disabled { opacity: .45; cursor: not-allowed; }
.btn-cancel-small { display: block; text-align: center; margin-top: .75rem; color: var(--gray); font-size: .87rem; }
.btn-cancel-small:hover { color: var(--dark); }

/* ---- Content type badges ---- */
.ctype-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .7rem; border-radius: 20px;
  font-size: .78rem; font-weight: 500;
}
.ctype-url  { background: #e0f0ff; color: #0066cc; }
.ctype-text { background: #e8f5e9; color: #2e7d32; }
.ctype-secret { background: #fce4ec; color: #c2185b; }
.ctype-file { background: #fff3e0; color: #e65100; }
.ctype-cred { background: #ede7f6; color: #512da8; }
.ctype-enc  { background: #e8eaf6; color: #283593; }

/* ---- Geo-blocked ---- */
.geo-icon { font-size: 3rem; }
.country-code-badge {
  display: inline-block; padding: .2rem .6rem;
  background: var(--gray-light); border-radius: 6px;
  font-weight: 600; font-size: .9rem; color: var(--dark);
}

/* ---- URL destination card (anti-phishing redirect) ---- */
.url-destination-card {
  background: #f8fffe;
  border: 1.5px solid #c3e6d8;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.url-dest-label { font-size: .78rem; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.url-dest-value {
  font-size: .95rem; color: var(--dark); word-break: break-all;
  background: var(--gray-light); padding: .6rem .9rem;
  border-radius: 6px; margin-bottom: 1rem; font-family: monospace;
}
.btn-visit-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem 1.5rem;
  background: var(--green); color: #fff;
  border-radius: var(--radius-sm); font-weight: 600;
  text-decoration: none; transition: background var(--transition);
}
.btn-visit-link:hover { background: var(--green-dark); color: #fff; }

/* ---- Type badges (view page) ---- */
.url-badge  { background: #e0f0ff; color: #0055aa; }
.cred-badge { background: #ede7f6; color: #512da8; }

/* ---- Credentials card ---- */
.credentials-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.cred-field-row {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cred-field-row:last-child { border-bottom: none; }
.cred-field-label { font-size: .8rem; font-weight: 600; color: var(--gray); min-width: 110px; flex-shrink: 0; }
.cred-field-value-wrap { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; }
.cred-field-value {
  flex: 1; font-size: .95rem; color: var(--dark);
  font-family: 'Courier New', monospace;
  word-break: break-all;
  transition: filter .2s;
}
.cred-blurred { filter: blur(5px); user-select: none; }
.cred-copy-btn {
  padding: .3rem .55rem; font-size: .85rem;
  background: var(--gray-light); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; flex-shrink: 0;
  transition: background var(--transition);
}
.cred-copy-btn:hover { background: var(--border); }

/* ---- Platform disclaimer ---- */
.platform-disclaimer {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .8rem; color: var(--gray);
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin: 1.25rem 0;
  line-height: 1.5;
}
.platform-disclaimer span { flex-shrink: 0; }
.platform-disclaimer a { color: var(--green); }

/* ---- Team context banner (shown when creating share from team dashboard) ---- */
.team-context-banner {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  background: #e3f2fd; color: #1565c0;
  border-radius: var(--radius-sm); padding: .6rem 1rem;
  font-size: .88rem; margin-bottom: .75rem;
}
.team-context-banner a { color: #1565c0; font-weight: 600; }

/* ---- Geo field in form ---- */
.geo-field {
  padding: .6rem 1rem .8rem;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
}

/* ---- Download-only badge ---- */
.dl-only-badge {
  display: inline-block;
  padding: .2rem .6rem;
  background: #fff3e0; color: #e65100;
  border-radius: 20px; font-size: .78rem; font-weight: 600;
}

@media (max-width: 600px) {
  .confirm-body { padding: 1.5rem 1.25rem; }
  .cred-field-row { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .cred-field-label { min-width: auto; }
  .url-dest-value { font-size: .82rem; }
}

/* ============================================================
   Auth pages — register / login
   ============================================================ */

.gate-page { background: linear-gradient(135deg, #f0f8e8 0%, #e8f5d6 100%); }

.gate-container {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 5rem 1.25rem 2rem;
}

.auth-card {
  width: 100%; max-width: 440px;
  border: 1.5px solid var(--border);
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.auth-title { font-size: 1.6rem; font-weight: 800; color: var(--dark); margin-bottom: .25rem; }
.auth-subtitle { color: var(--gray); font-size: .95rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.auth-field { display: flex; flex-direction: column; gap: .35rem; }

.field-label { font-size: .85rem; font-weight: 600; color: var(--dark); }

.field-input {
  width: 100%; padding: .7rem .9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font);
  background: #fff; color: var(--dark);
  transition: border-color var(--transition);
  outline: none;
}
.field-input:focus { border-color: var(--green); }
.field-input-error { border-color: var(--danger); }
.field-error { font-size: .82rem; color: var(--danger); }

.input-with-icon { position: relative; }
.input-with-icon .field-input { padding-right: 2.8rem; }
.input-icon ~ .field-input { padding-left: 2.6rem; }
.show-pwd-btn {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; padding: .2rem;
}

.btn-submit {
  padding: .8rem 1.5rem;
  background: var(--green); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: background var(--transition);
  text-align: center;
}
.btn-submit:hover { background: var(--green-dark); }

.auth-alt { text-align: center; font-size: .9rem; color: var(--gray); margin-top: 1.25rem; }
.auth-alt a { color: var(--green); font-weight: 600; text-decoration: none; }
.auth-legal { text-align: center; font-size: .8rem; color: var(--gray); margin-top: .5rem; }
.auth-legal a { color: var(--green); text-decoration: none; }

.gate-success {
  background: #f0fce8; border: 1.5px solid #81b441;
  color: #3a5f1a; border-radius: var(--radius-sm);
  padding: .75rem 1rem; font-size: .9rem;
}
.gate-error {
  background: #fff0f0; border: 1.5px solid var(--danger);
  color: #9b1c1c; border-radius: var(--radius-sm);
  padding: .75rem 1rem; font-size: .9rem;
}

/* Navbar primary button */
.nav-link-primary {
  background: var(--green); color: #fff !important;
  border-radius: var(--radius-sm); padding: .4rem .9rem;
  font-weight: 600;
}
.nav-link-primary:hover { background: var(--green-dark); }

/* Navbar logout/danger link */
.nav-link-danger {
  color: rgba(255,255,255,0.45) !important;
  border-color: transparent !important;
}
.nav-link-danger:hover {
  color: #ef4444 !important;
  border-color: rgba(239,68,68,0.4) !important;
}

/* ============================================================
   Dashboard — account & team pages
   ============================================================ */

.dashboard-page { padding: 5.5rem 0 3rem; min-height: 100vh; }

.dash-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.dash-title { font-size: 1.75rem; font-weight: 800; color: var(--dark); }

.dash-plan-badge {
  display: inline-block; padding: .25rem .7rem;
  border-radius: 20px; font-size: .78rem; font-weight: 700; margin-top: .35rem;
}
.plan-badge-free  { background: var(--gray-light); color: var(--gray); }
.plan-badge-pro   { background: #ede7f6; color: #512da8; }
.plan-badge-team  { background: #e3f2fd; color: #1565c0; }

.btn-new-share {
  padding: .65rem 1.25rem;
  background: var(--green); color: #fff;
  border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem;
  text-decoration: none; white-space: nowrap;
  transition: background var(--transition);
}
.btn-new-share:hover { background: var(--green-dark); color: #fff; }

/* Stats grid */
.dash-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-stat-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1rem; text-align: center;
}
.stat-icon { font-size: 1.75rem; margin-bottom: .5rem; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: .82rem; color: var(--gray); margin-top: .3rem; }

/* Upgrade banner */
.upgrade-banner {
  background: linear-gradient(135deg, #1a1f2e 0%, #252b3b 100%);
  border-radius: var(--radius); margin-bottom: 1.5rem; overflow: hidden;
}
.upgrade-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem; flex-wrap: wrap;
}
.upgrade-banner-inner strong { color: #fff; font-size: 1rem; margin-right: .5rem; }
.upgrade-banner-inner span { color: rgba(255,255,255,.7); font-size: .9rem; }
.btn-upgrade {
  padding: .55rem 1.25rem; background: var(--green); color: #fff;
  border-radius: var(--radius-sm); font-weight: 600; font-size: .88rem;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: background var(--transition);
}
.btn-upgrade:hover { background: var(--green-dark); color: #fff; }

/* Two column layout */
.dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* Section */
.dash-section {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.dash-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.dash-section-header h2 { font-size: 1rem; font-weight: 700; color: var(--dark); }
.dash-section-action { font-size: .85rem; color: var(--green); text-decoration: none; font-weight: 600; }

/* Shares list */
.shares-list { display: flex; flex-direction: column; gap: .5rem; }
.share-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: var(--radius-sm);
  background: var(--gray-light); transition: background var(--transition);
}
.share-row:hover { background: var(--border); }
.share-row-type { font-size: 1.1rem; flex-shrink: 0; }
.share-row-info { flex: 1; min-width: 0; }
.share-row-slug {
  font-size: .85rem; font-weight: 600; color: var(--green);
  text-decoration: none; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; display: block;
}
.share-row-slug:hover { text-decoration: underline; }
.share-row-meta { font-size: .78rem; color: var(--gray); margin-top: .1rem; }
.share-team-label { color: #1565c0; font-weight: 600; }
.share-row-badges { display: flex; gap: .25rem; flex-shrink: 0; }
.sbadge { font-size: .85rem; }
.share-row-revoke {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  font-size: .85rem; font-weight: 700; line-height: 1;
  color: var(--gray); text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.share-row-revoke:hover { background: #fff0f0; color: var(--danger); }

/* Teams list */
.teams-list { display: flex; flex-direction: column; gap: .5rem; }
.team-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: var(--radius-sm);
  background: var(--gray-light); text-decoration: none; color: var(--dark);
  transition: background var(--transition);
}
.team-row:hover { background: var(--border); }
.team-row-icon { font-size: 1.25rem; flex-shrink: 0; }
.team-row-info { flex: 1; }
.team-row-name { font-size: .9rem; font-weight: 600; color: var(--dark); }
.team-row-meta { font-size: .78rem; color: var(--gray); }

/* API key card */
.apikey-card {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 1rem; margin-top: 1rem;
}
.apikey-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .5rem; font-size: .9rem; font-weight: 600; color: var(--dark);
}
.apikey-manage { font-size: .82rem; color: var(--green); text-decoration: none; }
.apikey-value-wrap { display: flex; align-items: center; gap: .5rem; }
.apikey-value {
  flex: 1; font-size: .85rem; font-family: 'Courier New', monospace;
  color: var(--dark); word-break: break-all;
}
.apikey-reveal-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 6px; padding: .3rem .5rem; cursor: pointer; font-size: .9rem;
  transition: background var(--transition); flex-shrink: 0;
}
.apikey-reveal-btn:hover { background: var(--gray-light); }

/* Empty state */
.dash-empty { text-align: center; padding: 2rem 1rem; color: var(--gray); }
.dash-empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.dash-empty a { color: var(--green); text-decoration: none; font-weight: 600; }

/* Members list */
.members-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.member-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: var(--radius-sm); background: var(--gray-light);
}
.member-avatar {
  width: 36px; height: 36px; background: var(--green); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-email { font-size: .88rem; font-weight: 500; color: var(--dark); }
.member-role { font-size: .75rem; margin-top: .1rem; }
.role-admin { color: var(--green-dark); font-weight: 600; }
.role-member { color: var(--gray); }
.btn-remove-member {
  background: none; border: 1.5px solid var(--border);
  border-radius: 6px; padding: .25rem .55rem; cursor: pointer;
  color: var(--danger); font-size: .9rem; transition: background var(--transition);
}
.btn-remove-member:hover { background: #fff0f0; border-color: var(--danger); }

/* Invite form */
.invite-form-card {
  background: var(--gray-light); border-radius: var(--radius-sm);
  padding: 1rem; margin-top: 1rem;
}

/* Textarea field */
.field-textarea {
  width: 100%; padding: .7rem .9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font);
  background: #fff; color: var(--dark); resize: vertical;
  transition: border-color var(--transition); outline: none;
}
.field-textarea:focus { border-color: var(--green); }

/* Slug preview row */
.slug-preview-wrap { display: flex; align-items: center; gap: 0; }
.slug-prefix {
  padding: .7rem .75rem; background: var(--gray-light);
  border: 1.5px solid var(--border); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .82rem; color: var(--gray); white-space: nowrap; flex-shrink: 0;
}
.slug-input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }

/* ============================================================
   Settings page
   ============================================================ */

.settings-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.settings-card-title { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 1rem; }

.btn-danger-outline {
  padding: .6rem 1.25rem;
  background: #fff; color: var(--danger);
  border: 1.5px solid var(--danger); border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: background var(--transition);
}
.btn-danger-outline:hover { background: #fff0f0; }

/* ============================================================
   Pricing page
   ============================================================ */

.coming-soon-ribbon {
  display: inline-block;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; border-radius: 30px;
  padding: .55rem 1.25rem; font-size: .9rem; font-weight: 600;
  margin-top: .75rem;
}

.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-bottom: 4rem;
}

.pricing-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 2rem; position: relative;
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.pricing-card-featured { border-color: var(--green); }

.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff;
  padding: .2rem .8rem; border-radius: 20px; font-size: .75rem; font-weight: 700;
  white-space: nowrap;
}
.plan-badge-team { background: #1565c0; }

.pricing-header { text-align: center; margin-bottom: 1.5rem; }
.plan-icon { font-size: 2.25rem; margin-bottom: .5rem; }
.plan-name { font-size: 1.25rem; font-weight: 800; color: var(--dark); margin-bottom: .5rem; }
.plan-price { margin-bottom: .5rem; }
.price-amount { font-size: 2.5rem; font-weight: 800; color: var(--dark); }
.price-period { font-size: .95rem; color: var(--gray); }
.plan-desc { font-size: .88rem; color: var(--gray); }

.plan-features {
  list-style: none; flex: 1;
  display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.5rem;
}
.plan-features li { font-size: .88rem; color: var(--dark); }

.btn-plan {
  display: block; text-align: center; padding: .85rem;
  border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem;
  font-family: var(--font); cursor: pointer; border: 2px solid transparent;
  text-decoration: none; transition: background var(--transition), color var(--transition);
}
.btn-plan-primary { background: var(--green); color: #fff; }
.btn-plan-primary:hover { background: var(--green-dark); color: #fff; }
.btn-plan-outline { background: #fff; color: var(--dark); border-color: var(--border); }
.btn-plan-outline:hover { border-color: var(--green); color: var(--green); }

/* Compare table */
.compare-table-wrap { max-width: 760px; margin: 0 auto 3rem; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td {
  padding: .75rem 1rem; font-size: .9rem;
  border-bottom: 1px solid var(--border); text-align: center;
}
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table th { font-weight: 700; color: var(--dark); background: var(--gray-light); }
.th-featured, .td-featured { background: #f0fce8; color: var(--green-dark); font-weight: 600; }

/* ============================================================
   Responsive — new pages
   ============================================================ */

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin-left: auto; margin-right: auto; }
  .dash-two-col { grid-template-columns: 1fr; }
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .dash-stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-header { flex-direction: column; }
  .upgrade-banner-inner { flex-direction: column; text-align: center; }
  .auth-card { max-width: 100%; }
}

/* ============================================================
   Dark mode
   ============================================================ */

[data-theme="dark"] {
  --gray-light: #1e2d3d;
  --border: #2d3f52;
  --dark: #f1f5f9;
  --dark2: #e2e8f0;
  --gray: #8b9ab0;
  --green-pale: #0d2214;
  --shadow: 0 4px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.60);
}
[data-theme="dark"] body.app-body { background: #0f172a; color: var(--dark); }
[data-theme="dark"] .share-card,
[data-theme="dark"] .gate-card,
[data-theme="dark"] .auth-card { background: #1a2638; border-color: var(--border); }
[data-theme="dark"] .field-input,
[data-theme="dark"] .field-textarea { background: #1a2638; border-color: var(--border); color: var(--dark); }
[data-theme="dark"] .field-input::placeholder,
[data-theme="dark"] .field-textarea::placeholder { color: #4a5e73; }
[data-theme="dark"] .small-select { background: #1a2638; border-color: var(--border); color: var(--dark); }
[data-theme="dark"] .hero-section { background: #0a1020; }
[data-theme="dark"] .hero-bg { opacity: .2; }
[data-theme="dark"] .hero-title { color: #fff; }
[data-theme="dark"] .features-section { background: #111c2e; }
[data-theme="dark"] .feature-card { background: #1a2638; border-color: var(--border); }
[data-theme="dark"] .feature-card h3 { color: var(--dark); }
[data-theme="dark"] .app-footer { background: #0a1020; border-top-color: var(--border); }
[data-theme="dark"] .tab-bar { background: #111c2e; border-bottom-color: var(--border); }
[data-theme="dark"] .tab-btn { color: var(--gray); }
[data-theme="dark"] .tab-btn.active { background: #1a2638; color: var(--dark); }
[data-theme="dark"] .advanced-panel { background: #111c2e; }
[data-theme="dark"] .option-row { border-bottom-color: var(--border); }
[data-theme="dark"] .option-label { color: var(--dark); }
[data-theme="dark"] .option-desc { color: var(--gray); }
[data-theme="dark"] .slug-prefix { background: #111c2e; border-color: var(--border); color: var(--gray); }
[data-theme="dark"] .geo-field { background: #1e2d3d; }
[data-theme="dark"] .presets-strip { background: #111c2e; border-bottom-color: var(--border); }
[data-theme="dark"] .preset-chip { background: #1a2638; border-color: var(--border); color: var(--dark); }
[data-theme="dark"] .url-favicon-bar { background: #1e2d3d; }
[data-theme="dark"] .settings-card,
[data-theme="dark"] .dash-stat-card,
[data-theme="dark"] .dash-section { background: #1a2638; border-color: var(--border); }
[data-theme="dark"] .dash-section-header h2,
[data-theme="dark"] .dash-title { color: var(--dark); }
[data-theme="dark"] .apikey-card { border-color: var(--border); }
[data-theme="dark"] .apikey-value { color: var(--dark); }
[data-theme="dark"] .share-row,
[data-theme="dark"] .member-row { background: #1e2d3d; }
[data-theme="dark"] .share-row:hover { background: #263447; }
[data-theme="dark"] .team-row { background: #1e2d3d; color: var(--dark); }
[data-theme="dark"] .team-row:hover { background: #263447; }
[data-theme="dark"] .invite-form-card { background: #1e2d3d; }
[data-theme="dark"] .platform-disclaimer { background: #1e2d3d; }
[data-theme="dark"] .team-context-banner { background: #0d1f33; }
[data-theme="dark"] .preview-modal { background: #1a2638; }
[data-theme="dark"] .preview-type-row { background: #1e2d3d; }
[data-theme="dark"] .preview-modal-title,
[data-theme="dark"] .preview-type-name,
[data-theme="dark"] .preview-option-row { color: var(--dark); }
[data-theme="dark"] .btn-preview-cancel { background: #1a2638; border-color: var(--border); color: var(--dark); }
[data-theme="dark"] .btn-preview-cancel:hover { background: #1e2d3d; }
[data-theme="dark"] .pricing-card { background: #1a2638; border-color: var(--border); }
[data-theme="dark"] .compare-table th { background: #1e2d3d; color: var(--dark); }
[data-theme="dark"] .compare-table td { color: var(--dark); border-bottom-color: var(--border); }
[data-theme="dark"] .th-featured,
[data-theme="dark"] .td-featured { background: #0d2214; color: var(--green-light); }
[data-theme="dark"] .gate-success { background: #0d2214; border-color: var(--green-dark); color: #86efac; }
[data-theme="dark"] .gate-error { background: #2d0f0f; border-color: var(--danger); color: #fca5a5; }
[data-theme="dark"] .field-error { color: #fca5a5; }
[data-theme="dark"] code { background: #1e2d3d; color: #86efac; padding: .1rem .35rem; border-radius: 4px; }
[data-theme="dark"] .antiphish-banner { background: #1a2110; }
[data-theme="dark"] .revoke-info-box { background: #1e2d3d; border-color: var(--border); }
[data-theme="dark"] .share-row-revoke:hover { background: #2d1010; }

/* ---- Dark toggle button ---- */
.dark-toggle-btn {
  background: none; border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 8px; padding: .28rem .55rem; cursor: pointer;
  font-size: .95rem; line-height: 1; color: rgba(255,255,255,.85);
  transition: border-color var(--transition), background var(--transition);
}
.dark-toggle-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }

/* ---- URL favicon bar ---- */
.url-favicon-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem; margin-top: .4rem;
  background: var(--gray-light); border-radius: var(--radius-sm);
  font-size: .82rem; color: var(--gray);
}
.url-favicon-img { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; }
.url-favicon-domain { font-weight: 600; color: var(--dark); }
.url-favicon-safe { margin-left: auto; color: var(--green-dark); font-weight: 600; font-size: .78rem; }

/* ---- Presets strip ---- */
.presets-strip {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .55rem 1rem;
  background: var(--gray-light); border-bottom: 1px solid var(--border);
}
.presets-label { color: var(--gray); font-weight: 700; flex-shrink: 0; font-size: .82rem; }
.preset-chip {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .2rem .65rem;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 20px; font-size: .78rem; color: var(--dark);
  transition: border-color var(--transition);
}
.preset-chip > span:first-child { cursor: pointer; }
.preset-chip:hover { border-color: var(--green); }
.preset-del { color: var(--gray); cursor: pointer; font-size: .72rem; }
.preset-del:hover { color: var(--danger); }
.btn-save-preset {
  padding: .2rem .65rem; background: none;
  border: 1.5px dashed var(--border); border-radius: 20px;
  font-size: .78rem; color: var(--gray); cursor: pointer; font-family: var(--font);
  transition: border-color var(--transition), color var(--transition);
}
.btn-save-preset:hover { border-color: var(--green); color: var(--green); }

/* ---- Preview modal ---- */
.preview-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
}
.preview-modal-overlay.hidden { display: none; }
.preview-modal {
  background: #fff; border-radius: var(--radius); padding: 1.75rem;
  max-width: 460px; width: 100%; box-shadow: var(--shadow-lg);
}
.preview-modal-title { font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 1.25rem; }
.preview-type-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; background: var(--gray-light);
  border-radius: var(--radius-sm); margin-bottom: 1rem;
}
.preview-type-icon { font-size: 1.5rem; flex-shrink: 0; }
.preview-type-name { font-weight: 700; color: var(--dark); font-size: .95rem; }
.preview-content-snippet { font-size: .8rem; color: var(--gray); margin-top: .2rem; word-break: break-all; }
.preview-options-grid { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.5rem; min-height: 2rem; }
.preview-option-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: .88rem; color: var(--dark); padding: .1rem 0;
}
.preview-option-icon { width: 20px; text-align: center; flex-shrink: 0; }
.preview-option-value { color: var(--gray); margin-left: auto; font-size: .82rem; }
.preview-modal-actions { display: flex; gap: .75rem; }
.preview-modal-actions .btn-submit { flex: 1; }
.btn-preview-cancel {
  padding: .75rem 1.25rem; background: #fff; color: var(--dark);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: background var(--transition);
}
.btn-preview-cancel:hover { background: var(--gray-light); }

/* ── Vaults ──────────────────────────────────────────────────────────────── */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.vault-card {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: 1rem 1.1rem; background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: inherit; transition: border-color var(--transition), box-shadow var(--transition);
}
.vault-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(129,180,65,.15); }
.vault-card-team { border-color: #c4b5fd; }
.vault-card-team:hover { border-color: #7c3aed; box-shadow: 0 2px 12px rgba(124,58,237,.12); }
.vault-card-icon { font-size: 1.75rem; flex-shrink: 0; }
.vault-card-info { flex: 1; min-width: 0; }
.vault-card-name { font-weight: 700; color: var(--dark); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-card-meta { font-size: .8rem; color: var(--gray); margin-top: .2rem; }
.vault-card-desc { font-size: .8rem; color: var(--gray); margin-top: .35rem; }
.vault-team-badge { color: var(--primary); font-weight: 600; }
.dash-see-all { font-size: .85rem; color: var(--primary); font-weight: 600; text-decoration: none; }
.dash-see-all:hover { text-decoration: underline; }

/* ── Form loading overlay ── */
.form-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(16,20,30,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.25rem;
}
.form-overlay.active { display: flex; }

.form-overlay-spinner {
  width: 52px; height: 52px;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--green-light);
  border-radius: 50%;
  animation: overlaySpinAnim 0.75s linear infinite;
}
@keyframes overlaySpinAnim {
  to { transform: rotate(360deg); }
}

.form-overlay-lock {
  position: absolute;
  font-size: 1.4rem;
  line-height: 52px;
  width: 52px; text-align: center;
  animation: overlayLockPulse 1.5s ease-in-out infinite;
}
@keyframes overlayLockPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

.form-overlay-text {
  color: rgba(255,255,255,0.65);
  font-size: .85rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ============================================================
   2-Panel App Shell (1Password-style layout)
   ============================================================ */

/* Shell: fills viewport below the fixed navbar */
.app-shell {
  display: flex;
  position: fixed;
  inset: 64px 0 0 0;
  overflow: hidden;
}

/* ── Left Sidebar ── */
.app-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--dark);
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-top {
  padding: 1rem 1rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sidebar-user-email {
  font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,0.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .4rem;
}

.sidebar-vault-name {
  font-size: .95rem; font-weight: 700;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .2rem;
}

.sidebar-vault-meta {
  font-size: .78rem; color: rgba(255,255,255,0.4);
  margin-bottom: .35rem;
}

.sidebar-team-badge {
  display: inline-block;
  font-size: .72rem; font-weight: 600;
  background: rgba(129,180,65,0.18);
  color: var(--green-light);
  border-radius: 6px; padding: .2rem .55rem;
  margin-top: .2rem;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 1.5rem;
}

/* thin scrollbar */
.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem .3rem;
  font-size: .68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.28);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sidebar-section-add {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transition: color var(--transition);
  padding: 0 .15rem;
}
.sidebar-section-add:hover { color: var(--green-light); }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .75rem;
  margin: .1rem .5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
  text-decoration: none;
}
.sidebar-item:hover { background: rgba(255,255,255,0.06); }
.sidebar-item.active { background: rgba(129,180,65,0.18); }
.sidebar-item.active .sidebar-item-slug { color: #fff; }

.sidebar-item-icon {
  font-size: .95rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.sidebar-item-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.sidebar-item-slug {
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Courier New', monospace;
}

.sidebar-item-link .sidebar-item-slug { font-family: var(--font); }

.sidebar-item-time {
  font-size: .7rem;
  color: rgba(255,255,255,0.28);
  margin-top: .05rem;
}

.sidebar-item-tag {
  font-size: .62rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.sidebar-tag-revoked { background: rgba(239,68,68,0.2); color: #f87171; }
.sidebar-tag-expired { background: rgba(245,158,11,0.2); color: #fbbf24; }

.sidebar-empty {
  font-size: .78rem;
  color: rgba(255,255,255,0.22);
  padding: .4rem 1rem .6rem;
  font-style: italic;
}

.sidebar-see-all {
  display: block;
  font-size: .75rem;
  color: rgba(255,255,255,0.35);
  padding: .3rem 1.25rem;
  text-decoration: none;
  transition: color var(--transition);
}
.sidebar-see-all:hover { color: var(--green-light); }

/* ── Right Detail Panel ── */
.app-detail {
  flex: 1;
  overflow-y: auto;
  background: #f8faf5;
}

.app-detail::-webkit-scrollbar { width: 5px; }
.app-detail::-webkit-scrollbar-track { background: transparent; }
.app-detail::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

.detail-panel {
  display: none;
  padding: 2.5rem 2.5rem 3rem;
  max-width: 820px;
  animation: detailFadeIn .18s ease;
}
.detail-panel.visible { display: block; }

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

.detail-title {
  font-size: 1.5rem; font-weight: 800;
  color: var(--dark); letter-spacing: -.02em;
  margin-bottom: .25rem;
}

.detail-subtitle {
  font-size: .9rem; color: var(--gray);
  margin-bottom: 1.75rem;
}

/* ── Share detail header ── */
.share-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.share-detail-icon {
  font-size: 2.25rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: .15rem;
}

.share-detail-main { flex: 1; min-width: 0; }

.share-detail-type-badge {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .22rem .6rem; border-radius: 6px;
  margin-bottom: .4rem;
}

.type-url         { background: #e0f2fe; color: #0369a1; }
.type-text        { background: #fef9c3; color: #854d0e; }
.type-secret      { background: #fce7f3; color: #9d174d; }
.type-file        { background: #f0fdf4; color: #166534; }
.type-credentials { background: #ede9fe; color: #5b21b6; }

.share-detail-slug {
  font-size: 1.05rem; font-weight: 700;
  color: var(--dark);
  font-family: 'Courier New', monospace;
  word-break: break-all;
  margin-bottom: .35rem;
}

.share-detail-status {
  display: inline-flex; align-items: center;
  font-size: .75rem; font-weight: 700;
  padding: .22rem .65rem; border-radius: 20px;
}
.status-active  { background: #dcfce7; color: #166534; }
.status-revoked { background: #fee2e2; color: #991b1b; }
.status-expired { background: #fef9c3; color: #854d0e; }

/* ── Copy link row ── */
.share-link-row {
  display: flex; align-items: center; gap: .75rem;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: .7rem 1rem;
  margin-bottom: 1.25rem;
}

.share-link-text {
  flex: 1; font-family: 'Courier New', monospace;
  font-size: .8rem; color: var(--dark);
  word-break: break-all; background: none; border: none;
}

.btn-copy-link {
  background: var(--green); color: #fff;
  border: none; border-radius: 8px;
  padding: .4rem .85rem; font-size: .8rem; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--transition);
  font-family: var(--font);
}
.btn-copy-link:hover { background: var(--green-dark); }
.btn-copy-link.copied { background: #166534; }

/* ── Detail stats row ── */
.detail-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: .65rem;
  margin-bottom: 1.25rem;
}

.detail-stat {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem .75rem; text-align: center;
}

.detail-stat-value {
  font-size: 1.4rem; font-weight: 800;
  color: var(--dark); line-height: 1.1;
}

.detail-stat-label {
  font-size: .7rem; color: var(--gray); margin-top: .25rem;
}

/* ── Detail card ── */
.detail-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.detail-card-title {
  font-size: .7rem; font-weight: 700;
  color: var(--gray); letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: .8rem;
}

/* ── Security feature badges ── */
.detail-features-row { display: flex; flex-wrap: wrap; gap: .5rem; }

.detail-feature-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .79rem; font-weight: 500;
  padding: .32rem .75rem; border-radius: 8px;
}
.feature-on  { background: #dcfce7; color: #166534; }
.feature-off { background: var(--gray-light); color: #9ca3af; }

/* ── Assignment badges ── */
.detail-assignment-row { display: flex; flex-wrap: wrap; gap: .5rem; }

.detail-assignment-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600;
  background: var(--gray-light);
  color: var(--dark);
  border-radius: 8px; padding: .4rem .85rem;
  text-decoration: none; border: 1.5px solid var(--border);
  transition: border-color var(--transition);
}
.detail-assignment-badge:hover { border-color: var(--green); }

/* ── Quick actions ── */
.detail-quick-actions { display: flex; flex-wrap: wrap; gap: .65rem; }

.btn-detail-action {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.1rem; border-radius: 10px;
  font-size: .83rem; font-weight: 600;
  background: var(--gray-light); color: var(--dark);
  text-decoration: none; border: 1.5px solid var(--border);
  transition: border-color var(--transition), background var(--transition);
}
.btn-detail-action:hover { border-color: var(--green); background: var(--green-pale); }

/* ── Action buttons ── */
.detail-actions-row { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1rem; }

.btn-detail-view {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.15rem; border-radius: 10px;
  font-size: .85rem; font-weight: 600;
  background: var(--dark); color: #fff;
  text-decoration: none;
  transition: background var(--transition);
}
.btn-detail-view:hover { background: #2d3548; color: #fff; }

.btn-detail-revoke {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.15rem; border-radius: 10px;
  font-size: .85rem; font-weight: 600;
  background: #fee2e2; color: #991b1b;
  text-decoration: none; border: none; cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
}
.btn-detail-revoke:hover { background: #fecaca; }

.btn-detail-remove {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.15rem; border-radius: 10px;
  font-size: .85rem; font-weight: 600;
  background: #fff7ed; color: #92400e;
  border: 1.5px solid #fed7aa; cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
}
.btn-detail-remove:hover { background: #ffedd5; }

/* ── Dark mode overrides ── */
[data-theme="dark"] .app-sidebar { background: #0d1117; border-color: rgba(255,255,255,0.05); }
[data-theme="dark"] .sidebar-top { border-color: rgba(255,255,255,0.05); }
[data-theme="dark"] .app-detail { background: #111827; }
[data-theme="dark"] .detail-panel .detail-card,
[data-theme="dark"] .detail-panel .detail-stat,
[data-theme="dark"] .share-link-row { background: #1a2638; border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .detail-title { color: #f9fafb; }
[data-theme="dark"] .share-detail-slug { color: #e5e7eb; }
[data-theme="dark"] .share-link-text { color: #e5e7eb; }
[data-theme="dark"] .detail-stat-value { color: #f9fafb; }
[data-theme="dark"] .btn-detail-action { background: #1e2d3d; border-color: rgba(255,255,255,0.1); color: #e5e7eb; }
[data-theme="dark"] .detail-assignment-badge { background: #1e2d3d; border-color: rgba(255,255,255,0.1); color: #e5e7eb; }

/* ── Responsive (mobile) ── */
@media (max-width: 768px) {
  /* Shell fills viewport below navbar, above bottom bar */
  .app-shell {
    flex-direction: column;
    inset: 64px 0 56px 0;   /* leave 56px at bottom for the nav bar */
  }

  /* Sidebar becomes a slide-up drawer, hidden by default */
  .app-sidebar {
    position: fixed;
    inset: auto 0 56px 0;
    width: 100%;
    height: 70vh;
    max-height: calc(100dvh - 64px - 56px);
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 200;
    overflow-y: auto;
  }
  .app-sidebar.mob-open { transform: translateY(0); }

  /* Sidebar top handle */
  .sidebar-top { padding: .75rem 1rem; }

  /* Detail panel fills full shell height */
  .app-detail { flex: 1; min-height: 0; overflow-y: auto; }
  .detail-panel { padding: 1.25rem; }

  /* Bottom navigation bar */
  .mob-nav-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.07);
    z-index: 300;
    align-items: stretch;
  }
  .mob-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: .6rem;
    cursor: pointer;
    transition: color .15s;
    padding: 0;
    text-decoration: none;
  }
  .mob-nav-btn .mob-nav-icon { font-size: 1.2rem; }
  .mob-nav-btn.active,
  .mob-nav-btn:hover { color: var(--green); }
}

/* Hide bottom bar on desktop */
@media (min-width: 769px) {
  .mob-nav-bar { display: none; }
}
