/* Vault by VanIT - Premium Light Theme Design System */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-main);
  
  /* Modern HSL Color Palette (Premium Light Theme) */
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #0f766e;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Accents */
  --primary: #0f766e; /* Teal-700 (premium, match invite email template) */
  --primary-hover: #0d5e58;
  --primary-light: #ccfbf1;
  --primary-dark: #115e59;
  
  --accent-blue: #0284c7;
  --accent-blue-light: #e0f2fe;
  --accent-purple: #7c3aed;
  --accent-purple-light: #f3e8ff;
  
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Ambient Background Lights */
.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: var(--radius-full);
  filter: blur(150px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}
.ambient-glow.bg-1 {
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -200px;
  right: -100px;
}
.ambient-glow.bg-2 {
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  bottom: -200px;
  left: -100px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

/* Helper Classes */
.hidden {
  display: none !important;
}
.text-primary { color: var(--primary) !important; }
.text-teal { color: var(--primary) !important; }
.text-orange { color: var(--warning) !important; }
.bg-teal-light { background-color: var(--primary-light) !important; color: var(--primary-dark) !important; }
.bg-blue-light { background-color: var(--accent-blue-light) !important; color: var(--accent-blue) !important; }
.bg-purple-light { background-color: var(--accent-purple-light) !important; color: var(--accent-purple) !important; }
.full-width { width: 100% !important; }
.margin-top-md { margin-top: 1.5rem !important; }
.disabled {
  background-color: #f1f5f9 !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Inputs & Form Elements */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

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

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
  box-shadow: var(--shadow-sm);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

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

.input-wrapper .input-icon {
  position: absolute;
  left: 1rem;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  padding-left: 2.75rem;
}

.checkbox-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  user-select: none;
  margin-top: 0.25rem;
}

.checkbox-row input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-row label {
  text-transform: none;
  font-weight: 500;
  letter-spacing: normal;
  font-size: 0.875rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  color: var(--primary);
  border-color: var(--text-light);
}

.btn-primary svg, .btn-secondary svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Auth Pages Views (Login, Register, Accept Invite) */
.app-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 480px;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-card.width-wide {
  max-width: 640px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon.bg-teal {
  background-color: var(--primary-light);
  color: var(--primary);
}

.logo-icon.bg-red {
  background-color: var(--danger-light);
  color: var(--danger);
}

.logo-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.logo-area h1 {
  font-size: 1.625rem;
  letter-spacing: -0.02em;
}

.badge-by {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: #f1f5f9;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  margin-top: 0.25rem;
}

.auth-card h2 {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
  line-height: 1.45;
}

.auth-footer {
  margin-top: 2rem;
  text-align: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Type Toggle Selector (Dropoff Forms) */
.dropoff-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.type-btn {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-muted);
  outline: none;
}

.type-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.type-btn:hover {
  background-color: #f8fafc;
  color: var(--text-main);
}

.type-btn.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

/* File Upload Dropzone */
.file-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  background-color: #fafbfb;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.dropzone-icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.file-dropzone:hover .dropzone-icon, .file-dropzone.dragover .dropzone-icon {
  color: var(--primary);
  transform: translateY(-2px);
}

.file-dropzone .title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}

.file-dropzone .title span {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

.file-dropzone .limits {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* File Preview Area */
.file-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.file-preview svg {
  width: 1.5rem;
  height: 1.5rem;
}

.file-preview .file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-preview .file-details .file-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview .file-details .file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-preview .remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.file-preview .remove-btn:hover {
  background-color: var(--danger-light);
  color: var(--danger);
}

/* ================= VIEW: RETRIEVE / DECRYPT ================= */
.retrieve-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 0;
  color: var(--text-muted);
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

.dropoff-meta-card {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dropoff-meta-card .meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.dropoff-meta-card .meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.dropoff-meta-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dropoff-meta-card .val {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}

.one-time-warning {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background-color: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: #78350f;
}

.one-time-warning svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: var(--warning);
  margin-top: 0.125rem;
}

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

.code-editor {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #0f172a; /* Dark terminal for decryption payload text */
  box-shadow: var(--shadow-sm);
}

.code-editor pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: Menlo, Monaco, Consolas, "Fira Code", monospace;
  font-size: 0.875rem;
  color: #e2e8f0;
  min-height: 120px;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-editor .btn-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #f1f5f9;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: var(--transition);
}

.code-editor .btn-copy:hover {
  background: rgba(255, 255, 255, 0.2);
}

.code-editor .btn-copy svg {
  width: 0.875rem;
  height: 0.875rem;
}

.download-action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #ffffff;
}

.download-action-card .file-icon-box {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-action-card .file-icon-box svg {
  width: 1.75rem;
  height: 1.75rem;
}

.download-action-card .file-meta {
  flex: 1;
  min-width: 0;
}

.download-action-card .file-meta h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-action-card .file-meta p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ================= VIEW: DASHBOARD ================= */
#view-dashboard {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

.app-header {
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon.small {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
}

.logo-icon.small svg {
  width: 1rem;
  height: 1rem;
}

.header-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge-by-header {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: #f1f5f9;
  padding: 0.0625rem 0.375rem;
  border-radius: var(--radius-full);
}

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

.header-user span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
}

.btn-logout {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background-color: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-logout svg {
  width: 1rem;
  height: 1rem;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 2rem;
  align-items: start;
}

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

/* Left column forms styling */
.dashboard-forms {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.tab-headers {
  display: flex;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-main);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tab-btn svg {
  width: 1rem;
  height: 1rem;
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: #f1f5f9;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: #ffffff;
}

.form-panel {
  display: none;
  padding: 1.75rem;
}

.form-panel.active {
  display: block;
}

.form-panel h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.form-panel .panel-desc {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 1.5rem;
  line-height: 1.45;
}

/* Right column list styling */
.dashboard-activity {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.activity-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.activity-section .section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.icon-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.activity-section .section-header h4 {
  font-size: 1rem;
  font-weight: 600;
}

.activity-section .section-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-empty {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  background-color: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
}

/* Activity Items */
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
  background-color: #ffffff;
}

.activity-item:hover {
  border-color: var(--text-light);
  box-shadow: var(--shadow-sm);
}

.activity-item .item-details {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.activity-item .item-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background-color: #f1f5f9;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-item .item-icon.file {
  background-color: var(--primary-light);
  color: var(--primary);
}

.activity-item .item-icon svg {
  width: 1rem;
  height: 1rem;
}

.activity-item .item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.activity-item .item-info .item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item .item-info .item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item .item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Badge System */
.badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
}
.badge.active { background-color: var(--success-light); color: var(--success); }
.badge.downloaded { background-color: var(--bg-primary); color: var(--text-muted); }
.badge.expired { background-color: var(--danger-light); color: var(--danger); }
.badge.pending { background-color: var(--warning-light); color: #b45309; }
.badge.received { background-color: var(--primary-light); color: var(--primary-dark); }

.btn-icon {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background-color: #f8fafc;
  color: var(--primary);
  border-color: var(--text-light);
}

.btn-icon.delete:hover {
  background-color: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ================= MODALS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.modal-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.modal-header h3 {
  font-size: 1.125rem;
  flex: 1;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.btn-close-modal svg {
  width: 1.125rem;
  height: 1.125rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.share-link-wrapper {
  display: flex;
  gap: 0.5rem;
}

.share-link-wrapper input {
  flex: 1;
  background-color: #f8fafc;
  border-color: var(--border-color);
  font-family: monospace;
  font-size: 0.8125rem;
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
}

/* ================= CRYPTO LOADING OVERLAY ================= */
.crypto-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(248, 250, 252, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.crypto-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lock-animation {
  position: relative;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

.shield-icon {
  width: 2.25rem;
  height: 2.25rem;
  animation: pulseShield 1.5s ease-in-out infinite;
}

@keyframes pulseShield {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.crypto-card h3 {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

.crypto-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.crypto-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.crypto-progress-bar .fill {
  height: 100%;
  width: 10%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.cipher-stream {
  width: 100%;
  height: 3.5rem;
  font-family: monospace;
  font-size: 0.6875rem;
  color: var(--text-light);
  overflow: hidden;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  text-align: left;
  line-height: 1.4;
  word-break: break-all;
  user-select: none;
}

/* ================= TOAST NOTIFICATION SYSTEM ================= */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
  width: 100%;
}

.toast {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: var(--transition);
}

@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
.toast.info { border-left-color: var(--accent-blue); }

.toast-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.toast.error .toast-icon { color: var(--danger); }
.toast.success .toast-icon { color: var(--success); }
.toast.info .toast-icon { color: var(--accent-blue); }

.toast-content {
  flex: 1;
}

.toast-content h5 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.toast-content p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  color: var(--text-muted);
}

.toast-close svg {
  width: 1rem;
  height: 1rem;
}
