/* =============================================
   ADVENTURE ARCHITECT - Mobile App CSS
   Material Design inspired, native-feel
   ============================================= */

/* ---- CSS Variables ---- */
:root {
  --primary: #009688;
  --primary-dark: #00796B;
  --primary-light: #B2DFDB;
  --secondary: #4CAF50;
  --secondary-dark: #388E3C;
  --accent: #FFC107;
  --accent-dark: #F57F17;

  --bg: #F5F7F6;
  --surface: #FFFFFF;
  --surface-variant: #F0F4F3;
  --on-surface: #1A1A1A;
  --on-surface-muted: #6B7280;
  --on-surface-subtle: #9CA3AF;
  --border: #E5E7EB;

  --error: #EF4444;
  --success: #4CAF50;
  --warning: #FFC107;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.08);
  --shadow-fab: 0 6px 20px rgba(0,150,136,0.4);

  --nav-height: 64px;
  --appbar-height: 60px;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 360ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #121212;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
}

/* ---- App Shell ---- */
#app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

/* ---- Top App Bar ---- */
#app-bar {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  height: var(--appbar-height);
  background: var(--primary);
  color: #fff;
  padding: 0 8px 0 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#app-bar-title {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
  color: #fff;
}

#app-bar-back {
  color: #fff;
  margin-right: 4px;
}

#app-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 40px;
  justify-content: flex-end;
}

/* ---- Icon Buttons ---- */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  transition: background var(--transition);
  flex-shrink: 0;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.icon-btn:active {
  background: rgba(255,255,255,0.15);
}

/* ---- Screens Container ---- */
#screens {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ---- Screens ---- */
.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition);
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.screen.slide-screen {
  transform: translateX(100%);
}

.screen.slide-screen.active {
  transform: translateX(0);
}

.screen-content {
  padding: 12px 16px 96px;
  min-height: 100%;
}

/* ---- Bottom Nav ---- */
#bottom-nav {
  display: flex;
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--on-surface-subtle);
  padding: 6px 4px;
  transition: color var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-sm);
}

.nav-item:active::before {
  opacity: 0.08;
}

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

.nav-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-spring);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: font-weight var(--transition);
}

.nav-item.active .nav-label {
  font-weight: 600;
}

/* Active nav indicator pill */
.nav-item.active::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

/* ---- FAB ---- */
.fab {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  transition: transform var(--transition-spring), box-shadow var(--transition);
  z-index: 50;
}

.fab svg {
  width: 24px;
  height: 24px;
}

.fab:active {
  transform: scale(0.92);
  box-shadow: 0 3px 10px rgba(0,150,136,0.35);
}

/* ---- Greeting Card ---- */
.greeting-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  color: #fff;
}

.greeting-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.greeting-sub {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.greeting-main {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.greeting-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.greeting-icon svg {
  width: 28px;
  height: 28px;
}

/* ---- Stats Row ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--on-surface-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ---- Section Header ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 4px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.1px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  font-family: inherit;
}

/* ---- Horizontal Scroll (Upcoming Cards) ---- */
.horizontal-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.trip-card {
  flex-shrink: 0;
  width: 180px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.trip-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-md);
}

.trip-card-img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.trip-card-body {
  padding: 10px 12px 12px;
}

.trip-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.trip-card-dest {
  font-size: 11px;
  color: var(--on-surface-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 6px;
}

.trip-card-dest svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.trip-card-date {
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
}

/* ---- Quick Actions ---- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 6px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--on-surface-muted);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.quick-action-btn:active {
  transform: scale(0.95);
}

.qa-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qa-icon svg {
  width: 18px;
  height: 18px;
}

.qa-teal { background: rgba(0,150,136,0.12); color: var(--primary); }
.qa-green { background: rgba(76,175,80,0.12); color: var(--secondary); }
.qa-amber { background: rgba(255,193,7,0.15); color: #F57F17; }
.qa-purple { background: rgba(156,39,176,0.12); color: #7B1FA2; }

/* ---- Journey List Items ---- */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.journey-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.journey-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.journey-item:active::before { opacity: 0.04; }
.journey-item:active { transform: scale(0.99); }

.journey-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  color: #fff;
  font-weight: 700;
}

.journey-info {
  flex: 1;
  min-width: 0;
}

.journey-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.journey-item-dest {
  font-size: 12px;
  color: var(--on-surface-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.journey-item-dest svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.journey-item-date {
  font-size: 11px;
  color: var(--on-surface-subtle);
}

.journey-chevron {
  color: var(--on-surface-subtle);
  flex-shrink: 0;
}

.journey-chevron svg {
  width: 18px;
  height: 18px;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-top: 4px;
}

.badge-upcoming {
  background: rgba(255,193,7,0.15);
  color: #B45309;
}

.badge-ongoing {
  background: rgba(0,150,136,0.12);
  color: var(--primary-dark);
}

.badge-completed {
  background: rgba(76,175,80,0.12);
  color: var(--secondary-dark);
}

/* ---- Search Bar ---- */
.search-bar-wrap {
  margin-bottom: 12px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-full);
  padding: 0 12px;
  height: 44px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  gap: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,150,136,0.12);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--on-surface-subtle);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--on-surface);
  outline: none;
}

.search-input::placeholder {
  color: var(--on-surface-subtle);
}

.search-clear {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--on-surface-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear svg {
  width: 16px;
  height: 16px;
}

/* ---- Filter Chips ---- */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

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

.chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,150,136,0.3);
}

/* ---- Empty State ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.empty-icon svg {
  width: 36px;
  height: 36px;
  color: var(--on-surface-subtle);
}

.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--on-surface);
}

.empty-subtitle {
  font-size: 13px;
  color: var(--on-surface-muted);
  max-width: 240px;
  line-height: 1.6;
}

.empty-btn {
  margin-top: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}

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

/* ---- Packing Screen ---- */
.packing-journey-selector {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.selector-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.selector-wrap {
  position: relative;
}

.journey-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface-variant);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--on-surface);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.journey-select:focus {
  border-color: var(--primary);
}

.select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--on-surface-muted);
  pointer-events: none;
}

/* Packing Progress */
.packing-progress-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

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

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
}

.progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.progress-bar-wrap {
  height: 8px;
  background: var(--surface-variant);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Packing Categories */
.packing-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.packing-category {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition);
}

.category-header:active {
  background: var(--surface-variant);
}

.category-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(0,150,136,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
}

.category-count {
  font-size: 11px;
  color: var(--on-surface-muted);
}

.category-chevron {
  width: 20px;
  height: 20px;
  color: var(--on-surface-subtle);
  transition: transform var(--transition);
}

.packing-category.collapsed .category-chevron {
  transform: rotate(-90deg);
}

.category-items {
  border-top: 1px solid var(--border);
}

.packing-category.collapsed .category-items {
  display: none;
}

.packing-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.packing-item:last-child {
  border-bottom: none;
}

.packing-item:active {
  background: var(--surface-variant);
}

.packing-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.packing-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.packing-checkbox.checked::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.packing-item-label {
  flex: 1;
  font-size: 13px;
  color: var(--on-surface);
  transition: color var(--transition);
}

.packing-item-label.done {
  text-decoration: line-through;
  color: var(--on-surface-subtle);
}

.packing-item-qty {
  font-size: 11px;
  color: var(--on-surface-muted);
  background: var(--surface-variant);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.packing-item-delete {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--on-surface-subtle);
  cursor: pointer;
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
}

.packing-item-delete:active {
  color: var(--error);
  background: rgba(239,68,68,0.08);
}

.packing-item-delete svg {
  width: 16px;
  height: 16px;
}

/* ---- Diary Entries ---- */
.diary-entry-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.diary-entry-card:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-md);
}

.diary-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.diary-mood-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.diary-card-meta {
  flex: 1;
  min-width: 0;
}

.diary-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diary-card-date {
  font-size: 12px;
  color: var(--on-surface-muted);
}

.diary-card-journey {
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
  margin-top: 2px;
}

.diary-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.diary-card-content {
  font-size: 13px;
  color: var(--on-surface-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Journey Detail ---- */
.detail-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 24px 20px 20px;
  color: #fff;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin: -12px -16px 20px;
}

.detail-destination {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}

.detail-dates {
  display: flex;
  gap: 12px;
}

.detail-date-item {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.detail-date-label {
  font-size: 10px;
  opacity: 0.75;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

.detail-date-value {
  font-size: 13px;
  font-weight: 600;
}

.detail-status {
  margin-top: 10px;
}

.detail-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.detail-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.detail-section-body {
  font-size: 14px;
  color: var(--on-surface);
  line-height: 1.7;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
  color: var(--on-surface);
}

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

.detail-action-btn svg {
  width: 18px;
  height: 18px;
}

.detail-action-btn.edit-btn {
  color: var(--primary);
  border-color: var(--primary-light);
  background: rgba(0,150,136,0.04);
}

.detail-action-btn.delete-btn {
  color: var(--error);
  border-color: rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.04);
}

/* ---- Bottom Sheet ---- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}

.sheet-overlay.visible {
  opacity: 1;
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 300;
  max-height: 90vh;
  overflow-y: auto;
  transition: transform var(--transition);
  -webkit-overflow-scrolling: touch;
}

.bottom-sheet.visible {
  transform: translateX(-50%) translateY(0);
}

.tall-sheet {
  max-height: 95vh;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 12px auto 4px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.sheet-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--on-surface);
}

.sheet-body {
  padding: 20px 20px 32px;
}

/* ---- Forms ---- */
.input-group {
  position: relative;
  margin-bottom: 18px;
}

.form-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--on-surface);
  background: var(--surface-variant);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.4;
}

.form-input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0,150,136,0.12);
}

.form-input:not(:placeholder-shown) + .form-label,
.form-input:focus + .form-label,
.form-label.active {
  top: 7px;
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.form-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--on-surface-muted);
  pointer-events: none;
  transition: all var(--transition);
  font-family: inherit;
}

/* For textarea, adjust label position */
.input-group:has(.form-textarea) .form-label {
  top: 20px;
  transform: none;
}

.input-group:has(.form-textarea) .form-input:not(:placeholder-shown) + .form-label,
.input-group:has(.form-textarea) .form-input:focus + .form-label {
  top: 7px;
  transform: none;
}

.form-textarea {
  padding-top: 22px;
  resize: none;
  min-height: 90px;
}

.date-input {
  padding-top: 20px;
  color: var(--on-surface);
}

.select-input {
  padding-top: 20px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.input-error {
  font-size: 11px;
  color: var(--error);
  font-weight: 500;
  display: block;
  margin-top: 4px;
  padding-left: 2px;
  min-height: 16px;
}

.form-input.invalid {
  border-color: var(--error);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---- Buttons ---- */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
  letter-spacing: 0.2px;
  margin-top: 8px;
  box-shadow: 0 3px 10px rgba(0,150,136,0.3);
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-text {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface-muted);
  cursor: pointer;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  transition: background var(--transition), color var(--transition);
}

.btn-text:active {
  background: var(--surface-variant);
}

.btn-danger {
  background: var(--error);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  transition: opacity var(--transition);
}

.btn-danger:active {
  opacity: 0.85;
}

/* ---- Dialog ---- */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}

.dialog-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px 24px 20px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: dialogIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes dialogIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.dialog-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(239,68,68,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--error);
}

.dialog-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.dialog-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 8px;
}

.dialog-msg {
  font-size: 13px;
  color: var(--on-surface-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ---- Snackbar ---- */
.snackbar {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #323232;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  max-width: calc(100% - 32px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Skeleton ---- */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.skeleton-title {
  height: 16px;
  width: 60%;
  margin-bottom: 10px;
}

.skeleton-sub {
  height: 12px;
  width: 80%;
  margin-bottom: 8px;
}

.skeleton-sub.short {
  width: 40%;
}

/* ---- Scrollbar ---- */
.screen::-webkit-scrollbar {
  width: 4px;
}

.screen::-webkit-scrollbar-track {
  background: transparent;
}

.screen::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}

/* ---- Utility ---- */
.hidden { display: none !important; }

/* ---- Media responsive center on desktop ---- */
@media (min-width: 431px) {
  #app {
    border-radius: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
    height: min(740px, 95vh);
  }

  .bottom-sheet {
    border-radius: var(--radius-xl) var(--radius-xl) 20px 20px;
  }
}
