/**
 * VD Workforce Design System - Theme & Global Styles
 * Adheres to DESIGN-VDWF-V1.0
 */

:root {
  /* Primary Brand & Structure */
  --brand-primary: #2563eb;
  --brand-primary-dark: #1d4ed8;
  --brand-primary-light: #dbeafe;
  --brand-navy: #0f172a;
  --brand-slate: #1e293b;

  /* Neutral Surfaces & Borders */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-default: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Semantic Status Colors */
  --status-success-bg: #ecfdf5;
  --status-success-fg: #059669;
  --status-success-border: #a7f3d0;
  --status-warning-bg: #fffbeb;
  --status-warning-fg: #d97706;
  --status-warning-border: #fde68a;
  --status-danger-bg: #fef2f2;
  --status-danger-fg: #dc2626;
  --status-danger-border: #fecaca;
  --status-info-bg: #eff6ff;
  --status-info-fg: #2563eb;
  --status-info-border: #bfdbfe;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Component Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Accessibility & Tap Targets */
  --touch-target-min: 44px;
  --focus-ring: 2px solid var(--brand-primary);
  --focus-ring-offset: 2px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.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;
}

/* Monospace Helpers */
.vd-mono,
.vd-masked-pii,
.vd-currency {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* App Shell Layout */
.vd-app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.vd-app-header {
  height: 60px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 40;
}

.vd-header-left, .vd-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.vd-header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-weight: 700;
  color: var(--brand-navy);
}

.vd-logo-mark {
  background-color: var(--brand-primary);
  color: #fff;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
}

.vd-logo-text {
  letter-spacing: 0.05em;
  font-size: 15px;
}

.vd-env-tag {
  font-size: 11px;
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  font-weight: 600;
}

.vd-shell-body {
  display: flex;
  flex: 1;
}

.vd-app-sidebar {
  width: 250px;
  background-color: var(--brand-navy);
  color: #fff;
  padding: var(--space-4) 0;
  flex-shrink: 0;
  transition: width 0.2s ease, transform 0.2s ease;
}

.vd-app-main {
  flex: 1;
  padding: var(--space-6);
  overflow-x: auto;
  background-color: var(--bg-page);
}

.vd-page-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.vd-page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.vd-page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.vd-page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.vd-page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.vd-page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Breadcrumbs */
.vd-breadcrumbs {
  display: flex;
  align-items: center;
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  gap: var(--space-2);
}

.vd-crumb-link {
  color: var(--text-secondary);
  text-decoration: none;
}

.vd-crumb-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.vd-crumb-active {
  color: var(--text-primary);
  font-weight: 600;
}

.vd-crumb-sep {
  color: var(--border-strong);
  user-select: none;
}

/* Cards & Sections */
.vd-card,
.vd-content-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-subtle);
}

.vd-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-default);
}

.vd-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.vd-section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Data Table Component */
.vd-table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
}

.vd-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.vd-table th {
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
  user-select: none;
}

.vd-table th.sortable {
  cursor: pointer;
}

.vd-table th.sortable:hover {
  background-color: var(--border-default);
  color: var(--text-primary);
}

.vd-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
  height: 40px;
}

.vd-table tbody tr:hover {
  background-color: var(--bg-subtle);
}

.vd-table tbody tr.selected {
  background-color: var(--brand-primary-light);
}

.vd-table-striped tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

/* Table Toolbar */
.vd-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.vd-toolbar-filters {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Search Field */
.vd-search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
}

.vd-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.vd-search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
  background-color: var(--bg-surface);
}

.vd-search-input:focus {
  border-color: var(--brand-primary);
}

/* Pagination */
.vd-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  font-size: 13px;
  color: var(--text-secondary);
}

.vd-pagination-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.vd-pagination-btn {
  padding: 4px 10px;
  border: 1px solid var(--border-default);
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  min-height: 32px;
}

.vd-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vd-pagination-btn.active {
  background-color: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

/* Badges */
.vd-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}

.vd-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

.vd-badge-success {
  background-color: var(--status-success-bg);
  color: var(--status-success-fg);
  border-color: var(--status-success-border);
}
.vd-badge-success .vd-badge-dot {
  background-color: var(--status-success-fg);
}

.vd-badge-warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-fg);
  border-color: var(--status-warning-border);
}
.vd-badge-warning .vd-badge-dot {
  background-color: var(--status-warning-fg);
}

.vd-badge-danger {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-fg);
  border-color: var(--status-danger-border);
}
.vd-badge-danger .vd-badge-dot {
  background-color: var(--status-danger-fg);
}

.vd-badge-info {
  background-color: var(--status-info-bg);
  color: var(--status-info-fg);
  border-color: var(--status-info-border);
}
.vd-badge-info .vd-badge-dot {
  background-color: var(--status-info-fg);
}

.vd-badge-neutral {
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  border-color: var(--border-default);
}
.vd-badge-neutral .vd-badge-dot {
  background-color: var(--text-muted);
}

/* Role Badges */
.vd-role-badge-ops {
  background-color: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.vd-role-badge-client {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.vd-role-badge-institute {
  background-color: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.vd-role-badge-employee {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

/* Buttons */
.vd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 38px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.vd-btn-primary {
  background-color: var(--brand-primary);
  color: #fff;
}
.vd-btn-primary:hover {
  background-color: var(--brand-primary-dark);
}

.vd-btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.vd-btn-secondary:hover {
  background-color: var(--bg-subtle);
}

.vd-btn-danger {
  background-color: var(--status-danger-fg);
  color: #fff;
}
.vd-btn-danger:hover {
  background-color: #b91c1c;
}

.vd-btn-outline-danger {
  background-color: var(--bg-surface);
  color: var(--status-danger-fg);
  border-color: var(--status-danger-border);
}
.vd-btn-outline-danger:hover {
  background-color: var(--status-danger-bg);
}

.vd-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms & Inputs */
.vd-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.vd-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.vd-required-indicator {
  color: var(--status-danger-fg);
  margin-left: 2px;
}

.vd-input,
.vd-select,
.vd-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  min-height: 38px;
}

.vd-input:focus,
.vd-select:focus,
.vd-textarea:focus {
  border-color: var(--brand-primary);
}

.vd-input.has-error,
.vd-select.has-error {
  border-color: var(--status-danger-fg);
}

.vd-form-helper {
  font-size: 12px;
  color: var(--text-secondary);
}

.vd-validation-error {
  font-size: 12px;
  color: var(--status-danger-fg);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Phone Input with +91 country prefix */
.vd-phone-input-group {
  display: flex;
  align-items: stretch;
}

.vd-phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}

.vd-phone-input-group .vd-input {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Checkbox & Radio */
.vd-choice-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.vd-choice-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.vd-choice-input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

/* Toggle Switch */
.vd-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.vd-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: var(--border-strong);
  border-radius: var(--radius-full);
  transition: background-color 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

.vd-toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.vd-toggle-input:checked + .vd-toggle-switch {
  background-color: var(--brand-primary);
}

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

/* File Upload Dropzone */
.vd-file-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  background-color: var(--bg-subtle);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.vd-file-dropzone:hover,
.vd-file-dropzone.drag-active {
  border-color: var(--brand-primary);
  background-color: var(--brand-primary-light);
}

.vd-dropzone-icon {
  font-size: 32px;
  margin-bottom: var(--space-2);
}

/* Cards */
.vd-stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-subtle);
}

.vd-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vd-stat-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.vd-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.vd-stat-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-secondary);
}

.vd-stat-trend-up {
  color: var(--status-success-fg);
  font-weight: 600;
}

.vd-stat-trend-down {
  color: var(--status-danger-fg);
  font-weight: 600;
}

/* Alerts & Notifications */
.vd-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 13px;
}

.vd-alert-info {
  background-color: var(--status-info-bg);
  color: var(--status-info-fg);
  border-color: var(--status-info-border);
}

.vd-alert-success {
  background-color: var(--status-success-bg);
  color: var(--status-success-fg);
  border-color: var(--status-success-border);
}

.vd-alert-warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-fg);
  border-color: var(--status-warning-border);
}

.vd-alert-danger {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-fg);
  border-color: var(--status-danger-border);
}

/* Modal Dialog */
.vd-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 50;
}

.vd-modal {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-default);
}

.vd-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.vd-modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

.vd-modal-body {
  padding: var(--space-6);
  font-size: 14px;
  color: var(--text-primary);
}

.vd-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-default);
  background-color: var(--bg-subtle);
}

/* Toast Stack */
.vd-toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 60;
  pointer-events: none;
}

.vd-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 13px;
  border: 1px solid var(--border-default);
  background-color: var(--bg-surface);
}

/* Skeletons */
.vd-skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: vd-pulse 1.5s infinite ease-in-out;
  border-radius: var(--radius-sm);
}

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

/* Responsive Media Queries */
@media (max-width: 1023px) {
  .vd-app-sidebar {
    width: 200px;
  }
}

@media (max-width: 767px) {
  .vd-app-header {
    padding: 0 var(--space-4);
  }

  .vd-app-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    z-index: 45;
    transform: translateX(-100%);
  }

  body.vd-sidebar-open .vd-app-sidebar {
    transform: translateX(0);
  }

  .vd-app-main {
    padding: var(--space-4);
  }

  .vd-page-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .vd-table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .vd-search-field {
    min-width: 100%;
  }

  .vd-btn {
    min-height: var(--touch-target-min);
  }
}

@media (max-width: 479px) {
  .vd-app-main {
    padding: var(--space-3);
  }

  .vd-pagination {
    flex-direction: column;
    gap: var(--space-3);
  }
}

/* Sidebar & Navigation Styling */
.vd-sidebar-toggle {
  background: none;
  border: 1px solid var(--border-default);
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vd-portal-badge {
  padding-left: var(--space-2);
  margin-left: var(--space-2);
}

.vd-portal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.vd-user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.vd-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.vd-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.vd-user-id {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.vd-user-role {
  font-size: 11px;
  color: var(--text-secondary);
}

.vd-logout-btn {
  background: none;
  border: 1px solid var(--border-default);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--status-danger-fg);
  cursor: pointer;
}
.vd-logout-btn:hover {
  background-color: var(--status-danger-bg);
}

.vd-sidebar-section-title {
  padding: 0 var(--space-4) var(--space-2) var(--space-4);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.vd-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-2);
}

.vd-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}

.vd-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.vd-nav-link.active {
  background-color: var(--brand-primary);
  color: #fff;
  font-weight: 600;
}

.vd-nav-icon {
  font-size: 10px;
  opacity: 0.7;
}

.vd-nav-soon {
  margin-left: auto;
  font-size: 10px;
  background-color: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
}

/* Breadcrumbs in Shell */
.vd-crumb {
  color: var(--text-secondary);
  font-size: 13px;
}
.vd-crumb.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Login View Styling */
.vd-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: var(--space-4);
}

.vd-login-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: var(--space-8);
}

.vd-login-brand {
  text-align: center;
  margin-bottom: var(--space-6);
}

.vd-login-logo {
  display: inline-block;
  background-color: var(--brand-primary);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.vd-login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: 0.05em;
}

.vd-login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.vd-login-form {
  display: flex;
  flex-direction: column;
}

.vd-btn-block {
  width: 100%;
  margin-top: var(--space-3);
  padding: 10px;
  font-size: 14px;
}

.vd-login-footer {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-default);
  font-size: 11px;
  color: var(--text-muted);
}

/* System State Cards */
.vd-state-card {
  max-width: 540px;
  margin: var(--space-8) auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-subtle);
}

.vd-state-icon {
  font-size: 40px;
  margin-bottom: var(--space-3);
}

.vd-state-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.vd-state-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  line-height: 1.6;
}

.vd-state-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
}

.vd-mobile-app-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 13px;
}

/* Detail Rows in Cards */
.vd-employee-header,
.vd-client-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-default);
}

.vd-employee-info,
.vd-client-name {
  font-size: 16px;
  font-weight: 600;
}

.vd-employee-code {
  font-size: 12px;
  color: var(--text-secondary);
}

.vd-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.vd-detail-label {
  color: var(--text-secondary);
}

.vd-detail-value {
  font-weight: 500;
  color: var(--text-primary);
}

/* PII Reveal Controls */
.vd-pii-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vd-pii-reveal-btn {
  background: none;
  border: 1px solid var(--border-default);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.vd-pii-reveal-btn:hover {
  background-color: var(--bg-subtle);
}

.vd-pii-locked {
  font-size: 12px;
  opacity: 0.6;
}

/* Audit Item */
.vd-audit-item {
  border-left: 3px solid var(--brand-primary);
  padding: var(--space-3) var(--space-4);
  background-color: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-subtle);
}

.vd-audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.vd-audit-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.vd-audit-reason {
  font-size: 12px;
  color: var(--status-warning-fg);
  margin-top: 4px;
}

/* Preview Navigation Bar */
.vd-preview-banner {
  background-color: #0f172a;
  color: #fff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--brand-primary);
}

.vd-preview-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vd-preview-pill {
  color: #94a3b8;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: #1e293b;
  transition: background-color 0.15s, color 0.15s;
  font-weight: 500;
}

.vd-preview-pill:hover,
.vd-preview-pill.active {
  background-color: var(--brand-primary);
  color: #fff;
}

