/* ============================================================
   PHIXBoson Design System — index.css
   Premium HIPAA-compliant medical claims platform
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&display=swap');

/* ── Custom Properties ── */
:root {
  --bg: #F0EDE6;
  --bg-card: #ffffff;
  --bg-input: #F7F6F3;
  --border: #DDD9CF;
  --border-focus: #4A5FE0;
  --text-dark: #1A1A1A;
  --text-mid: #5F5E5A;
  --text-muted: #9B9890;
  --accent: #2252A4;
  --accent-hover: #1A3F7E;
  --navy: #0E1B48;
  --error: #DC2626;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;

  --font: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(14,27,72,0.06), 0 1px 2px rgba(14,27,72,0.04);
  --shadow-md: 0 4px 12px rgba(14,27,72,0.08), 0 2px 4px rgba(14,27,72,0.04);
  --shadow-lg: 0 12px 40px rgba(14,27,72,0.12), 0 4px 12px rgba(14,27,72,0.06);
  --shadow-xl: 0 20px 60px rgba(14,27,72,0.14), 0 8px 20px rgba(14,27,72,0.08);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* ── Animations ── */
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideUpPanel {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes progressStripe {
  0% { background-position: 0 0; }
  100% { background-position: 40px 0; }
}

@keyframes checkmark {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-shake { animation: shakeX 0.6s ease-in-out; }
.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-slideUp { animation: slideUp 0.5s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

/* ── Split Layout ── */
.login-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Left Hero Panel ── */
.hero-panel {
  position: relative;
  flex: 1;
  background: linear-gradient(145deg, #0a1535 0%, #0E1B48 30%, #162a5e 60%, #1a3572 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 40px 28px;
  overflow: hidden;
  min-height: 100vh;
}

.hero-panel::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(34,82,164,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-panel::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(74,95,224,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Graph Canvas */
.graph-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.85;
}

/* Hero Branding */
.hero-brand {
  position: relative;
  z-index: 2;
}

.brand-logo {
  display: inline-flex;
  align-items: baseline;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-logo .med { color: #ffffff; }
.brand-logo .bos { color: #6B9BF7; }
.brand-logo .tm {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  margin-left: 1px;
  vertical-align: top;
  position: relative;
  top: -5px;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
}

.hero-content h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.hero-content h1 em {
  font-style: italic;
  color: #6B9BF7;
}

.hero-content p {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 400px;
}

.btn-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.btn-learn-more:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.btn-learn-more svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.btn-learn-more:hover svg {
  transform: translateX(3px);
}

/* Hero Footer */
.hero-footer {
  position: relative;
  z-index: 2;
}

.hero-footer-top {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-footer-bottom {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.3px;
}

/* ── Right Login Panel ── */
.login-panel {
  width: 480px;
  min-width: 420px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 56px;
  position: relative;
}

.login-panel-inner {
  width: 100%;
  max-width: 340px;
}

.login-heading {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 32px;
}

/* Error Message */
.login-error {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

.login-error.visible {
  display: flex;
}

.login-error svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Form Fields */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-dark);
  transition: all var(--transition);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input:hover {
  border-color: #C5C1B8;
}

.form-input:focus {
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(74,95,224,0.1);
}

/* Sign In Button */
.btn-signin {
  width: 100%;
  padding: 13px 24px;
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.btn-signin::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-signin:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34,82,164,0.3);
}

.btn-signin:hover::before { opacity: 1; }

.btn-signin:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-signin:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-signin .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-signin.loading .spinner { display: block; }
.btn-signin.loading .btn-text { display: none; }

/* Security Badge */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.security-badge svg {
  width: 14px;
  height: 14px;
  color: var(--success);
  flex-shrink: 0;
}

/* HIPAA Safeguards */
.hipaa-safeguards {
  margin-top: 20px;
  padding: 16px;
  background: rgba(22,163,74,0.04);
  border: 1px solid rgba(22,163,74,0.1);
  border-radius: var(--radius-sm);
}

.hipaa-safeguards-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.hipaa-safeguards ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.hipaa-safeguards li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 400;
}

.hipaa-safeguards li svg {
  width: 12px;
  height: 12px;
  color: var(--success);
  flex-shrink: 0;
}

/* ── Mobile Drawer ── */
.mobile-handle {
  display: none;
}

.drawer-toggle {
  display: none;
}

/* ── Mobile Responsive (Login) ── */
@media (max-width: 860px) {
  .login-container {
    flex-direction: column;
    position: relative;
  }

  .hero-panel {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px 24px 120px;
  }

  .hero-content h1 { font-size: 32px; }

  .login-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: unset;
    max-height: 85vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px 28px 32px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
    transform: translateY(calc(100% - 72px));
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 100;
    overflow-y: auto;
    will-change: transform;
  }

  .drawer-toggle:checked ~ .login-panel {
    transform: translateY(0);
  }

  .mobile-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    cursor: pointer;
  }

  .mobile-handle-bar {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
  }

  .mobile-handle-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
  }

  .login-panel-inner {
    max-width: 100%;
  }

  .login-heading { font-size: 24px; }
  .login-subtitle { margin-bottom: 24px; }

  .hipaa-safeguards ul {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   DASHBOARD PAGE
   ============================================================ */

/* ── Dashboard Layout ── */
.dashboard-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav Bar ── */
.nav-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo .brand-logo {
  font-size: 22px;
}

.nav-logo .brand-logo .med { color: var(--navy); }
.nav-logo .brand-logo .bos { color: var(--accent); }
.nav-logo .brand-logo .tm  { color: var(--text-muted); }

.nav-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.1px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-org {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-org-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-org-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-mid);
  white-space: nowrap;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-logout:hover {
  color: var(--error);
  border-color: var(--error);
  background: #FEF2F2;
}

.btn-logout svg {
  width: 16px;
  height: 16px;
}

/* ── Main Content ── */
.dashboard-main {
  flex: 1;
  padding: 32px;
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
}

/* ── Card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card + .card {
  margin-top: 24px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
}

.card-header .badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(34,82,164,0.08);
  color: var(--accent);
  letter-spacing: 0.3px;
}

.card-body {
  padding: 24px;
}

/* ── Upload Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  background: var(--bg-input);
}

.drop-zone:hover {
  border-color: var(--accent);
  background: rgba(34,82,164,0.03);
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(34,82,164,0.06);
  box-shadow: inset 0 0 0 2px rgba(34,82,164,0.1);
  transform: scale(1.005);
}

.drop-zone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--accent);
  opacity: 0.7;
  transition: all var(--transition);
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.drag-over .drop-zone-icon {
  opacity: 1;
  transform: translateY(-3px);
}

.drop-zone-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.drop-zone-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.drop-zone-accept {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.drop-zone input[type="file"] {
  display: none;
}

/* ── File Preview (after selection) ── */
.file-preview {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.file-preview.visible {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

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

.file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.btn-upload {
  padding: 10px 24px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-upload:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34,82,164,0.3);
}

.btn-upload:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-upload .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-upload.loading .spinner { display: block; }
.btn-upload.loading .btn-text { display: none; }

.btn-remove-file {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-remove-file:hover {
  background: #FEF2F2;
  color: var(--error);
}

.btn-remove-file svg {
  width: 16px;
  height: 16px;
}

/* ── Progress Bar ── */
.upload-progress {
  display: none;
  margin-top: 20px;
  padding: 16px 20px;
  background: #dce6f8;
  border-radius: var(--radius-sm);
  border: 1px solid #a8c4ec;
}

.upload-progress.visible {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.progress-bar-track {
  width: 100%;
  height: 18px;
  background: #b8cde8;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #4A90D9, #2563EB);
  background-size: 200% 100%;
  border-radius: 9px;
  width: 0%;
  transition: width 0.3s ease-out;
  position: relative;
  animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-bar-fill.striped {
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progressStripe 0.8s linear infinite, progressShimmer 2s ease-in-out infinite;
}

.progress-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  color: #2563EB;
  font-weight: 600;
}

/* ── Upload Result ── */
.upload-result {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
}

.upload-result.visible {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

.upload-result.success {
  background: var(--success-light);
  color: #15803D;
  border: 1px solid rgba(22,163,74,0.2);
}

.upload-result.error {
  background: #FEF2F2;
  color: var(--error);
  border: 1px solid #FECACA;
}

.upload-result svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Claims Table ── */
.claims-table-wrap {
  overflow-x: auto;
}

.claims-table {
  width: 100%;
  border-collapse: collapse;
}

.claims-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.claims-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-dark);
  border-bottom: 1px solid rgba(221,217,207,0.5);
  vertical-align: middle;
}

.claims-table tbody tr {
  transition: background var(--transition);
}

.claims-table tbody tr:hover {
  background: rgba(34,82,164,0.02);
}

.claims-table tbody tr:last-child td {
  border-bottom: none;
}

.cell-filename {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  min-width: 0;
}

.filename-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  cursor: default;
}

/* ── Details Row (More panel) ── */
.details-row {
  display: none;
}

.details-row.visible {
  display: table-row;
  animation: fadeIn 0.2s ease-out;
}

.details-row td {
  padding: 0 16px 14px !important;
  border-bottom: 1px solid rgba(221,217,207,0.5) !important;
}

.details-panel {
  background: #fff;
  border-radius: 8px;
  padding: 14px 20px;
  border: 1px solid var(--border);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.detail-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── More Button ── */
.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}

.btn-more:hover {
  background: rgba(34,82,164,0.08);
  color: var(--accent);
}

.btn-more.active {
  background: rgba(34,82,164,0.1);
  color: var(--accent);
}

.btn-more svg {
  width: 18px;
  height: 18px;
}

.cell-filename .file-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}

.file-type-pdf { background: #DC2626; }
.file-type-csv { background: #16A34A; }
.file-type-jpg, .file-type-jpeg, .file-type-png { background: #9333EA; }
.file-type-edi { background: #0E1B48; }
.file-type-xlsx { background: #217346; }
.file-type-zip { background: #7B2D8B; }
.file-type-tar { background: #8B5E3C; }
.file-type-default { background: var(--text-muted); }

.encryption-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(22,163,74,0.08);
  color: #15803D;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.status-completed {
  background: var(--success-light);
  color: #15803D;
}

.status-processing {
  background: var(--warning-light);
  color: #B45309;
}

.status-failed {
  background: #FEF2F2;
  color: var(--error);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-processing .status-dot {
  animation: pulse 1.5s ease-in-out infinite;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}

.btn-download:hover {
  background: rgba(34,82,164,0.08);
  color: var(--accent);
}

.btn-download svg {
  width: 18px;
  height: 18px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--border);
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.empty-state-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Dashboard Footer ── */
.dashboard-footer {
  margin-top: auto;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.footer-hipaa {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.footer-hipaa svg {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Session Timeout Notification ── */
.session-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  animation: slideUp 0.4s ease-out;
  max-width: 380px;
}

.session-toast svg {
  width: 20px;
  height: 20px;
  color: var(--warning);
  flex-shrink: 0;
}

.session-toast .close-toast {
  margin-left: auto;
  padding: 4px;
  color: var(--text-muted);
  transition: color var(--transition);
  flex-shrink: 0;
}

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




/* ── Actions Group ── */
.actions-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Delete Button ── */
.btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}

.btn-delete:hover {
  background: #FEF2F2;
  color: var(--error);
}

.btn-delete svg {
  width: 16px;
  height: 16px;
}

/* ── Audit Trail Toggle Button ── */
.btn-audit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}

.btn-audit:hover {
  background: rgba(34,82,164,0.08);
  color: var(--accent);
}

.btn-audit.active {
  background: rgba(34,82,164,0.1);
  color: var(--accent);
}

.btn-audit svg {
  width: 16px;
  height: 16px;
}

/* ── Action Badges ── */
.action-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.action-upload {
  background: var(--success-light);
  color: #15803D;
}

.action-download {
  background: #EFF6FF;
  color: #1D4ED8;
}

.action-viewed {
  background: #F3F4F6;
  color: #6B7280;
}

.action-deleted {
  background: #FEF2F2;
  color: var(--error);
}

/* ── Audit Trail Expandable Row ── */
.audit-trail-row {
  display: none;
}

.audit-trail-row.visible {
  display: table-row;
  animation: fadeIn 0.25s ease-out;
}

.audit-trail-row td {
  padding: 0 !important;
  border-bottom: 1px solid rgba(221,217,207,0.5);
  background: var(--bg-input);
}

.audit-timeline {
  padding: 16px 24px 20px;
}

.audit-timeline-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.audit-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}

.audit-entry + .audit-entry {
  border-top: 1px solid rgba(221,217,207,0.3);
}

.audit-entry-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audit-entry-icon svg {
  width: 14px;
  height: 14px;
}

.audit-entry-icon.action-upload {
  background: var(--success-light);
  color: #15803D;
}

.audit-entry-icon.action-download {
  background: #EFF6FF;
  color: #1D4ED8;
}

.audit-entry-icon.action-viewed {
  background: #F3F4F6;
  color: #6B7280;
}

.audit-entry-icon.action-deleted {
  background: #FEF2F2;
  color: var(--error);
}

.audit-entry-content {
  flex: 1;
  min-width: 0;
}

.audit-entry-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.audit-entry-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.audit-entry-sep {
  margin: 0 4px;
  color: var(--border);
}

.audit-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
  text-align: center;
}

/* ── Delete Confirmation Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14,27,72,0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.visible {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease-out;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FEF2F2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.modal-icon svg {
  width: 28px;
  height: 28px;
  color: var(--error);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal-text {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-text strong {
  color: var(--text-dark);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 100px;
}

.modal-btn-cancel {
  background: var(--bg-input);
  color: var(--text-mid);
  border: 1px solid var(--border);
}

.modal-btn-cancel:hover {
  background: var(--bg);
  border-color: #C5C1B8;
}

.modal-btn-confirm {
  background: var(--error);
  color: #ffffff;
}

.modal-btn-confirm:hover {
  background: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

.modal-btn-confirm:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.modal-btn-confirm .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.modal-btn-confirm.loading .spinner { display: block; }
.modal-btn-confirm.loading .btn-text { display: none; }

/* ── Dashboard Responsive (enhanced table columns) ── */
@media (max-width: 1024px) {
  .claims-table th:nth-child(5),
  .claims-table td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-bar {
    padding: 0 16px;
    height: 56px;
  }

  .nav-title { display: none; }
  .nav-divider { display: none; }
  .nav-user-name { display: none; }

  .dashboard-main {
    padding: 20px 16px;
  }

  .card-body { padding: 16px; }
  .drop-zone { padding: 32px 16px; }

  .claims-table th:nth-child(3),
  .claims-table td:nth-child(3),
  .claims-table th:nth-child(5),
  .claims-table td:nth-child(5),
  .claims-table th:nth-child(6),
  .claims-table td:nth-child(6) {
    display: none;
  }

  .audit-timeline {
    padding: 12px 16px 16px;
  }

  .dashboard-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 16px;
  }
}

/* ── Auth Links ── */
.auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.auth-link {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
}

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

.auth-link-divider {
  color: var(--border);
  font-size: 12px;
  user-select: none;
}

/* ── Form Steps ── */
.form-step {
  animation: fadeIn 0.35s ease-out;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.step-header .login-heading {
  margin-bottom: 0;
}

.btn-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-mid);
  transition: all var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.btn-back:hover {
  background: var(--bg-input);
  color: var(--text-dark);
}

.btn-back svg {
  width: 18px;
  height: 18px;
}

.optional-label {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

/* ── OTP Input ── */
.otp-input {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 12px;
  text-align: center;
  font-family: 'Albert Sans', monospace;
}

.otp-resend {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Success Card ── */
.success-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--success-light);
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: var(--radius-md);
}

.success-icon {
  width: 48px;
  height: 48px;
  color: var(--success);
  margin: 0 auto 12px;
  display: block;
}

.success-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #15803D;
  margin-bottom: 6px;
}

.success-card p {
  font-size: 13px;
  color: var(--text-mid);
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
