/* ==========================================================================
   LUMIZEN TECHNOLOGY ERP - CORE DESIGN SYSTEM & STYLESHEET
   Branding: Cyan / Sky Blue, Purple / Violet, Dark Slate Navy, Crisp Whites
   ========================================================================== */

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

:root {
  /* Brand Color Palette */
  --brand-cyan: #00c6ff;
  --brand-cyan-dark: #0072ff;
  --brand-purple: #7928ca;
  --brand-purple-light: #9d4edd;
  --brand-violet: #6366f1;
  
  /* Primary Gradients */
  --grad-primary: linear-gradient(135deg, #00c6ff 0%, #0072ff 50%, #7928ca 100%);
  --grad-accent: linear-gradient(135deg, #7928ca 0%, #ff0080 100%);
  --grad-cyan: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  --grad-purple: linear-gradient(135deg, #8a2387 0%, #e94057 50%, #f27121 100%);
  --grad-dark: linear-gradient(180deg, #0b0f19 0%, #111827 100%);
  --grad-sidebar: linear-gradient(180deg, #090d16 0%, #0f172a 100%);

  /* Neutrals & Surfaces */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #fcfdfe;
  --bg-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #38bdf8;
  
  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #94a3b8;
  --text-inverse: #ffffff;
  
  /* Status Colors */
  --status-pending-bg: #fef3c7;
  --status-pending-text: #b45309;
  --status-pending-border: #fde68a;

  --status-processing-bg: #e0f2fe;
  --status-processing-text: #0369a1;
  --status-processing-border: #bae6fd;

  --status-submitted-bg: #f3e8ff;
  --status-submitted-text: #7e22ce;
  --status-submitted-border: #e9d5ff;

  --status-approved-bg: #dcfce7;
  --status-approved-text: #15803d;
  --status-approved-border: #bbf7d0;

  --status-sent-bg: #cffafe;
  --status-sent-text: #0e7490;
  --status-sent-border: #a5f3fc;

  /* Priority Colors */
  --priority-urgent: #ef4444;
  --priority-high: #f97316;
  --priority-medium: #3b82f6;
  --priority-low: #64748b;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(0, 198, 255, 0.35);

  /* Dimensions & Radius */
  --sidebar-width: 270px;
  --header-height: 70px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  /* Fonts */
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-cyan-dark);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--brand-purple);
}

/* App Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--grad-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
  height: 42px;
  max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 198, 255, 0.3));
}

.sidebar-title {
  display: flex;
  flex-direction: column;
}
.sidebar-title .brand-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #00d2ff, #9d4edd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-title .brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}
.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.menu-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748b;
  padding: 12px 12px 6px 12px;
  margin-top: 8px;
}

.nav-item {
  margin-bottom: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 13.5px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(3px);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(0, 198, 255, 0.18), rgba(121, 40, 202, 0.18));
  border-left: 3px solid #00c6ff;
  font-weight: 600;
}
.nav-link.active svg {
  color: #00c6ff;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color 0.2s;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 198, 255, 0.2);
  color: #38bdf8;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00c6ff;
}

.user-info-mini {
  flex: 1;
  overflow: hidden;
}
.user-name-mini {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  background: #7928ca;
  color: #fff;
  letter-spacing: 0.5px;
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
}

/* Header */
.app-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.header-title-block h1 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
}
.header-title-block p {
  font-size: 12px;
  color: var(--text-muted);
}

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

/* Notifications Dropdown */
.notif-btn {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.notif-btn:hover {
  color: var(--brand-purple);
  border-color: var(--brand-purple);
  background: #fff;
}
.notif-badge-bubble {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: none;
  z-index: 1000;
  animation: fadeInDown 0.2s ease;
}
.notif-dropdown.show {
  display: block;
}
.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.notif-list {
  max-height: 320px;
  overflow-y: auto;
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  display: block;
  color: inherit;
  transition: background 0.15s;
}
.notif-item:hover {
  background: var(--bg-alt);
}
.notif-item.unread {
  background: rgba(0, 198, 255, 0.05);
}
.notif-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}
.notif-item-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.notif-item-time {
  font-size: 10.5px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* Content Container */
.app-content {
  padding: 28px;
  flex: 1;
}

/* Footer */
.app-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Stat Cards & KPI Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.cyan {
  background: rgba(0, 198, 255, 0.12);
  color: #0072ff;
}
.stat-icon.purple {
  background: rgba(121, 40, 202, 0.12);
  color: #7928ca;
}
.stat-icon.green {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.stat-icon.amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.stat-icon.red {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.stat-info {
  flex: 1;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
  letter-spacing: -0.5px;
}
.stat-sub {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 3px;
}

/* Cards & Panels */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: 24px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.lum-table th {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.lum-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.lum-table tbody tr {
  transition: background 0.15s ease;
}
.lum-table tbody tr:hover {
  background: #f8fafc;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 114, 255, 0.25);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 114, 255, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp:hover {
  background: #128c7e;
  color: #ffffff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-label .required {
  color: #ef4444;
}

.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--brand-cyan-dark);
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.15);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Filter Bar */
.filter-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: flex-end;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Status Badges */
.badge-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
  border-color: var(--status-pending-border);
}
.badge-processing {
  background: var(--status-processing-bg);
  color: var(--status-processing-text);
  border-color: var(--status-processing-border);
}
.badge-submitted {
  background: var(--status-submitted-bg);
  color: var(--status-submitted-text);
  border-color: var(--status-submitted-border);
}
.badge-approved {
  background: var(--status-approved-bg);
  color: var(--status-approved-text);
  border-color: var(--status-approved-border);
}
.badge-sent {
  background: var(--status-sent-bg);
  color: var(--status-sent-text);
  border-color: var(--status-sent-border);
}

/* Payment Status Indicator Pill */
.client-payment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.client-payment-pill.warning {
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.client-payment-pill.ok {
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Priority Badges */
.badge-priority-urgent {
  background: #fee2e2;
  color: #dc2626;
}
.badge-priority-high {
  background: #ffedd5;
  color: #c2410c;
}
.badge-priority-medium {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-priority-low {
  background: #f1f5f9;
  color: #475569;
}

/* Timeline component */
.timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 16px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--brand-cyan-dark);
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.2);
}
.timeline-dot.active {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.timeline-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}
.timeline-time {
  font-size: 11px;
  color: var(--text-sub);
}
.timeline-body {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal-backdrop.show {
  display: flex;
}
.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalScaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.modal-body {
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-alt);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-cyan-dark);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: slideInRight 0.3s ease;
}
.toast.success { border-left-color: #10b981; }
.toast.danger { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }

/* File List & Attachment Tiles */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.file-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--brand-purple);
  border: 1px solid var(--border-color);
}
.file-meta {
  flex: 1;
  overflow: hidden;
}
.file-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size {
  font-size: 11px;
  color: var(--text-sub);
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Work Status Tabs */
.status-tabs-wrapper {
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.status-tabs-wrapper::-webkit-scrollbar {
  height: 4px;
}
.status-tabs-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.status-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.status-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.status-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-alt);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.status-tab-btn.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}
.status-tab-btn.active.tab-pending { background: #d97706; border-color: #d97706; color: #fff; }
.status-tab-btn.active.tab-processing { background: #0284c7; border-color: #0284c7; color: #fff; }
.status-tab-btn.active.tab-submitted { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.status-tab-btn.active.tab-approved { background: #059669; border-color: #059669; color: #fff; }
.status-tab-btn.active.tab-sent { background: #0891b2; border-color: #0891b2; color: #fff; }

.status-tab-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--text-main);
}
.status-tab-btn.active .status-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* 3-Level Credit Badges & Display */
.credit-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.credit-tier-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.credit-tier-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.credit-tier-val {
  font-size: 15px;
  font-weight: 800;
  margin-top: 2px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 0px;
  }
  .app-sidebar {
    transform: translateX(-100%);
    width: 270px;
  }
  .app-sidebar.mobile-open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
    width: 100%;
  }
  .mobile-toggle-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .app-content {
    padding: 16px;
  }
  .app-header {
    padding: 0 16px;
  }
  .card-header, .card-body {
    padding: 16px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
}
