/* =====================================================
   PET PALS PLANNER — MOBILE APP STYLESHEET
   ===================================================== */

/* ---- CSS Variables ---- */
:root {
  --primary: #8EC5FC;
  --primary-dark: #6aadee;
  --primary-light: #c3defe;
  --secondary: #E0C3FC;
  --accent: #FF9CEE;
  --accent-dark: #e07ed5;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface2: #f8f9ff;
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
  --text-hint: #9ca3af;
  --border: #e5e7eb;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --success: #10b981;
  --warning: #f59e0b;
  --nav-height: 64px;
  --appbar-height: 56px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

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

/* ---- Top App Bar ---- */
.app-bar {
  height: var(--appbar-height);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(142,197,252,0.2);
}

.app-bar-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  text-align: center;
  letter-spacing: -0.2px;
}

.app-bar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.app-bar-btn:active {
  background: rgba(142,197,252,0.2);
}

.app-bar-btn .material-icons-round {
  font-size: 22px;
}

/* ---- Screen Container ---- */
.screen-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity var(--transition), transform var(--transition);
}

.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.screen.slide-left {
  transform: translateX(-20px);
  opacity: 0;
  pointer-events: none;
}

.screen-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

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

/* ---- Bottom Navigation ---- */
.bottom-nav {
  height: var(--nav-height);
  background: var(--surface);
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-hint);
  transition: color var(--transition-fast);
  position: relative;
  border-radius: 0;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
  transition: width var(--transition);
}

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

.nav-item.active::before {
  width: 48px;
}

.nav-icon {
  font-size: 22px !important;
  transition: transform var(--transition-fast);
}

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

.nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ---- Welcome Banner ---- */
.welcome-banner {
  margin: 16px 0 12px;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.welcome-sub {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.welcome-title {
  font-size: 22px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

/* ---- 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 rgba(142,197,252,0.15);
}

.stat-icon {
  font-size: 20px;
}

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

.stat-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

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

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

.text-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 4px 0;
}

/* ---- Card ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  margin-bottom: 12px;
}

.empty-card-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.empty-card-msg .material-icons-round {
  font-size: 28px;
}

/* ---- Activity Bars ---- */
.activity-bar-item {
  margin-bottom: 12px;
}

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

.activity-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.activity-bar-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.activity-bar-count {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.activity-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

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

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

.quick-action-btn {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(142,197,252,0.2);
  transition: all var(--transition-fast);
  min-height: 72px;
}

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

.quick-action-icon {
  font-size: 24px;
}

/* ---- Log Tile (List Item) ---- */
.log-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.log-tile:active {
  transform: scale(0.98);
  box-shadow: none;
}

.log-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(142,197,252,0.08);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.log-tile:active::after {
  opacity: 1;
}

.log-tile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
}

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

.log-tile-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-tile-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-tile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.log-tile-date {
  font-size: 11px;
  color: var(--text-hint);
  font-weight: 500;
}

.activity-badge {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-feeding { background: #fef3c7; color: #92400e; }
.badge-grooming { background: #ede9fe; color: #5b21b6; }
.badge-vet { background: #fee2e2; color: #991b1b; }
.badge-exercise { background: #d1fae5; color: #065f46; }
.badge-medication { background: #dbeafe; color: #1e40af; }
.badge-bath { background: #e0f2fe; color: #075985; }
.badge-training { background: #fce7f3; color: #9d174d; }
.badge-vaccination { background: #d1fae5; color: #065f46; }
.badge-dental { background: #f0fdf4; color: #166534; }
.badge-other { background: #f3f4f6; color: #374151; }

/* ---- Log Detail Screen ---- */
.detail-hero {
  margin: 16px 0;
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.detail-hero-icon {
  font-size: 52px;
  margin-bottom: 10px;
}

.detail-hero-pet {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.detail-hero-activity {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

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

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-row:first-child {
  padding-top: 0;
}

.detail-row-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-row-icon .material-icons-round {
  font-size: 18px;
  color: var(--primary-dark);
}

.detail-row-content {
  flex: 1;
}

.detail-row-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.detail-row-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

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

/* ---- Search ---- */
.search-container {
  padding: 12px 0 8px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--primary);
}

.search-icon {
  font-size: 20px !important;
  color: var(--text-hint);
  padding: 0 12px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  height: 44px;
  font-size: 15px;
  color: var(--text-primary);
  background: none;
}

.search-input::placeholder {
  color: var(--text-hint);
}

.search-clear {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-hint);
  margin-right: 4px;
  border-radius: 50%;
}

/* ---- Chips ---- */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  min-height: 34px;
}

.chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ---- FAB ---- */
.fab {
  position: absolute;
  bottom: 20px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(142,197,252,0.5);
  transition: all var(--transition-fast);
  z-index: 10;
}

.fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(142,197,252,0.4);
}

.fab .material-icons-round {
  font-size: 26px;
}

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

.empty-icon {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 4px;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 240px;
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 12px rgba(142,197,252,0.4);
  transition: all var(--transition-fast);
  min-height: 48px;
  margin-top: 8px;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(142,197,252,0.3);
}

.btn-primary .material-icons-round {
  font-size: 18px;
}

.btn-full {
  width: 100%;
}

.btn-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  transition: all var(--transition-fast);
  min-height: 48px;
}

.btn-outlined:active {
  background: var(--surface2);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--danger);
  color: white;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  transition: all var(--transition-fast);
  min-height: 48px;
}

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

.btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-xl);
  transition: all var(--transition-fast);
  min-height: 48px;
  width: 100%;
}

.btn-edit .material-icons-round {
  font-size: 18px;
}

.btn-delete-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--danger);
  transition: all var(--transition-fast);
  min-height: 48px;
  width: 100%;
}

.btn-delete-outlined .material-icons-round {
  font-size: 18px;
}

.btn-delete-outlined:active {
  background: var(--danger-light);
}

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

.overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

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

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  padding: 12px 16px 8px;
  flex-shrink: 0;
}

.sheet-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  color: var(--text-primary);
}

.sheet-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition-fast);
}

.sheet-close:active {
  background: var(--surface2);
}

.sheet-body {
  padding: 8px 16px 32px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.sheet-body::-webkit-scrollbar {
  display: none;
}

/* ---- Form Fields ---- */
.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.required {
  color: var(--danger);
}

.optional {
  color: var(--text-hint);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.input-field {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.input-field:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.input-field::placeholder {
  color: var(--text-hint);
}

.input-field.error {
  border-color: var(--danger);
}

.input-error {
  display: block;
  font-size: 11px;
  color: var(--danger);
  margin-top: 4px;
  min-height: 14px;
}

.select-wrapper {
  position: relative;
}

.select-field {
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px !important;
  color: var(--text-hint);
  pointer-events: none;
}

.textarea-field {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* ---- Dialog ---- */
.dialog-overlay {
  z-index: 400;
}

.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: calc(100% - 48px);
  max-width: 320px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 24px 20px 20px;
  z-index: 500;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-xl);
}

.dialog.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

.dialog-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

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

.dialog-msg {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---- Reminders ---- */
.reminder-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
}

.reminder-tile.overdue {
  border-left-color: var(--danger);
  background: #fff8f8;
}

.reminder-tile.upcoming {
  border-left-color: var(--warning);
}

.reminder-tile.future {
  border-left-color: var(--primary);
}

.reminder-icon {
  font-size: 28px;
  flex-shrink: 0;
}

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

.reminder-pet {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.reminder-activity {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.reminder-due {
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.reminder-due.overdue { color: var(--danger); }
.reminder-due.upcoming { color: var(--warning); }
.reminder-due.future { color: var(--primary-dark); }

/* ---- Resources ---- */
.resource-hero {
  padding: 20px 0 16px;
  text-align: center;
}

.resource-hero h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.resource-hero p {
  font-size: 14px;
  color: var(--text-secondary);
}

.resource-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.resource-cat-card {
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: transform var(--transition-fast);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  min-height: 70px;
  justify-content: center;
}

.resource-cat-card:active {
  transform: scale(0.95);
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
  border: 1px solid rgba(0,0,0,0.04);
}

.resource-card:active {
  transform: scale(0.98);
}

.resource-card-img {
  width: 88px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}

.resource-card-body {
  padding: 14px 14px 14px 0;
  flex: 1;
}

.resource-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.resource-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.resource-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}

.resource-time {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ---- Resource Dialog ---- */
.resource-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: calc(100% - 32px);
  max-width: 400px;
  max-height: 80vh;
  background: var(--surface);
  border-radius: var(--radius-xl);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.resource-dialog::-webkit-scrollbar { display: none; }

.resource-dialog.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

.resource-dialog-header {
  padding: 24px 20px 16px;
  text-align: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
}

.resource-dialog-body {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  flex: 1;
}

.resource-dialog-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.resource-dialog-body ul {
  padding-left: 20px;
  margin-top: 8px;
}

.resource-dialog-body li {
  margin-bottom: 8px;
}

/* ---- Snackbar ---- */
.snackbar {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
}

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

/* ---- Due badge ---- */
.due-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.due-badge.overdue {
  background: var(--danger-light);
  color: var(--danger);
}

.due-badge.today {
  background: #fef3c7;
  color: #92400e;
}

.due-badge.upcoming {
  background: #d1fae5;
  color: #065f46;
}

/* ---- Skeleton loading ---- */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Ripple effect ---- */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: ripple-anim 0.5s ease-out;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ---- Utility ---- */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
