/* ============================================
   KursuKu — Ultra Premium Mobile-First Design System v4.0
   Premium Quality • World-Class Mobile App Aesthetic
   Inspired by: Linear, Stripe, Gojek, Revolut
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES — DESIGN TOKENS
   ============================================ */
:root {
  /* === BRAND COLORS === */
  --primary: #1e3a8a;
  --primary-light: #1d4ed8;
  --primary-dark: #172554;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  --primary-soft: var(--primary-100);
  --primary-border: var(--primary-200);
  --primary-dark-soft: rgba(30, 58, 138, 0.12);
  --primary-gradient-btn: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);

  /* === NEUTRAL / SURFACE COLORS === */
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-300: #D4D4D4;
  --gray-400: #A3A3A3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --black: #0A0A0A;

  /* === SEMANTIC COLORS === */
  --success: #10B981;
  --success-light: #34D399;
  --success-50: #ECFDF5;
  --success-100: #D1FAE5;
  --success-soft: var(--success-50);
  --success-border: var(--success-100);
  --success-dark: var(--success);

  --danger: #EF4444;
  --danger-light: #F87171;
  --danger-50: #FEF2F2;
  --danger-100: #FEE2E2;

  --warning: #F59E0B;
  --warning-light: #FBBF24;
  --warning-50: #FFFBEB;
  --warning-100: #FEF3C7;

  --info: #3B82F6;
  --info-light: #60A5FA;
  --info-50: #EFF6FF;
  --info-100: #DBEAFE;

  /* === SURFACE & BACKGROUND === */
  --surface: var(--white);
  --surface-raised: var(--white);
  --surface-sunken: #F4F6F9;
  --background: #F4F6F9;
  --background-secondary: #E9ECEF;

  /* === TEXT COLORS === */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-400);
  --text-inverse: var(--white);

  /* === BORDERS === */
  --border: var(--gray-200);
  --border-strong: var(--gray-300);
  --border-focus: var(--primary);

  /* === SHADOWS === */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 4px 14px rgba(30, 58, 138, 0.25);
  --shadow-primary-lg: 0 8px 30px rgba(30, 58, 138, 0.35);
  --shadow-primary-sm: 0 2px 8px rgba(30, 58, 138, 0.15);
  --shadow-orange: var(--shadow-primary);
  --shadow-orange-lg: var(--shadow-primary-lg);
  --shadow-orange-sm: var(--shadow-primary-sm);

  /* === BORDER RADIUS === */
  --radius-2xs: 4px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* === SPACING — 8pt Grid System === */
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-base: var(--space-4);

  /* === TYPOGRAPHY === */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;

  --text-2xs: 10px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13px;
  --text-md: 14px;
  --text-lg: 15px;
  --text-xl: 16px;
  --text-2xl: 18px;
  --text-3xl: 20px;
  --text-4xl: 22px;
  --text-5xl: 24px;
  --text-6xl: 28px;
  --text-7xl: 32px;

  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* === TRANSITIONS === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-base: 200ms var(--ease-out);
  --transition-fast: 100ms var(--ease-out);

  --duration-instant: 50ms;
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 400ms;
  --duration-slowest: 500ms;

  /* === Z-INDEX SCALE === */
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-popover: 60;
  --z-tooltip: 70;
  --z-toast: 80;

  /* === LAYOUT === */
  --header-height: 56px;
  --nav-height: 64px;
  --content-max-width: 480px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  -webkit-appearance: none;
  appearance: none;
}

input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;
}

::selection {
  background-color: var(--primary-200);
  color: var(--primary-900);
}

/* ============================================
   ICON SYSTEM — Universal SVG Defaults
   All SVG icons look crisp at any density,
   never overflow their parent, and have
   sensible defaults. Override per-use with
   inline style or .icon-* utility classes.
   ============================================ */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  max-width: 100%;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: color var(--duration-fast) var(--ease-out),
              transform var(--duration-normal) var(--ease-spring);
}

/* SVG that has fill attribute explicitly keeps it (e.g. WA, FB) */
svg[fill="currentColor"],
svg[fill="solid"],
svg[fill="white"] {
  fill: currentColor;
}

/* SVG sizing tokens */
.icon-2xs { width: 12px; height: 12px; font-size: 12px; }
.icon-xs  { width: 14px; height: 14px; font-size: 14px; }
.icon-sm  { width: 16px; height: 16px; font-size: 16px; }
.icon-md  { width: 18px; height: 18px; font-size: 18px; }
.icon-lg  { width: 20px; height: 20px; font-size: 20px; }
.icon-xl  { width: 22px; height: 22px; font-size: 22px; }
.icon-2xl { width: 24px; height: 24px; font-size: 24px; }
.icon-3xl { width: 28px; height: 28px; font-size: 28px; }
.icon-4xl { width: 32px; height: 32px; font-size: 32px; }

/* ============================================
   MOBILE VIEWPORT — iOS-Safe Container
   ============================================ */
.mobile-viewport {
  width: 100%;
  max-width: var(--content-max-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--background);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.08);
}

@media (min-width: 481px) {
  .mobile-viewport {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ============================================
   APP HEADER — Sticky Modern Header
   ============================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: var(--space-3) var(--space-4);
  padding-top: calc(var(--space-3) + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-inverse);
  letter-spacing: -0.025em;
}

.header-subtitle {
  font-size: var(--text-2xs);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  margin-top: 1px;
  letter-spacing: 0.01em;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}

.header-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.25);
}

.header-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.header-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: var(--text-inverse);
  border-radius: var(--radius-full);
  font-size: var(--text-2xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  line-height: 1;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all var(--duration-fast) var(--ease-out);
}

.header-avatar:active {
  transform: scale(0.95);
}

/* ============================================
   APP CONTENT — Scrollable Area
   ============================================ */
.app-content {
  flex: 1;
  overflow: visible;
  padding: var(--space-4);
  padding-bottom: calc(var(--nav-height) + var(--space-6) + env(safe-area-inset-bottom, 0px));
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.app-content::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ============================================
   BOTTOM NAVIGATION — Modern Tab Bar
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--content-max-width);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-2) var(--space-4);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: var(--z-fixed);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  min-width: 56px;
  min-height: 48px;
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active .nav-indicator {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.nav-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.nav-item.active .nav-svg {
  stroke-width: 2.5;
  transform: translateY(-1px);
}

.nav-label {
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav-item.active .nav-label {
  font-weight: 700;
}

/* ============================================
   CARDS — Modern Surface Components
   ============================================ */
.card,
.card-base {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card:active,
.card-base:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-md);
}

.card-interactive,
.glass-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.card-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-md);
}

.card-highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-color: transparent;
  color: var(--text-inverse);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   GREETING CARD — Personalized Welcome
   ============================================ */
.greeting-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-primary-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.greeting-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.greeting-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.greeting-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.greeting-avatar svg {
  width: 20px;
  height: 20px;
  color: var(--white);
  flex-shrink: 0;
}

/* Action icons - quick action buttons */
.action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--primary-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.action-icon:hover {
  background: var(--primary-200);
  transform: scale(1.05);
}

.action-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.greeting-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-inverse);
  letter-spacing: -0.02em;
}

.greeting-sub {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  margin-top: var(--space-1);
  font-weight: 500;
}

/* ============================================
   METRICS GRID — Dashboard Statistics
   ============================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.metric-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.metric-card:active::before {
  opacity: 1;
}

.metric-card:active {
  transform: scale(0.98);
}

.metric-card.highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-color: transparent;
  color: var(--text-inverse);
  box-shadow: var(--shadow-primary);
}

.metric-card.highlight::before {
  display: none;
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}

.metric-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.metric-icon.icon-orange { background: var(--primary-100); color: var(--primary); }
.metric-icon.icon-blue { background: var(--info-100); color: var(--info); }
.metric-icon.icon-green { background: var(--success-100); color: var(--success); }
.metric-icon.icon-red { background: var(--danger-100); color: var(--danger); }
.metric-icon.icon-yellow { background: var(--warning-100); color: var(--warning); }

.metric-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.metric-card.highlight .metric-value {
  color: var(--text-inverse);
}

.metric-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: var(--space-1);
}

.metric-card.highlight .metric-label {
  color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.section-action {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.section-action:active {
  background: var(--primary-50);
}

.section-action svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ============================================
   LIST ITEMS — Modern List Design
   ============================================ */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--duration-fast) var(--ease-out);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-interactive {
  cursor: pointer;
  padding: var(--space-3);
  margin: 0 calc(-1 * var(--space-4));
  border-radius: 0;
  border-bottom: none;
}

.list-item-interactive:active {
  background: var(--primary-50);
}

.list-item-interactive:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.list-item-interactive:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-bottom: none;
}

.list-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.list-icon.icon-orange,
.list-icon.orange { background: var(--primary-100); color: var(--primary); }
.list-icon.icon-green,
.list-icon.green { background: var(--success-100); color: var(--success); }
.list-icon.icon-red,
.list-icon.red { background: var(--danger-100); color: var(--danger); }
.list-icon.icon-blue,
.list-icon.blue { background: var(--info-100); color: var(--info); }
.list-icon.icon-yellow,
.list-icon.yellow { background: var(--warning-100); color: var(--warning); }
.list-icon.icon-gray,
.list-icon.gray { background: var(--gray-100); color: var(--gray-500); }

.list-body {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-subtitle,
.list-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.list-meta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.list-value {
  flex-shrink: 0;
  text-align: right;
}

.list-amount {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.list-amount.amount-success { color: var(--success); }
.list-amount.amount-danger { color: var(--danger); }

/* ============================================
   ICON BOX — Generic Icon Container
   ============================================ */
.icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-box.rounded-full {
  border-radius: var(--radius-full);
}

.icon-box.icon-box-orange { background: var(--primary-100); color: var(--primary); }
.icon-box.icon-box-green { background: var(--success-100); color: var(--success); }
.icon-box.icon-box-red { background: var(--danger-100); color: var(--danger); }
.icon-box.icon-box-blue { background: var(--info-100); color: var(--info); }
.icon-box.icon-box-yellow { background: var(--warning-100); color: var(--warning); }
.icon-box.icon-box-gray { background: var(--gray-100); color: var(--gray-500); }

.icon-box.flex-shrink-0 {
  flex-shrink: 0;
}

/* When icon-box has custom size via inline style */
.icon-box > svg {
  flex-shrink: 0;
}

/* ============================================
   BADGES & STATUS INDICATORS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

.badge-primary { background: var(--primary-100); color: var(--primary); }
.badge-success { background: var(--success-100); color: var(--success); }
.badge-danger { background: var(--danger-100); color: var(--danger); }
.badge-warning { background: var(--warning-100); color: var(--warning); }
.badge-info { background: var(--info-100); color: var(--info); }
.badge-neutral { background: var(--gray-100); color: var(--gray-600); }

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-status.paid, .badge-status.approved, .badge-status.aktif, .badge-status.published {
  background: var(--success-100);
  color: var(--success);
}

.badge-status.unpaid, .badge-status.pending, .badge-status.rejected {
  background: var(--danger-100);
  color: var(--danger);
}

.badge-status.partial, .badge-status.draft {
  background: var(--warning-100);
  color: var(--warning);
}

.badge-status.nonaktif {
  background: var(--gray-100);
  color: var(--gray-500);
}

/* ============================================
   BUTTONS — Premium Button System
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn:active::before {
  opacity: 1;
}

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-inverse);
  box-shadow: var(--shadow-primary-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-primary);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:active {
  background: var(--primary-50);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-outline-secondary:active {
  background: var(--gray-50);
  border-color: var(--border-strong);
}

.btn-secondary { background: var(--gray-100); color: var(--text-primary); }
.btn-secondary:active { background: var(--gray-200); }
.btn-success { background: var(--success); color: var(--text-inverse); }
.btn-success:active { background: var(--success-light); }
.btn-danger { background: var(--danger); color: var(--text-inverse); }
.btn-danger:active { background: var(--danger-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  min-height: auto;
  padding: var(--space-2);
}

.btn-ghost:active {
  background: var(--gray-100);
}

.btn-sm {
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

.btn-xs {
  min-height: 32px;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.btn-xs svg {
  width: 14px;
  height: 14px;
}

.btn-full { width: 100%; }

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn-icon.btn-sm { width: 40px; height: 40px; }
.btn-icon.btn-xs { width: 32px; height: 32px; }

.btn-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--space-4));
  right: var(--space-4);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient-btn);
  color: var(--text-inverse);
  box-shadow: var(--shadow-primary-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-fixed);
  transition: all var(--duration-normal) var(--ease-spring);
  text-decoration: none;
}

.btn-fab:active {
  transform: scale(0.9);
}

.btn-fab svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ============================================
   FORMS — Modern Input Components
   ============================================ */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  height: 52px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--text-md);
  color: var(--text-primary);
  background: var(--surface);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.form-control:disabled {
  background: var(--gray-50);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.form-control-error {
  border-color: var(--danger);
}

.form-control-error:focus {
  box-shadow: 0 0 0 4px var(--danger-100);
}

.form-helper {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--danger);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23737373'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 18px;
  padding-right: var(--space-10);
}

textarea.form-control {
  height: auto;
  min-height: 100px;
  resize: vertical;
  padding-top: var(--space-3);
}

.form-row {
  display: flex;
  gap: var(--space-3);
}

.form-row > * {
  flex: 1;
  min-width: 0;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-control {
  padding-left: var(--space-10);
}

.input-group-icon {
  position: absolute;
  left: var(--space-3);
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.input-group .form-control:focus ~ .input-group-icon,
.input-group:focus-within .input-group-icon {
  color: var(--primary);
}

/* ============================================
   INPUT WRAPPER - Ultra Premium Input Design
   ============================================ */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: var(--space-3);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.input-prefix svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-control.with-prefix {
  padding-left: calc(var(--space-3) + 18px + var(--space-2));
}

.input-wrapper:focus-within .input-prefix {
  color: var(--primary);
}

.input-wrapper.has-error .input-prefix {
  color: var(--danger);
}

.input-wrapper.has-error .form-control {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-100);
}

/* ============================================
   FORM CUSTOM — Premium Form with Icon
   ============================================ */
.form-group-custom {
  margin-bottom: var(--space-4);
}

.form-label-custom {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  letter-spacing: -0.005em;
}

.input-group-custom {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control-custom {
  width: 100%;
  height: 48px;
  padding: var(--space-3) var(--space-4) var(--space-3) 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--text-md);
  color: var(--text-primary);
  background: var(--surface);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
  font-family: inherit;
}

.form-control-custom::placeholder {
  color: var(--text-tertiary);
}

.form-control-custom:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.form-control-custom.form-control-lg {
  height: 52px;
  font-size: var(--text-md);
}

.form-control-custom.form-select-custom {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23737373'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 18px;
  padding-right: var(--space-10);
}

.input-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.input-group-custom:focus-within .input-icon {
  color: var(--primary);
}

.input-group-custom textarea ~ .input-icon {
  top: 14px;
  transform: none;
}

/* ============================================
   INFO ROW — Used in registration list/detail
   ============================================ */
.info-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.info-row svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

/* ============================================
   DETAIL ROW — Used in detail views
   ============================================ */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--gray-50);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--gray-500);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--gray-400);
}

.detail-value {
  font-weight: 700;
  color: var(--gray-800);
  text-align: right;
}

/* ============================================
   BACK BUTTON
   ============================================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  margin-bottom: var(--space-3);
}

.back-btn:active {
  opacity: 0.7;
  transform: scale(0.97);
}

.back-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   FILE UPLOAD INPUT — Transparent overlay
   ============================================ */
.proof-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
  position: relative;
  margin-bottom: var(--space-4);
}

.search-bar .form-control {
  padding-left: var(--space-10);
  padding-right: var(--space-4);
  height: 48px;
}

.search-bar-icon,
.search-bar .search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar-icon svg,
.search-bar .search-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.search-bar-clear {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.search-bar-clear:active {
  background: var(--gray-300);
  transform: translateY(-50%) scale(0.9);
}

.search-bar-clear svg {
  width: 12px;
  height: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ============================================
   TABS — Modern Tab Pills
   ============================================ */
.tab-pills {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-4);
  -webkit-overflow-scrolling: touch;
}

.tab-pills::-webkit-scrollbar {
  display: none;
}

.tab-pill {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--gray-100);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.tab-pill:active {
  transform: scale(0.96);
}

.tab-pill.active {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-primary-sm);
}

.tab-pill-link {
  padding: 0;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
}

.tab-pill-link.active {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: none;
}

/* ============================================
   ALERTS — Modern Notification Cards
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-4);
  border: 1px solid transparent;
  line-height: 1.5;
}

.alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.alert-success {
  background: var(--success-50);
  color: var(--success);
  border-color: var(--success-100);
}

.alert-danger,
.alert-error {
  background: var(--danger-50);
  color: var(--danger);
  border-color: var(--danger-100);
}

.alert-warning {
  background: var(--warning-50);
  color: var(--warning);
  border-color: var(--warning-100);
}

.alert-info {
  background: var(--info-50);
  color: var(--info);
  border-color: var(--info-100);
}

/* ============================================
   EMPTY STATE — Placeholder Design
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.empty-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-description,
.empty-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 280px;
  margin: 0 auto;
}

/* ============================================
   DIVIDERS
   ============================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
  border: none;
}

.divider-dashed {
  height: 0;
  border: none;
  border-top: 1.5px dashed var(--border);
  margin: var(--space-4) 0;
}

/* ============================================
   AUTH PAGES — Login & Register
   ============================================ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 50%, var(--gray-50) 100%);
  display: flex;
  flex-direction: column;
  padding: calc(var(--space-6) + env(safe-area-inset-top, 0px)) var(--space-4) var(--space-6);
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.auth-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  border: 2px solid var(--primary-200);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary-sm);
}

.auth-brand-icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
  flex-shrink: 0;
}

.auth-brand-name {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  margin-top: var(--space-2);
}

.auth-brand-name span {
  color: var(--primary);
}

.auth-tagline {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: var(--space-1);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
  flex: 1;
  max-width: 100%;
}

.auth-card-header {
  margin-bottom: var(--space-5);
}

.auth-card .auth-title {
  margin-bottom: var(--space-2);
}

.auth-form .form-group {
  margin-bottom: var(--space-4);
}

.auth-form .form-label {
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
}

.auth-form .btn {
  height: 52px;
  font-size: var(--text-md);
  letter-spacing: 0.01em;
}

.auth-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-1);
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  line-height: var(--leading-relaxed);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:active {
  text-decoration: underline;
}

/* ============================================
   CHECKBOX & RADIO
   ============================================ */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"],
.checkbox-wrapper input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-label a {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  margin-left: -8px;
  border: 2px solid var(--surface);
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* ============================================
   CHIPS / TAGS
   ============================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--gray-100);
  color: var(--text-secondary);
  white-space: nowrap;
}

.chip-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ============================================
   UPLOAD AREA
   ============================================ */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  background: var(--gray-50);
  position: relative;
}

.upload-area:active, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-50);
}

.upload-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  color: var(--text-tertiary);
  transition: all var(--duration-normal) var(--ease-out);
}

.upload-area:active .upload-icon {
  background: var(--primary-100);
  color: var(--primary);
}

.upload-icon svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.upload-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.upload-text span {
  color: var(--primary);
}

.upload-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.upload-area input[type="file"] {
  display: none;
}

/* ============================================
   PAYMENT CARD — Specific Component
   ============================================ */
.payment-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  margin-bottom: var(--space-3);
}

.payment-card.urgent {
  border-color: var(--danger);
  border-left-width: 4px;
}

.payment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.payment-period {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
}

.payment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.payment-meta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.payment-amount {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.payment-due {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--border);
  margin-bottom: var(--space-3);
}

.payment-due svg {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.payment-card.urgent .payment-due {
  color: var(--danger);
}

.payment-card.urgent .payment-due svg {
  color: var(--danger);
}

/* ============================================
   SCHEDULE CARD — Specific Component
   ============================================ */
.schedule-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  margin-bottom: var(--space-3);
}

.schedule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.schedule-time {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary);
}

.schedule-time svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.schedule-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.schedule-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--border);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.schedule-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.schedule-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ============================================
   PROFILE CARD
   ============================================ */
.profile-card {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-3);
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-primary);
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-fast) var(--ease-out);
  border: none;
}

.profile-avatar-edit:active {
  transform: scale(0.9);
}

.profile-avatar-edit svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.profile-name {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.profile-meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1a1a1a;
    --surface-raised: #262626;
    --surface-sunken: #0f0f0f;
    --background: #0f0f0f;
    --background-secondary: #171717;
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-tertiary: #737373;
    --border: #2d2d2d;
    --border-strong: #3d3d3d;
    --white: #ffffff;
  }
}

.dark-theme {
  --surface: #1a1a1a;
  --surface-raised: #262626;
  --surface-sunken: #0f0f0f;
  --background: #0f0f0f;
  --background-secondary: #171717;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;
  --border: #2d2d2d;
  --border-strong: #3d3d3d;
  --white: #ffffff;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  border-radius: var(--radius-sm);
}

.skeleton-text.sm { width: 40%; }
.skeleton-text.md { width: 70%; }
.skeleton-text.lg { width: 90%; }

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-xl);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade {
  animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

.animate-fade-up {
  animation: fadeInUp var(--duration-slow) var(--ease-out) forwards;
}

.animate-fade-scale {
  animation: fadeInScale var(--duration-slow) var(--ease-out) forwards;
}

.animate-slide-right {
  animation: slideInRight var(--duration-slow) var(--ease-out) forwards;
}

.animate-bounce {
  animation: bounce 0.6s var(--ease-out);
}

.animate-pulse {
  animation: pulse 1.5s infinite;
}

.animate-spin {
  animation: spin 0.6s linear infinite;
}

.animate-scale {
  animation: fadeInScale var(--duration-slow) var(--ease-out) forwards;
}

.animate-slide {
  animation: slideInRight var(--duration-slow) var(--ease-out) forwards;
}

.stagger-1 { animation-delay: 0ms; }
.stagger-2 { animation-delay: 60ms; }
.stagger-3 { animation-delay: 120ms; }
.stagger-4 { animation-delay: 180ms; }
.stagger-5 { animation-delay: 240ms; }
.stagger-6 { animation-delay: 300ms; }

.animate-bounce-in {
  animation: fadeInUp var(--duration-slow) var(--ease-out) forwards;
}

/* ============================================
   TRANSITIONS — Reusable Interactions
   ============================================ */
.transition-press {
  transition: transform var(--duration-fast) var(--ease-out);
}

.transition-press:active {
  transform: scale(0.97);
}

.animate-hover {
  transition: all var(--duration-fast) var(--ease-out);
}

.animate-hover:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-tertiary); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.font-semibold { font-weight: 600; }
.fw-700 { font-weight: 700; }
.font-bold { font-weight: 700; }
.fw-800 { font-weight: 800; }
.font-extrabold { font-weight: 800; }

.text-2xs { font-size: var(--text-2xs); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-body { font-size: var(--text-md); }
.text-body-medium { font-size: var(--text-md); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-title { font-size: var(--text-lg); }
.text-h2 { font-size: var(--text-3xl); }
.text-caption { font-size: var(--text-sm); }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-xs { gap: var(--space-1); }
.gap-sm { gap: var(--space-2); }
.gap-md { gap: var(--space-3); }
.gap-lg { gap: var(--space-4); }
.gap-base { gap: var(--space-4); }
.gap-xl { gap: var(--space-5); }

.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-xs { margin-top: var(--space-1); }
.mt-sm { margin-top: var(--space-2); }
.mt-md { margin-top: var(--space-3); }
.mt-lg { margin-top: var(--space-4); }
.mt-xl { margin-top: var(--space-5); }
.mt-2xl { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-xs { margin-bottom: var(--space-1); }
.mb-sm { margin-bottom: var(--space-2); }
.mb-md { margin-bottom: var(--space-3); }
.mb-lg { margin-bottom: var(--space-4); }
.mb-xl { margin-bottom: var(--space-5); }
.mb-2xl { margin-bottom: var(--space-6); }

.p-0 { padding: 0; }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-xl { padding: var(--space-5); }

.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.pb-xs { padding-bottom: var(--space-1); }
.pt-xs { padding-top: var(--space-1); }

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 360px) {
  :root {
    --text-md: 12px;
    --text-lg: 13px;
    --text-xl: 14px;
  }

  .card,
  .card-base {
    padding: var(--space-3);
    border-radius: var(--radius-lg);
  }

  .btn {
    min-height: 44px;
    padding: var(--space-2) var(--space-4);
  }

  .form-control {
    height: 48px;
  }
}

@media (min-width: 481px) {
  .app-content {
    padding: var(--space-5);
    padding-bottom: calc(var(--nav-height) + var(--space-6) + env(safe-area-inset-bottom, 0px));
  }

  .btn-fab {
    right: calc((100vw - var(--content-max-width)) / 2 + var(--space-4));
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .mobile-viewport {
    max-width: 100%;
    box-shadow: none;
    height: auto;
  }

  .bottom-nav,
  .app-header,
  .btn-fab {
    display: none !important;
  }

  .app-content {
    padding: 0;
    overflow: visible;
  }
}