/* ============================================
   SV PRO — Professional Mobile App Design System
   390x844 · iPhone/Android
   Think: Uber Driver + Google Calendar + Linear Mobile
   Speed-first. One-hand operation. 2 taps max.
   ============================================ */

:root {
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Roboto', sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--gray-900); background: var(--gray-50); min-height: 100vh; }

/* === MOBILE FRAME === */
.mobile-frame {
  width: 390px; min-height: 844px; margin: 20px auto;
  background: var(--white); border-radius: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}

/* === STATUS BAR === */
.status-bar { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; font-size: 12px; font-weight: 600; }
.status-time { font-size: 14px; font-weight: 600; }
.status-icons { display: flex; gap: 4px; font-size: 12px; }

/* === SCREEN CONTENT === */
.screen { flex: 1; overflow-y: auto; padding-bottom: 80px; }

/* === BOTTOM NAV === */
.bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px; background: var(--white);
  border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; padding: 0 8px;
  padding-bottom: 16px;
}
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; cursor: pointer; }
.bottom-nav-icon { font-size: 20px; }
.bottom-nav-label { font-size: 10px; font-weight: 500; color: var(--gray-400); }
.bottom-nav-item.active .bottom-nav-label { color: var(--gray-900); font-weight: 600; }
.bottom-nav-item.active .bottom-nav-icon { transform: scale(1.1); }

/* === HEADER === */
.app-header { padding: 0 20px 16px; }
.app-greeting { font-size: 13px; color: var(--gray-500); }
.app-title { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; margin-top: 2px; }

/* === CARDS === */
.m-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 16px; margin: 0 16px 12px; }
.m-card-dark { background: var(--gray-900); color: var(--white); border: none; }
.m-card-title { font-size: 12px; font-weight: 600; color: var(--gray-500); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.m-card-dark .m-card-title { color: var(--gray-400); }

/* === KPI ROW === */
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; margin-bottom: 16px; }
.m-kpi { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 14px; }
.m-kpi-label { font-size: 11px; color: var(--gray-500); font-weight: 500; }
.m-kpi-value { font-size: 22px; font-weight: 700; margin-top: 2px; }
.m-kpi-sub { font-size: 10px; color: var(--gray-400); margin-top: 2px; }

/* === SCHEDULE ITEM === */
.m-schedule { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-50); }
.m-schedule:last-child { border-bottom: none; }
.m-schedule-time { width: 48px; font-size: 12px; font-weight: 600; color: var(--gray-500); text-align: right; padding-top: 2px; }
.m-schedule-bar { width: 3px; border-radius: 2px; background: var(--gray-200); }
.m-schedule-bar.now { background: var(--gray-900); }
.m-schedule-info { flex: 1; }
.m-schedule-title { font-size: 14px; font-weight: 600; }
.m-schedule-meta { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* === ACTIVITY CARD === */
.m-activity { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0 16px 8px; background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); }
.m-activity-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gray-200); flex-shrink: 0; }
.m-activity-info { flex: 1; }
.m-activity-name { font-size: 14px; font-weight: 600; }
.m-activity-detail { font-size: 11px; color: var(--gray-400); margin-top: 1px; }

/* === BADGE === */
.m-badge { display: inline-flex; padding: 3px 10px; border-radius: var(--radius-full); font-size: 10px; font-weight: 600; }
.m-badge-dark { background: var(--gray-900); color: var(--white); }
.m-badge-light { background: var(--gray-100); color: var(--gray-600); }
.m-badge-warning { background: #fef3c7; color: #92400e; }

/* === BUTTON === */
.m-btn { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font); font-weight: 600; border: none; cursor: pointer; border-radius: var(--radius); }
.m-btn-primary { background: var(--gray-900); color: var(--white); padding: 14px; font-size: 15px; width: 100%; }
.m-btn-secondary { background: var(--white); color: var(--gray-800); border: 1.5px solid var(--gray-200); padding: 12px 20px; font-size: 14px; }
.m-btn-sm { padding: 8px 14px; font-size: 12px; }
.m-btn-ghost { background: transparent; color: var(--gray-600); padding: 10px 14px; font-size: 13px; }

/* === FAB === */
.fab { position: absolute; bottom: 96px; right: 20px; width: 56px; height: 56px; background: var(--gray-900); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); cursor: pointer; z-index: 50; }

/* === SECTION === */
.m-section { padding: 0 16px; margin-bottom: 20px; }
.m-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.m-section-title { font-size: 16px; font-weight: 700; }
.m-section-action { font-size: 12px; color: var(--gray-400); font-weight: 500; }

/* === TIMELINE === */
.m-timeline { padding: 0 16px; }
.m-timeline-step { display: flex; gap: 12px; padding-bottom: 20px; position: relative; }
.m-timeline-step::before { content: ''; position: absolute; left: 11px; top: 28px; bottom: 0; width: 2px; background: var(--gray-200); }
.m-timeline-step:last-child::before { display: none; }
.m-timeline-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; z-index: 1; }
.m-timeline-dot.done { background: var(--gray-700); color: var(--white); }
.m-timeline-dot.active { background: var(--gray-900); color: var(--white); width: 28px; height: 28px; margin-left: -2px; }
.m-timeline-content { flex: 1; }
.m-timeline-label { font-size: 13px; font-weight: 600; }
.m-timeline-sub { font-size: 11px; color: var(--gray-400); }

/* === INCOME === */
.m-income-chart { height: 120px; background: var(--gray-100); border-radius: var(--radius); display: flex; align-items: flex-end; padding: 12px; gap: 6px; }
.m-income-bar { flex: 1; background: var(--gray-300); border-radius: 4px 4px 0 0; min-height: 8px; }
.m-income-bar.today { background: var(--gray-900); }

/* === TOGGLE === */
.m-toggle { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); margin: 0 16px 8px; }
.m-toggle-label { font-size: 14px; font-weight: 500; }
.m-toggle-switch { width: 44px; height: 24px; background: var(--gray-200); border-radius: 12px; position: relative; cursor: pointer; }
.m-toggle-switch.on { background: var(--gray-900); }
.m-toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--white); border-radius: 50%; transition: transform 150ms; }
.m-toggle-switch.on::after { transform: translateX(20px); }

/* === UTILITY === */
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.flex { display: flex; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
