/* ==========================================================================
   HOTWAVE FINANCE DESIGN SYSTEM (Apple Inspired - Premium Enterprise)
   CÔNG TY TNHH HOTWAVE TRADE (VIỆT NAM)
   ========================================================================== */

@charset "UTF-8";

/* --- 1. CSS Custom Properties / Design Tokens --- */
:root {
  /* Apple Canvas & Surface Palette */
  --bg-app: #F5F5F7;
  --surface: #FFFFFF;
  --surface-subtle: #FAFAFC;
  --surface-hover: #F2F2F7;
  --surface-active: #E5E5EA;

  /* Apple Pro Dark Titanium Sidebar */
  --sidebar-bg: #161618;
  --sidebar-surface: #242426;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #F5F5F7;
  --sidebar-text-muted: #86868B;
  --sidebar-active-bg: rgba(255, 255, 255, 0.10);
  --sidebar-active-border: #0071E3;

  /* Apple Neutral System Grays */
  --slate-50: #FAFAFC;
  --slate-100: #F5F5F7;
  --slate-200: #E5E5EA;
  --slate-300: #D1D1D6;
  --slate-400: #AEAEB2;
  --slate-500: #8E8E93;
  --slate-600: #636366;
  --slate-700: #48484A;
  --slate-800: #1C1C1E;
  --slate-900: #1D1D1F;
  --slate-950: #000000;

  /* Typography Colors */
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --text-quaternary: #AEAEB2;

  /* Apple System Blue (Primary Action) */
  --primary: #0071E3;
  --primary-hover: #0077ED;
  --primary-active: #0062C4;
  --primary-subtle: rgba(0, 113, 227, 0.08);
  --primary-border: rgba(0, 113, 227, 0.25);
  --primary-text: #0071E3;

  /* Financial Inflow / Success (Apple System Green) */
  --emerald: #34C759;
  --emerald-hover: #30B753;
  --emerald-subtle: rgba(52, 199, 89, 0.10);
  --emerald-border: rgba(52, 199, 89, 0.25);
  --emerald-text: #1B7A36;

  /* Financial Outflow / Expense / Danger (Apple System Red) */
  --rose: #FF3B30;
  --rose-hover: #E0352B;
  --rose-subtle: rgba(255, 59, 48, 0.09);
  --rose-border: rgba(255, 59, 48, 0.22);
  --rose-text: #D70015;

  /* Compliance / Pending / Tax Due (Apple System Orange) */
  --amber: #FF9500;
  --amber-hover: #E58600;
  --amber-subtle: rgba(255, 149, 0, 0.10);
  --amber-border: rgba(255, 149, 0, 0.25);
  --amber-text: #B25E00;

  /* Informational / Transfers (Apple System Purple/Indigo) */
  --blue: #5856D6;
  --blue-hover: #4E4BBF;
  --blue-subtle: rgba(88, 86, 214, 0.09);
  --blue-border: rgba(88, 86, 214, 0.22);
  --blue-text: #4442B5;

  /* Borders & Dividers */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.22);

  /* Apple Ambient Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.14), 0 4px 14px rgba(0, 0, 0, 0.06);

  /* Apple Radii (Squircle feel) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 980px;

  /* Spring Animations & Transitions */
  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-apple);
  --transition-base: 220ms var(--ease-apple);
  --transition-slow: 350ms var(--ease-apple);
}

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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-app);
  line-height: 1.47059;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Monospace & Tabular Figures for Financial Calculations */
.font-mono, td[class*="text-right"], .tabular-nums {
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Roboto Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* SVG Icon Global Reset */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* --- 3. Layout Utilities --- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.min-h-0 { min-height: 0; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.self-end { align-self: flex-end; }
.self-center { align-self: center; }

.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-1\.5 > * + * { margin-left: 0.375rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-2\.5 > * + * { margin-left: 0.625rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-3\.5 > * + * { margin-left: 0.875rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-5 > * + * { margin-left: 1.25rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-3\.5 > * + * { margin-top: 0.875rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

@media (min-width: 640px) {
  .sm\:inline { display: inline !important; }
  .sm\:inline-block { display: inline-block !important; }
  .sm\:flex { display: flex !important; }
  .sm\:hidden { display: none !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .sm\:p-5 { padding: 1.25rem !important; }
  .sm\:p-6 { padding: 1.5rem !important; }
  .sm\:gap-4 { gap: 1rem !important; }
  .sm\:gap-5 { gap: 1.25rem !important; }
  .sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) { margin-top: 0 !important; }
  .sm\:space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem !important; }
  .sm\:text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
  .sm\:text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
}

@media (max-width: 767px) {
  .md\:hidden { display: flex !important; }
  button.md\:hidden { display: inline-flex !important; }
  span.md\:hidden { display: inline !important; }
  div.md\:hidden { display: block !important; }
  .hidden.md\:flex { display: none !important; }
  .hidden.md\:block { display: none !important; }
}

@media (min-width: 768px) {
  .md\:hidden { display: none !important; }
  .md\:flex { display: flex !important; }
  .md\:inline-flex { display: inline-flex !important; }
  .md\:block { display: block !important; }
  .md\:grid { display: grid !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .md\:w-64 { width: 16rem !important; }
  .md\:relative { position: relative !important; }
  .md\:translate-x-0 { transform: translateX(0) !important; }
}

@media (min-width: 1024px) {
  .lg\:flex-row { flex-direction: row !important; }
  .lg\:items-center { align-items: center !important; }
  .lg\:self-auto { align-self: auto !important; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .lg\:col-span-2 { grid-column: span 2 / span 2 !important; }
}

/* Sizing & Positioning */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-auto { width: auto; }
.h-auto { height: auto; }
.h-screen { height: 100vh; }
.w-64 { width: 16rem; }
.w-72 { width: 18rem; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.w-2 { width: 0.5rem; }
.h-2\.5 { height: 0.625rem; }
.w-2\.5 { width: 0.625rem; }
.h-3 { height: 0.75rem; }
.w-3 { width: 0.75rem; }
.h-3\.5 { height: 0.875rem; }
.w-3\.5 { width: 0.875rem; }
.h-4 { height: 1rem; }
.w-4 { width: 1rem; }
.h-5 { height: 1.25rem; }
.w-5 { width: 1.25rem; }
.h-6 { height: 1.5rem; }
.w-6 { width: 1.5rem; }
.h-7 { height: 1.75rem; }
.w-7 { width: 1.75rem; }
.h-8 { height: 2rem; }
.w-8 { width: 2rem; }
.h-9 { height: 2.25rem; }
.w-9 { width: 2.25rem; }
.h-10 { height: 2.5rem; }
.w-10 { width: 2.5rem; }
.h-12 { height: 3rem; }
.w-12 { width: 3rem; }
.h-14 { height: 3.5rem; }
.w-14 { width: 3.5rem; }
.h-16 { height: 4rem; }
.w-16 { width: 4rem; }
.h-64 { height: 16rem; }
.h-72 { height: 18rem; }
.h-80 { height: 20rem; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }

/* Spacing (8pt Apple scale) */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }

.m-0 { margin: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }

.mx-3 { margin-left: 0.75rem; margin-right: 0.75rem; }

/* Borders & Dividers */
.border { border: 1px solid var(--border-subtle); }
.border-t { border-top: 1px solid var(--border-subtle); }
.border-b { border-bottom: 1px solid var(--border-subtle); }
.border-r { border-right: 1px solid var(--border-subtle); }
.border-l { border-left: 1px solid var(--border-subtle); }
.border-dashed { border-style: dashed; }
.border-none { border: none !important; }

/* Neutralize legacy border-l-4 stripes with Apple hairline borders */
.border-l-4 {
  border-left-width: 1px !important;
  border-left-color: var(--border-subtle) !important;
}

.border-slate-100 { border-color: var(--slate-100); }
.border-slate-200 { border-color: var(--slate-200); }
.border-slate-300 { border-color: var(--slate-300); }
.border-slate-700 { border-color: var(--slate-700); }
.border-slate-800 { border-color: var(--slate-800); }
.border-emerald-200 { border-color: var(--emerald-border); }
.border-rose-200 { border-color: var(--rose-border); }
.border-amber-200 { border-color: var(--amber-border); }
.border-indigo-200 { border-color: var(--blue-border); }

.divide-y > * + * { border-top: 1px solid var(--border-subtle); }
.divide-slate-100 > * + * { border-top-color: var(--border-subtle); }
.divide-slate-200 > * + * { border-top-color: var(--border-subtle); }

/* Radii & Shadows */
.rounded-sm { border-radius: var(--radius-xs); }
.rounded { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-md); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-none { box-shadow: none !important; }
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Typography Classes */
.text-xs { font-size: 0.75rem; line-height: 1rem; letter-spacing: -0.005em; }       /* 12px */
.text-sm { font-size: 0.8125rem; line-height: 1.25rem; letter-spacing: -0.01em; }   /* 13px */
.text-base { font-size: 0.9375rem; line-height: 1.45rem; letter-spacing: -0.012em; } /* 15px */
.text-lg { font-size: 1.0625rem; line-height: 1.6rem; letter-spacing: -0.015em; }   /* 17px */
.text-xl { font-size: 1.25rem; line-height: 1.75rem; letter-spacing: -0.018em; }    /* 20px */
.text-2xl { font-size: 1.5rem; line-height: 2rem; letter-spacing: -0.022em; }       /* 24px */
.text-\[10px\] { font-size: 10px; line-height: 14px; letter-spacing: 0.01em; }
.text-\[11px\] { font-size: 11px; line-height: 15px; letter-spacing: 0.005em; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Colors */
.text-white { color: #FFFFFF; }
.text-slate-100 { color: var(--slate-100); }
.text-slate-200 { color: var(--slate-200); }
.text-slate-300 { color: var(--slate-300); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--text-secondary); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-800 { color: var(--text-primary); }
.text-slate-900 { color: var(--slate-900); }

.text-emerald-400 { color: #34D399; }
.text-emerald-500 { color: var(--emerald); }
.text-emerald-600 { color: var(--emerald-text); }
.text-emerald-700 { color: #166534; }
.text-emerald-800 { color: #14532D; }

.text-rose-400 { color: #F87171; }
.text-rose-500 { color: var(--rose); }
.text-rose-600 { color: var(--rose-text); }
.text-rose-700 { color: #B91C1C; }
.text-rose-800 { color: #991B1B; }

.text-amber-400 { color: #FBBF24; }
.text-amber-500 { color: var(--amber); }
.text-amber-600 { color: var(--amber-text); }
.text-amber-700 { color: #9A3412; }
.text-amber-800 { color: #7C2D12; }

.text-indigo-400 { color: #818CF8; }
.text-indigo-600 { color: var(--blue); }
.text-indigo-700 { color: var(--blue-text); }
.text-indigo-800 { color: #3730A3; }
.text-indigo-900 { color: #312E81; }

.text-sky-500 { color: var(--primary); }
.text-sky-600 { color: var(--primary); }
.text-sky-700 { color: var(--primary-hover); }

.bg-white { background-color: #FFFFFF; }
.bg-slate-50 { background-color: var(--slate-50); }
.bg-slate-100 { background-color: var(--slate-100); }
.bg-slate-200 { background-color: var(--slate-200); }
.bg-slate-700 { background-color: var(--slate-700); }
.bg-slate-800 { background-color: var(--slate-800); }
.bg-slate-800\/80 { background-color: rgba(28, 28, 30, 0.8); }
.bg-slate-900 { background-color: var(--slate-900); }
.bg-slate-950\/60 { background-color: rgba(0, 0, 0, 0.6); }

.bg-emerald-50 { background-color: var(--emerald-subtle); }
.bg-emerald-500 { background-color: var(--emerald); }
.bg-emerald-500\/20 { background-color: rgba(52, 199, 89, 0.2); }
.bg-emerald-950\/60 { background-color: rgba(20, 83, 45, 0.6); }

.bg-rose-50 { background-color: var(--rose-subtle); }
.bg-rose-500 { background-color: var(--rose); }
.bg-rose-500\/20 { background-color: rgba(255, 59, 48, 0.2); }

.bg-amber-50 { background-color: var(--amber-subtle); }
.bg-amber-50\/80 { background-color: rgba(255, 149, 0, 0.08); }
.bg-amber-500 { background-color: var(--amber); }
.bg-amber-500\/20 { background-color: rgba(255, 149, 0, 0.2); }

.bg-indigo-50 { background-color: var(--blue-subtle); }
.bg-indigo-500 { background-color: var(--blue); }
.bg-sky-50 { background-color: var(--primary-subtle); }
.bg-sky-500 { background-color: var(--primary); }

.hidden { display: none !important; }
.cursor-pointer { cursor: pointer; }
.transition-all { transition: all var(--transition-base); }
.transition-colors { transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast); }
.transition-shadow { transition: box-shadow var(--transition-fast); }

/* --- 4. Component Styles --- */

/* Cards (Apple Surface System) */
.card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Stat Cards (Apple Key Performance Metrics) */
.stat-card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.10);
}

/* Company Hero Banner (Apple Pro Titanium Dark Card) */
.company-hero-card {
  background: linear-gradient(135deg, #1C1C1E 0%, #161618 60%, #1A2230 100%) !important;
  color: #FFFFFF !important;
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.65rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  position: relative;
  overflow: hidden;
}

.company-hero-card::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.18) 0%, rgba(52, 199, 89, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.company-hero-logo {
  width: 3.25rem;
  height: 3.25rem;
  min-width: 3.25rem;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.company-hero-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #FFFFFF !important;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.company-hero-badge {
  font-size: 11px;
  padding: 2.5px 9px;
  border-radius: var(--radius-full);
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  backdrop-filter: blur(8px);
}

.company-hero-badge-tax {
  background-color: rgba(52, 199, 89, 0.16);
  color: #34D399;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.company-hero-badge-bhxh {
  background-color: rgba(0, 113, 227, 0.18);
  color: #70B4FF;
  border: 1px solid rgba(0, 113, 227, 0.35);
}

.company-hero-badge-irc {
  background-color: rgba(168, 85, 247, 0.18);
  color: #D8B4FE;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.company-hero-sub {
  font-size: 0.75rem;
  color: #AEAEB2;
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.company-hero-sub b {
  color: #FFFFFF;
  font-weight: 500;
}

.company-hero-addr {
  font-size: 11px;
  color: #8E8E93;
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.company-hero-sidebox {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  text-align: right;
  flex-shrink: 0;
}

/* Sidebar Navigation System (Apple Dark Slate) */
.nav-group-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sidebar-text-muted);
  padding: 0.75rem 0.85rem 0.35rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #A1A1A6;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-align: left;
  position: relative;
}

.nav-btn:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.12);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.nav-btn svg {
  margin-right: 0.65rem;
  color: #8E8E93;
  transition: color var(--transition-fast);
}

.nav-btn:hover svg,
.nav-btn.active svg {
  color: #FFFFFF;
}

/* Button Design System (Apple Pro Strict 36px/28px Scale) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.8125rem; /* 13px */
  height: 2.25rem;      /* 36px */
  padding: 0 0.875rem;
  line-height: 1;
  white-space: nowrap;
  gap: 0.375rem;
  box-sizing: border-box;
  outline: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.25);
}

.btn-sm {
  height: 1.75rem; /* 28px */
  padding: 0 0.625rem;
  font-size: 0.75rem; /* 12px */
  gap: 0.25rem;
  border-radius: var(--radius-xs);
}

.btn-lg {
  height: 2.625rem; /* 42px */
  padding: 0 1.25rem;
  font-size: 0.875rem; /* 14px */
  gap: 0.5rem;
  border-radius: var(--radius-md);
}

/* Apple Primary Button */
.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-primary:active {
  background-color: var(--primary-active);
}

/* Apple Secondary / Success Button */
.btn-success {
  background-color: var(--emerald);
  color: #FFFFFF;
  border-color: var(--emerald);
  box-shadow: 0 1px 3px rgba(52, 199, 89, 0.2);
}
.btn-success:hover {
  background-color: var(--emerald-hover);
  border-color: var(--emerald-hover);
}

/* Apple Destructive Button */
.btn-danger {
  background-color: var(--rose);
  color: #FFFFFF;
  border-color: var(--rose);
  box-shadow: 0 1px 3px rgba(255, 59, 48, 0.2);
}
.btn-danger:hover {
  background-color: var(--rose-hover);
  border-color: var(--rose-hover);
}

/* Apple Outline Button (Clean Crisp Border) */
.btn-outline {
  background-color: #FFFFFF;
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  background-color: var(--surface-subtle);
  border-color: rgba(0, 0, 0, 0.2);
  color: #000000;
}

/* Apple Subtle / Ghost Button */
.btn-subtle {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  border-color: transparent;
}
.btn-subtle:hover {
  background-color: rgba(0, 0, 0, 0.08);
  color: #000000;
}

.top-bar-divider {
  width: 1px;
  height: 1.5rem;
  background-color: var(--border-subtle);
  margin: 0 0.35rem;
  flex-shrink: 0;
}

/* Badges (Apple iOS Pill Capsule Badges) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  line-height: 1.25;
  white-space: nowrap;
  letter-spacing: -0.005em;
}

.badge-success {
  background-color: var(--emerald-subtle);
  color: var(--emerald-text);
  border: 1px solid var(--emerald-border);
}

.badge-danger {
  background-color: var(--rose-subtle);
  color: var(--rose-text);
  border: 1px solid var(--rose-border);
}

.badge-warning {
  background-color: var(--amber-subtle);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

.badge-info {
  background-color: var(--primary-subtle);
  color: var(--primary-text);
  border: 1px solid var(--primary-border);
}

.badge-neutral {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Form Inputs & Selects (Apple macOS / iOS Crisp Controls) */
.form-input,
.form-select,
select,
input[type="text"],
input[type="date"],
input[type="month"],
input[type="number"],
input[type="search"],
textarea {
  width: 100%;
  height: 2.25rem; /* 36px */
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background-color: #FFFFFF;
  color: var(--text-primary);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

textarea {
  height: auto;
  min-height: 4.5rem;
}

.form-input:focus,
.form-select:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

/* Form Labels */
label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  letter-spacing: -0.005em;
}

label .required-star {
  color: var(--rose);
  margin-left: 2px;
}

/* Modern Apple Data Table */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

thead th {
  background-color: var(--surface-subtle);
  color: var(--text-tertiary);
  font-size: 0.6875rem; /* 11px */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

tbody td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr {
  transition: background-color var(--transition-fast);
}

tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

/* Glassmorphism Header */
header {
  background-color: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

/* Modals & Backdrop Blur */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.25rem;
  animation: fadeIn var(--transition-fast);
}

.modal-card {
  background-color: #FFFFFF;
  width: 100%;
  border-radius: var(--radius-xl);
  padding: 1.65rem;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.97) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* Smart Upload Dropzone */
.smart-upload-dropzone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  background-color: var(--surface-subtle);
  text-align: center;
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.smart-upload-dropzone:hover {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
}

.smart-upload-dropzone.has-file {
  border-color: var(--emerald);
  background-color: var(--emerald-subtle);
}

/* Autofill notice banner */
.autofill-notice-banner {
  background-color: var(--emerald-subtle);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn var(--transition-fast);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.75rem 1.25rem;
  background-color: rgba(28, 28, 30, 0.95);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastIn 0.22s var(--ease-apple);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Fullscreen Viewer */
.viewer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.viewer-header {
  height: 3.5rem;
  padding: 0 1.5rem;
  background-color: rgba(28, 28, 30, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  overflow: hidden;
  height: calc(100vh - 3.5rem);
}

.viewer-body .viewer-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.viewer-body img {
  max-width: 95%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

.viewer-body object,
.viewer-body embed,
.viewer-body iframe {
  width: 100%;
  max-width: 1200px;
  height: calc(100vh - 7.5rem);
  min-height: 550px;
  border: none;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

/* Refined Apple Minimal Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 980px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* ==========================================================================
   MOBILE RESPONSIVE EXTENSION (Apple iOS Experience)
   ========================================================================== */

html, body {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* 移动端侧边抽屉式导航栏 (Sidebar Drawer) */
@media (max-width: 768px) {
  .sidebar-drawer {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 50 !important;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    width: 280px !important;
    max-width: 85vw !important;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.45) !important;
  }

  .sidebar-drawer.mobile-open {
    transform: translateX(0) !important;
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 45;
    transition: opacity 0.25s ease;
  }

  /* 顶栏移动端内边距紧凑化 */
  header {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    height: 3.5rem !important;
  }

  /* 主工作区移动端底部预留空间以防遮挡底部栏 */
  main {
    padding-bottom: 5.5rem !important;
  }

  /* 视图容器在手机上紧凑内边距 */
  .p-6.max-w-7xl {
    padding: 0.85rem !important;
    gap: 0.85rem !important;
  }

  /* 公司英雄横幅移动端优化 */
  .company-hero-card {
    padding: 1.1rem 1rem !important;
  }
  .company-hero-title {
    font-size: 0.9375rem !important;
    line-height: 1.35 !important;
  }

  /* 表格在手机端支持横向滑动且保证最小可读列宽 */
  table {
    min-width: 620px;
  }
  .overflow-x-auto {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* 移动端专属悬浮底部导航栏 (Apple iOS TabBar) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.75rem; /* 60px */
  padding-bottom: env(safe-area-inset-bottom, 0);
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.6875rem; /* 11px */
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: color 0.15s ease;
  gap: 0.25rem;
  flex: 1;
}

.mobile-nav-btn.active {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.15s ease;
}

.mobile-nav-btn.active svg {
  transform: translateY(-1px);
}

/* 底部栏居中凸起快速记账按钮 (Apple Action Capsule) */
.mobile-nav-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  top: -0.625rem;
  flex: 1;
}

.quick-btn-inner {
  width: 2.875rem;
  height: 2.875rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #0077ED 0%, #0062C4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.4);
  border: 2.5px solid #FFFFFF;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-nav-quick-btn:active .quick-btn-inner {
  transform: scale(0.92);
}

/* 移动端快捷记账底部抽屉 (Apple Action Sheet) */
.mobile-action-sheet {
  background: #FFFFFF;
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 500px;
  margin: auto auto 0 auto;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
  animation: slideUpSheet 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 0.85rem);
}

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

.action-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 0.5rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 0.25rem;
}

.action-sheet-item:active {
  transform: scale(0.96);
}

.action-sheet-icon {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 弹窗在移动端自动转换为底部抽屉 */
@media (max-width: 640px) {
  .modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh !important;
    max-height: 92dvh !important;
    border-radius: 24px 24px 0 0 !important;
    margin: 0 !important;
    padding: 1.25rem 1.1rem !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25) !important;
    overflow-y: auto !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 1.25rem) !important;
    animation: slideUpSheet 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* iOS Safari 核心优化：表单输入框字体达 16px 彻底杜绝页面被自动放大的恶劣体验 */
  .form-input,
  .form-select,
  select.form-input,
  textarea.form-input,
  input[type="text"],
  input[type="date"],
  input[type="month"],
  input[type="number"],
  input[type="search"] {
    font-size: 16px !important;
    height: 2.625rem !important;
  }

  /* 弹窗底部按钮堆叠以方便单手点击 */
  .modal-card .flex.items-center.justify-end.space-x-2 {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 0.5rem !important;
  }
  .modal-card .flex.items-center.justify-end.space-x-2 > * {
    width: 100% !important;
    height: 2.625rem !important;
    margin-left: 0 !important;
  }
}

/* ==========================================================================
   全局安全锁屏与访问密码 (Lock Screen Design System)
   ========================================================================== */
#app-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

#app-lock-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lock-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 2rem 1.75rem;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transform: scale(1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lockCardShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.lock-card.shake {
  animation: lockCardShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.lock-pwd-input {
  width: 100%;
  height: 3rem;
  padding: 0 2.75rem 0 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.25rem !important;
  letter-spacing: 0.25em;
  text-align: center;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.lock-pwd-input:focus {
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.35), inset 0 2px 4px rgba(0, 0, 0, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.lock-pwd-input::placeholder {
  font-family: inherit;
  font-size: 0.875rem;
  letter-spacing: normal;
  color: #64748B;
}

