/* ========================================================
   CKM PDF X DOC Converter - Executive Modern Stylesheet
   ======================================================== */

:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #6366f1;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: rgba(99, 102, 241, 0.35);

  --accent-pdf: #ef4444;
  --accent-doc: #3b82f6;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Background Animated Gradient Mesh */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #4f46e5 0%, #312e81 100%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #ef4444 0%, #7f1d1d 100%);
  bottom: -100px;
  right: -50px;
  animation-duration: 25s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #06b6d4 0%, #1e3a8a 100%);
  top: 40%;
  left: 35%;
  animation-duration: 30s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* App Layout */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* Header */
.app-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(10, 13, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.accent-x {
  color: #a855f7;
  font-weight: 900;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

/* PWA Install Button */
.btn-pwa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pwa:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

/* User Profile Pill */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 12px 6px 8px;
  border-radius: 9999px;
}

.user-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.user-badge.admin {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: var(--accent-pdf);
  background: rgba(239, 68, 68, 0.1);
}

/* Main Content Area */
.app-main {
  flex: 1;
  padding: 32px 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Section */
.hero-text {
  text-align: center;
  margin-bottom: 28px;
}

.hero-text h1 {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.hero-text p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Mode Tabs */
.conversion-tabs {
  display: flex;
  gap: 8px;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.conversion-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.pill-pdf {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.pill-doc {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.tab-btn.active .tab-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Options Bar */
.options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

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

.radio-options {
  display: flex;
  gap: 12px;
}

.radio-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-main);
  gap: 6px;
}

.radio-chip input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Dropzone Card */
.converter-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

.dropzone-area {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(99, 102, 241, 0.02);
  position: relative;
}

.dropzone-area:hover,
.dropzone-area.dragover {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.08);
  box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.15);
}

.file-input-hidden {
  display: none;
}

.drop-icon-pulse {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px var(--primary-glow);
  animation: pulseIcon 3s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.dropzone-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.drop-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.drop-hint strong {
  color: #e2e8f0;
}

.btn-browse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-browse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* Staged Files Queue */
.queue-container {
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.queue-header h4 {
  font-size: 1rem;
  font-weight: 700;
}

.btn-text-danger {
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-text-danger:hover {
  text-decoration: underline;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.file-badge-type {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.file-badge-type.pdf {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.file-badge-type.doc,
.file-badge-type.docx {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.file-details {
  min-width: 0;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

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

.file-target-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-left: 8px;
}

.btn-remove-file {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-remove-file:hover {
  color: var(--accent-pdf);
  background: rgba(239, 68, 68, 0.15);
}

.queue-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-convert-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.btn-convert-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Progress Box */
.progress-box {
  text-align: center;
  padding: 40px 20px;
}

.spinner-orbit {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  margin: 0 auto 20px;
  animation: spin 0.8s infinite linear;
}

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

.progress-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.progress-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.progress-track {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  margin: 0 auto;
  overflow: hidden;
}

.progress-fill {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  border-radius: 9999px;
  animation: indeterminate 1.8s infinite ease-in-out;
}

@keyframes indeterminate {
  0% { transform: translateX(-100%); width: 30%; }
  50% { width: 60%; }
  100% { transform: translateX(400%); width: 30%; }
}

/* Results Box */
.results-box {
  padding: 10px 0;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
  font-weight: 700;
  font-size: 1.15rem;
}

.converted-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.converted-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  gap: 12px;
}

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

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

.converted-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.btn-download-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-download-file:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-download-file.loading {
  opacity: 0.85;
  cursor: wait;
}

.btn-download-file.downloaded {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

.spinner-inline {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s infinite linear;
  vertical-align: middle;
}

.results-footer {
  display: flex;
  justify-content: center;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  background: rgba(17, 24, 39, 0.8);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.feature-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

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

/* ================= AUTH CARD ================= */
.auth-card {
  max-width: 440px;
  margin: 40px auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow-md);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px var(--primary-glow);
}

.auth-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

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

/* PWA Install Banner inside Login Card */
.login-pwa-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 22px;
  gap: 12px;
  transition: all 0.2s ease;
}

.login-pwa-banner:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.5);
}

.login-pwa-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pwa-app-icon img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: block;
}

.login-pwa-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.login-pwa-text strong {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 700;
}

.login-pwa-text span {
  font-size: 0.74rem;
  color: #c7d2fe;
}

.btn-install-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-install-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.input-wrapper input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: rgba(15, 23, 42, 0.95);
}

.btn-toggle-pass {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}

.btn-toggle-pass:hover {
  color: var(--text-main);
}

/* Checkbox */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checkbox-container input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Quick Credentials Helpers */
.quick-credentials {
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  text-align: center;
}

.quick-title {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.quick-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag-cred {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 9999px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-cred:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

.tag-role {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-role.admin { background: #d97706; color: #fff; }
.tag-role.user { background: #2563eb; color: #fff; }

/* Alert Error */
.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.ios-steps {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.ios-steps li strong {
  color: #fff;
}

.share-icon-sample {
  display: inline-block;
  font-size: 1.1rem;
  vertical-align: middle;
}

.ios-footer-note {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 20px;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 0.8rem;
}

.hidden {
  display: none !important;
}

/* Mobile Tweaks */
@media (max-width: 640px) {
  .app-header {
    padding: 0 16px;
    height: 64px;
  }

  .brand-sub {
    display: none;
  }

  .hero-text h1 {
    font-size: 1.65rem;
  }

  .app-main {
    padding: 20px 14px;
  }

  .dropzone-area {
    padding: 32px 14px;
  }

  .converter-card {
    padding: 16px;
  }

  .tab-btn {
    min-width: 120px;
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .user-name {
    display: none;
  }

  .btn-convert-now {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}
