/* ==========================================================================
   Passli — Human-Crafted Security Design System (No-Slop Architecture)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-emerald-light: #ecfdf5;
  --border-emerald: #a7f3d0;
  
  --text-main: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --brand-navy: #0f172a;
  --brand-navy-hover: #1e293b;
  --brand-emerald: #047857;
  --brand-blue: #1d4ed8;
  
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 0 0 1px var(--border-light), 0 2px 4px 0 rgba(15, 23, 42, 0.04);
  
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.15s ease-in-out;
}

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

html {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.font-mono-data {
  font-family: var(--font-mono);
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* Header & Nav */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
}

.header .container {
  max-width: 1280px;
  padding: 0 1.5rem;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.brand-logo:hover {
  opacity: 0.9;
  text-decoration: none;
}

.brand-mark-img {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.brand-logo:hover .brand-mark-img {
  transform: scale(1.04);
}

.brand-text {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-emerald);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-nav-links {
  gap: 0.35rem;
  background: transparent;
  border: none;
  padding: 0;
}

.public-nav-links {
  gap: 1.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease-in-out;
  white-space: nowrap !important;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--brand-navy);
  background-color: var(--bg-subtle);
}

.nav-link.active {
  color: var(--brand-navy);
  font-weight: 600;
  background-color: var(--bg-subtle);
}

.nav-link-admin {
  color: #4f46e5 !important;
  font-weight: 600 !important;
}

.nav-link-admin:hover {
  color: #3730a3 !important;
  background-color: #eef2ff !important;
}

.nav-link-admin.active {
  color: #3730a3 !important;
  background-color: #e0e7ff !important;
  font-weight: 700 !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem 0.25rem 0.25rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--brand-navy);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}

.user-nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--brand-navy);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-nav-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-divider {
  width: 1px;
  height: 1.25rem;
  background-color: #e2e8f0;
  margin: 0 0.1rem;
  flex-shrink: 0;
}

.nav-logout-form {
  display: inline;
  margin: 0;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--brand-navy-hover);
  color: #ffffff;
}

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

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

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

/* Split-Hero Section */
.hero-section {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.hero-title {
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-title-sub {
  color: var(--text-muted);
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.hero-cta {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-trust-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.trust-row-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-row-item span.material-symbols-outlined {
  color: var(--brand-emerald);
  font-size: 16px;
}

/* Hero Image Container */
.hero-visual-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  background-color: var(--bg-subtle);
}

.hero-visual-img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.hero-floating-chip {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-subtle {
  background-color: var(--bg-app);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Generator Main Card */
.generator-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
}

@media (max-width: 860px) {
  .generator-card {
    grid-template-columns: 1fr;
  }
}

.generator-left {
  padding: 2rem;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .generator-left {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
}

.generator-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.card-title-main {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.card-subtitle-main {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-emerald-light);
  border: 1px solid var(--border-emerald);
  color: var(--brand-emerald);
  font-size: 0.75rem;
  font-weight: 600;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-emerald);
}

.doc-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.doc-selection-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-navy);
}

.doc-count-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.doc-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.doc-item-row:hover, .doc-item-row.selected {
  background-color: #f8fafc;
  border-color: var(--border-medium);
}

.doc-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.doc-icon-badge {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.icon-red { background-color: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.icon-blue { background-color: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.icon-amber { background-color: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

.doc-item-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
}

.doc-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.doc-hash-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.expiry-control-group {
  margin-bottom: 1.25rem;
}

.expiry-buttons-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

.expiry-btn {
  padding: 0.45rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.expiry-btn.active {
  background-color: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #ffffff;
  font-weight: 600;
}

/* Generator Right Output Side */
.generator-right {
  padding: 2rem;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.qr-box-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-svg-wrapper {
  padding: 0.5rem;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
}

.key-display-card {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.key-code-box {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.5rem;
  background-color: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  text-align: center;
  color: var(--brand-navy);
  margin: 0.35rem 0 0.5rem;
  user-select: all;
}

.timer-card {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--brand-emerald);
  width: 85%;
  border-radius: var(--radius-full);
}

/* Authentic Real-World Scenario Showcase Cards */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
}

.scenario-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.scenario-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.scenario-img-wrapper {
  width: 100%;
  height: 190px;
  overflow: hidden;
  background-color: var(--bg-subtle);
  position: relative;
}

.scenario-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.scenario-card:hover .scenario-img-wrapper img {
  transform: scale(1.03);
}

.scenario-tag-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}

.scenario-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.scenario-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
}

.scenario-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.scenario-footer {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Feature Bento Grid */
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.5rem;
}

.feature-tile {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-tile:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.feature-tile-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  color: var(--brand-navy);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

/* Institutional Comparison Table */
.table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  min-width: 640px;
}

.comp-table th {
  padding: 0.85rem 1.25rem;
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-light);
}

.comp-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.comp-table tr:hover td {
  background-color: #fafbfc;
}

.highlight-col {
  background-color: rgba(236, 253, 245, 0.4);
  color: var(--brand-emerald);
  font-weight: 600;
  border-left: 1px solid var(--border-emerald);
  border-right: 1px solid var(--border-emerald);
}

/* Footer */
.footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 3rem 0 2rem;
  font-size: 0.85rem;
}

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

.footer-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

/* ==========================================================================
   Phase 2: Authentication & Personal Dashboard System
   ========================================================================== */

/* Auth Section & Cards */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  min-height: calc(100vh - 12rem);
  background-color: var(--bg-app);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
}

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

.auth-icon-box {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  color: var(--brand-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(11, 28, 48, 0.08);
}

.form-error {
  font-size: 0.75rem;
  color: #e11d48;
  font-weight: 500;
}

.form-hint {
  font-size: 0.725rem;
  color: var(--text-dim);
}

.alert-danger {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  background-color: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-link {
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-link:hover {
  color: var(--brand-navy-hover);
}

/* ==========================================================================
   Dashboard Styling
   ========================================================================== */
.dashboard-container {
  padding: 2.5rem 0 4rem;
  background-color: var(--bg-app);
  min-height: calc(100vh - 8rem);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.dashboard-user-greeting {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.dashboard-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin: 0;
}

.dashboard-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.dashboard-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Security Status Bar */
.vault-status-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.vault-status-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.stat-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.stat-icon-badge {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.stat-card-footer {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.storage-bar-track {
  width: 100%;
  height: 6px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.35rem;
}

.storage-bar-fill {
  height: 100%;
  background-color: var(--brand-navy);
  border-radius: var(--radius-full);
}

/* Bento Panels */
.dashboard-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 840px) {
  .dashboard-bento-grid {
    grid-template-columns: 1fr;
  }
}

.bento-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.bento-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.bento-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0;
}

.bento-panel-subtitle {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Empty States */
.empty-state-box {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background-color: var(--bg-app);
}

.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--bg-surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border-light);
}

.empty-state-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.35rem;
}

.empty-state-text {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 360px;
  margin: 0 auto;
}

/* Guide Card */
.dashboard-guide-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* Dashboard Recent Documents List */
.dash-doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.dash-doc-item:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.dash-doc-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.dash-doc-meta {
  flex-grow: 1;
  min-width: 0;
}

.dash-doc-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-doc-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.dash-doc-arrow {
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ==========================================================================
   Phase 3: Encrypted Document Vault Management
   ========================================================================== */

.vault-container {
  padding: 2.5rem 0 4rem;
  background-color: var(--bg-app);
  min-height: calc(100vh - 8rem);
}

.vault-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.vault-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin: 0;
}

.vault-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.vault-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Vault Toolbar: Categories & Search */
.vault-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-subtle);
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.cat-pill:hover {
  color: var(--brand-navy);
  background-color: #e2e8f0;
}

.cat-pill.active {
  background-color: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

.pill-count {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-left: 0.15rem;
}

.vault-search-form {
  flex-grow: 1;
  max-width: 320px;
}

@media (max-width: 768px) {
  .vault-search-form {
    max-width: 100%;
    width: 100%;
  }
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  padding-left: 2.25rem;
  padding-right: 2rem;
  font-size: 0.825rem;
}

.clear-search-btn {
  position: absolute;
  right: 0.65rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* Document Cards Grid */
.doc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.vault-doc-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.vault-doc-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.doc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.doc-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--brand-navy);
}

.doc-size-badge {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.doc-card-main {
  flex-grow: 1;
  margin-bottom: 1rem;
}

.doc-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.doc-card-title a:hover {
  text-decoration: underline;
}

.doc-card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.doc-desc-muted {
  color: var(--text-dim);
  font-style: italic;
}

.doc-card-checksum {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  background-color: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.675rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-card-footer {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

.empty-vault-card {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
}

/* File Dropzone */
.file-dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  background-color: var(--bg-subtle);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.file-dropzone:hover,
.file-dropzone.drag-over {
  border-color: var(--brand-navy);
  background-color: #f1f5f9;
}

.file-dropzone.has-file {
  border-color: var(--brand-emerald);
  background-color: rgba(236, 253, 245, 0.5);
}

.dropzone-icon {
  font-size: 36px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.dropzone-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.dropzone-hint {
  font-size: 0.725rem;
  color: var(--text-dim);
}

.form-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Document Detail & Preview Layout */
.doc-detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .doc-detail-grid {
    grid-template-columns: 1fr;
  }
}

.preview-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.preview-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.preview-content-box {
  padding: 1.25rem;
  background-color: var(--bg-app);
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-preview-frame {
  width: 100%;
  height: 580px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.image-preview-wrapper {
  max-width: 100%;
  max-height: 560px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #ffffff;
}

.image-preview-img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  display: block;
}

.metadata-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.meta-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.meta-doc-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.meta-doc-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.spec-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.spec-heading {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.checksum-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

.copy-hash-btn {
  background: none;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-emerald);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0;
}

.copy-hash-btn:hover {
  text-decoration: underline;
}

.hash-code-text {
  font-size: 0.75rem;
  color: var(--brand-navy);
  font-weight: 600;
  word-break: break-all;
  user-select: all;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border-light);
}

.spec-label {
  color: var(--text-muted);
}

.spec-val {
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile Navigation & Drawer Styling */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.mobile-nav-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
  z-index: 100;
  max-height: calc(100vh - 4.25rem);
  overflow-y: auto;
}

.mobile-nav-drawer.is-open {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: drawerSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  background-color: var(--bg-subtle);
  color: var(--brand-navy);
  text-decoration: none;
}

.mobile-nav-link .material-symbols-outlined {
  font-size: 20px;
  color: var(--text-muted);
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

/* Global Responsive Adjustments & Multi-Device Breakpoints */
@media (max-width: 1024px) {
  .nav-links,
  .nav-actions .nav-user-pill,
  .nav-actions .nav-divider,
  .nav-actions .btn,
  .nav-logout-form {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .generator-card {
    grid-template-columns: 1fr !important;
  }

  .generator-left {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem;
  }

  .generator-right {
    padding: 1.5rem;
  }

  .recipient-portal-grid {
    grid-template-columns: 1fr !important;
  }

  .share-create-grid,
  .share-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-bento-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Prevent iOS automatic zoom on form input focus */
  .form-input,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .hero-section {
    padding: 2.5rem 0 2rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 6vw, 2.5rem);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dashboard-actions {
    width: 100%;
    flex-direction: column;
  }

  .dashboard-actions .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
  }

  .table-card,
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .doc-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .preview-content-box iframe,
  .pdf-preview-frame {
    height: 420px !important;
  }

  .recipient-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .recipient-header-bar .countdown-badge,
  .recipient-header-bar form,
  .recipient-header-bar form button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .expiry-buttons-grid {
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
  }

  .generator-left,
  .generator-right {
    padding: 1.25rem 1rem;
  }

  .doc-item-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .doc-hash-tag {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .auth-section {
    padding: 2rem 0.5rem;
  }

  .auth-card {
    padding: 1.25rem 1rem !important;
    max-width: 100% !important;
    border-radius: var(--radius-md);
  }

  .key-input-display {
    font-size: 1.15rem !important;
    letter-spacing: 0.12em !important;
    height: 48px !important;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .category-pills,
  .category-pill-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.4rem;
    width: 100%;
  }

  .cat-pill,
  .category-pill {
    flex-shrink: 0;
  }

  .preview-content-box iframe,
  .pdf-preview-frame {
    height: 340px !important;
  }

  .doc-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .btn {
    padding: 0.5rem 0.85rem;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.65rem;
  }

  .brand-text {
    font-size: 1rem;
  }

  .btn-lg {
    padding: 0.6rem 0.85rem;
    font-size: 0.825rem;
  }

  .generator-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Recipient Portal & Share Pass Verification Responsive Architecture
   ========================================================================== */

.recipient-verify-layout {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem) 1rem;
}

.recipient-verify-card {
  max-width: 480px;
  width: 100%;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
  padding: clamp(1.25rem, 5vw, 2.25rem);
}

.key-input-display {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 6vw, 1.75rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.22em !important;
  text-align: center !important;
  text-transform: uppercase !important;
  padding: 0.75rem 1rem !important;
  height: 58px !important;
  border: 2px solid var(--border-medium) !important;
  border-radius: var(--radius-md) !important;
  background-color: var(--bg-surface) !important;
  color: var(--brand-navy) !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.key-input-display:focus {
  border-color: var(--brand-navy) !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12) !important;
  outline: none !important;
}

.recipient-header-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.recipient-portal-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.recipient-mobile-doc-nav {
  display: none;
}

.recipient-viewer-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.recipient-viewer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #f8fafc;
}

.recipient-viewer-canvas {
  min-height: 480px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.recipient-pdf-frame {
  width: 100%;
  height: 600px;
  min-height: 420px;
  border: none;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.recipient-img-container {
  padding: 1.5rem;
  text-align: center;
  max-height: 600px;
  overflow: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.recipient-img-preview {
  max-width: 100%;
  max-height: 550px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  object-fit: contain;
}

.recipient-metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  font-size: 0.8rem;
}

/* Tablet & Mobile Breakpoints for Recipient Portal */
@media (max-width: 900px) {
  .recipient-portal-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .recipient-desktop-sidebar {
    display: none !important;
  }

  .recipient-mobile-doc-nav {
    display: block !important;
    margin-bottom: 1.25rem;
  }

  .recipient-mobile-chips-wrapper {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .recipient-mobile-doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
    transition: var(--transition);
  }

  .recipient-mobile-doc-chip.active {
    background: var(--brand-navy);
    color: #ffffff;
    border-color: var(--brand-navy);
    box-shadow: var(--shadow-sm);
  }

  .recipient-mobile-doc-chip.active .material-symbols-outlined {
    color: #ffffff !important;
  }

  .recipient-header-bar {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .recipient-header-bar > div:last-child {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .recipient-viewer-header {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .recipient-viewer-header > div:last-child {
    width: 100%;
  }

  .recipient-viewer-header .btn {
    width: 100%;
    justify-content: center;
  }

  .recipient-viewer-canvas {
    min-height: 380px;
  }

  .recipient-pdf-frame {
    height: 65vh;
    min-height: 360px;
  }

  .recipient-img-container {
    padding: 0.75rem;
    max-height: 480px;
  }

  .recipient-img-preview {
    max-height: 420px;
  }

  .recipient-metadata-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .recipient-verify-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .key-input-display {
    font-size: 1.25rem !important;
    letter-spacing: 0.15em !important;
    height: 52px !important;
  }

  .recipient-header-bar h1 {
    font-size: 1.1rem !important;
  }

  .recipient-pdf-frame {
    height: 55vh;
    min-height: 320px;
  }
}





