/* public/assets/css/app.css */
/* GoTo — Ultra-Premium Mobile-First OS Styling */

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

:root {
  --primary: #0F172A;
  --primary-light: #1E293B;
  --primary-subtle: #334155;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-light: #FFF7ED;
  --accent-gradient: linear-gradient(135deg, #FF6B00 0%, #F97316 50%, #EA580C 100%);
  --navy-gradient: linear-gradient(145deg, #0B132B 0%, #0F172A 60%, #1E293B 100%);
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --border: #E2E8F0;
  --border-focus: #CBD5E1;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --purple: #8B5CF6;
  --purple-bg: #F5F3FF;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-floating: 0 10px 24px -2px rgba(249, 115, 22, 0.45), 0 4px 12px rgba(249, 115, 22, 0.25);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: calc(92px + var(--safe-bottom));
}

/* App Header (Glassmorphic Mobile Navigation Bar) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  padding: 12px 18px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--navy-gradient);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.brand-icon span {
  color: var(--accent);
}

.brand-info h1 {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.brand-info .tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: -0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  background: #F8FAFC;
  border-color: var(--border-focus);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* Container */
.container {
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 16px;
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
    padding-left: 280px;
  }
  .container {
    max-width: 1100px;
    padding: 32px 40px;
  }
  .app-header {
    display: none;
  }
  .bottom-nav {
    display: none !important;
  }
  .desktop-sidebar {
    display: flex !important;
  }
  .desktop-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .desktop-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* Desktop Sidebar */
.desktop-sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background-color: var(--primary);
  color: #FFFFFF;
  flex-direction: column;
  padding: 24px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 50;
  overflow-y: auto;
}

.desktop-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #FFFFFF;
  margin-bottom: 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #94A3B8;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s ease;
}

.sidebar-link:hover, .sidebar-link.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.sidebar-link.active {
  background-color: var(--accent);
  color: #FFFFFF;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748B;
  margin: 18px 0 6px 12px;
}

/* Modern Mobile Bottom Navigation Dock (5 slots with elevated center capture) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.05);
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.2px;
  gap: 3px;
  width: 58px;
  height: 52px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
}

.bottom-nav .nav-item.active {
  color: var(--accent);
}

.bottom-nav .nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 14px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 3px;
}

.bottom-nav .nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
  transition: transform 0.2s ease;
}

.bottom-nav .nav-item:active svg {
  transform: scale(0.88);
}

/* Center Elevated Hero Quick Capture Button (Never Blocks Content) */
.bottom-nav .nav-capture-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -2px rgba(249, 115, 22, 0.45);
  border: 3px solid #FFFFFF;
  cursor: pointer;
  margin-top: -24px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  flex-shrink: 0;
}

.bottom-nav .nav-capture-btn:active {
  transform: scale(0.90);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

/* Cards & Surface Design */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--border-focus);
}

/* Executive Top 3 Focus Hero Card */
.focus-hero-card {
  background: var(--navy-gradient);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  color: #FFFFFF;
  margin-bottom: 20px;
  box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.focus-hero-card::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35) 0%, rgba(249, 115, 22, 0) 70%);
  pointer-events: none;
}

.focus-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(249, 115, 22, 0.2);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.focus-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.2;
}

.focus-subtitle {
  font-size: 13px;
  color: #94A3B8;
  margin-top: 4px;
  margin-bottom: 18px;
  font-weight: 500;
}

.focus-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.focus-item:last-child {
  margin-bottom: 0;
}

.focus-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

/* Stats Metric Grid (2x2 on Mobile, Zero Truncation) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-value {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Horizontal Filter Tabs (Smooth Scrolling) */
.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tab.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.filter-tab:active {
  transform: scale(0.96);
}

/* Task Checkbox & Items */
.task-checkbox-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-focus);
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.task-checkbox-btn:hover {
  border-color: var(--accent);
}

.task-checkbox-btn.checked {
  background: var(--success);
  border-color: var(--success);
}

.task-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-card.is-completed {
  opacity: 0.65;
  background: #F8FAFC;
}

.task-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.task-body {
  flex: 1;
  min-width: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-urgent {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #FECACA;
}

.badge-high {
  background: #FFF7ED;
  color: #EA580C;
  border: 1px solid #FFEDD5;
}

.badge-normal {
  background: #F1F5F9;
  color: #475569;
}

.badge-low {
  background: #F8FAFC;
  color: #94A3B8;
}

.badge-inbox {
  background: #EFF6FF;
  color: #2563EB;
}

.badge-planned {
  background: #F1F5F9;
  color: #475569;
}

.badge-in_progress {
  background: #EFF6FF;
  color: #2563EB;
}

.badge-completed {
  background: var(--success-bg);
  color: var(--success);
}

.workspace-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  min-height: 42px;
  line-height: 1;
}

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

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-accent {
  background: var(--accent-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.28);
}

.btn-secondary {
  background: #FFFFFF;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: var(--border-focus);
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-full {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* Modals & Bottom Sheets */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.bottom-sheet {
  background: #FFFFFF;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 600px;
  padding: 16px 20px calc(24px + var(--safe-bottom));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

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

.sheet-handle {
  width: 36px;
  height: 4px;
  background: #CBD5E1;
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.4px;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
}

.alert-success {
  background: var(--success-bg);
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.alert-error {
  background: var(--danger-bg);
  color: #991B1B;
  border: 1px solid #FECACA;
}
