/* INSURA VAULT — Customer Mobile App CSS */

/* =================== MOBILE APP SHELL =================== */
#customer-app {
  min-height: 100vh;
  background: var(--neutral-100);
  padding-bottom: 80px;
}

/* ---- App Header ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  padding: 0 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.header-back-btn {
  font-size: 20px;
  color: #fff;
  margin-right: 8px;
  padding: 4px 8px;
  background: none; border: none; cursor: pointer;
  transition: transform var(--transition-fast);
}
.header-back-btn:active { transform: scale(0.9); }
.header-logo { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.logo-shield { font-size: 24px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.header-brand { color: #fff; font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.header-brand b { color: var(--brand-gold); font-weight: 800; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-icon-btn {
  position: relative; background: rgba(255,255,255,0.1); border: none; cursor: pointer;
  padding: 8px; border-radius: 10px; transition: background var(--transition-base);
}
.header-icon-btn:hover { background: rgba(255,255,255,0.2); }
.notif-icon { font-size: 20px; }
.notif-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--color-danger); color: #fff; font-size: 10px;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--brand-primary);
  animation: pulse 2s ease-in-out infinite;
}
.header-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.3);
  transition: border-color var(--transition-base);
}
.header-avatar:hover { border-color: var(--brand-gold); }

/* ---- App Main ---- */
.app-main { padding: 0; }

/* ---- View System ---- */
.app-view { display: none; padding: 16px; animation: fadeIn 0.3s ease; }
.app-view.active { display: block; }

/* ---- View Header Sticky ---- */
.view-header-sticky {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.view-title { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--neutral-800); }

/* ---- Bottom Nav ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-around;
  height: 64px;
  background: #fff;
  border-top: 1px solid var(--neutral-200);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav .nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; font-size: 11px; color: var(--neutral-400);
  font-weight: var(--weight-medium); background: none; border: none;
  cursor: pointer; padding: 6px 14px; border-radius: 0;
  transition: color 0.2s, transform 0.15s;
  position: relative;
}
.bottom-nav .nav-item.active { color: var(--brand-accent); }
.bottom-nav .nav-item.active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--brand-accent);
  border-radius: 0 0 3px 3px;
}
.bottom-nav .nav-item:active { transform: scale(0.92); }
.bottom-nav .nav-icon { font-size: 22px; }
.bottom-nav .nav-label { font-size: 10px; letter-spacing: 0.02em; }

/* ---- Dashboard Hero Banner ---- */
.dashboard-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #2d3a6e 50%, var(--brand-primary-dark) 100%);
  border-radius: var(--border-radius-lg);
  padding: 22px 20px;
  margin-bottom: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30, 39, 70, 0.35);
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(79,110,247,0.3) 0%, transparent 70%);
  border-radius: 50%;
}
.dashboard-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(201,168,76,0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-shield {
  font-size: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  position: relative;
  z-index: 1;
  animation: pulse 3s ease-in-out infinite;
}
.hero-text { position: relative; z-index: 1; }
.hero-title { font-size: 20px; font-weight: 700; line-height: 1.3; }
.hero-accent { color: var(--brand-gold); }
.hero-subtitle { font-size: 13px; opacity: 0.7; margin-top: 4px; }

/* ---- Greeting Section ---- */
.greeting-section {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff;
  border-radius: var(--border-radius);
  padding: 16px 18px; margin-bottom: 16px;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}
.greeting-hi { font-size: var(--text-sm); color: var(--neutral-500); }
.greeting-name { font-size: var(--text-lg); font-weight: var(--weight-bold); margin-top: 2px; color: var(--neutral-800); }
.greeting-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2)); 
  display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 700;
  color: #fff; box-shadow: 0 2px 8px rgba(79,110,247,0.3);
}

/* ---- Stats Grid (Customer) ---- */
#customer-app .stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px;
}
#customer-app .stat-card {
  border-radius: var(--border-radius); padding: 16px 14px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  border: none; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
#customer-app .stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
#customer-app .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
#customer-app .stat-card:active { transform: scale(0.97); }
.stat-card--blue { background: #eef2ff; }
.stat-card--blue::before { background: var(--color-info); }
.stat-card--orange { background: #fff8f0; }
.stat-card--orange::before { background: var(--color-warning); }
.stat-card--red { background: #fef2f2; }
.stat-card--red::before { background: var(--color-danger); }
.stat-card--green { background: #f0fdf4; }
.stat-card--green::before { background: var(--color-success); }
#customer-app .stat-icon {
  font-size: 28px; flex-shrink: 0;
  width: 42px; height: 42px; display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.7); border-radius: 10px;
}
.stat-info { display: flex; flex-direction: column; }
#customer-app .stat-value { font-size: var(--text-2xl); font-weight: var(--weight-extrabold); color: var(--neutral-800); }
#customer-app .stat-label { font-size: 11px; color: var(--neutral-500); letter-spacing: 0.02em; text-transform: uppercase; }

/* ---- Expiry Alert ---- */
.expiry-alert {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--border-radius);
  background: linear-gradient(135deg, #fff7ed, #fef3c7); border: 1px solid #fed7aa;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(245,158,11,0.15);
}
.alert-icon { font-size: 24px; flex-shrink: 0; }
.alert-content { flex: 1; }
.alert-title { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--neutral-800); }
.alert-body { font-size: 12px; color: var(--neutral-600); margin-top: 2px; }

/* ---- Quick Actions Grid ---- */
.quick-actions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px;
}
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: var(--border-radius);
  background: #fff; border: 1px solid var(--neutral-200);
  font-size: 12px; font-weight: var(--weight-medium); color: var(--neutral-700);
  cursor: pointer; transition: all 0.2s; text-align: center;
  box-shadow: var(--shadow-sm);
}
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-accent); }
.quick-action:active { transform: scale(0.95); }
.qa-icon {
  font-size: 26px;
  width: 48px; height: 48px; display: flex;
  align-items: center; justify-content: center;
  background: var(--neutral-50); border-radius: 12px;
}

/* ---- Policy Cards ---- */
.policies-list, .policies-full-list { display: flex; flex-direction: column; gap: 12px; }
.policy-card {
  background: #fff; border-radius: var(--border-radius); padding: 16px;
  border: 1px solid var(--neutral-200); cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
}
.policy-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.policy-card:active { transform: scale(0.98); }
.policy-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.policy-card-insurer { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--neutral-800); }
.policy-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.policy-card-field label { font-size: 11px; color: var(--neutral-500); text-transform: uppercase; letter-spacing: 0.03em; }
.policy-card-field span { display: block; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--neutral-800); margin-top: 1px; }
.policy-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--neutral-100); }

/* ---- Filter Tabs ---- */
.filter-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.filter-tab {
  padding: 8px 16px; border-radius: var(--border-radius-full);
  font-size: 13px; font-weight: var(--weight-semibold);
  background: #fff; border: 1.5px solid var(--neutral-200);
  color: var(--neutral-600); white-space: nowrap;
  cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--brand-accent); color: var(--brand-accent); }
.filter-tab.active { background: var(--brand-accent); color: #fff; border-color: var(--brand-accent); box-shadow: 0 2px 8px rgba(79,110,247,0.3); }

/* ---- Renewals/Claims Customer ---- */
.renewal-card, .claim-card {
  background: #fff; border-radius: var(--border-radius); padding: 16px;
  border: 1px solid var(--neutral-200); margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.renewal-card:hover, .claim-card:hover { box-shadow: var(--shadow-md); }
.renewal-card-header, .claim-card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}

/* ---- Policy Detail ---- */
.policy-detail-content { padding: 0; }
.detail-hero {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  border-radius: var(--border-radius-lg); padding: 20px; color: #fff; margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(30,39,70,0.3);
}
.detail-hero-title { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.detail-hero-sub { font-size: var(--text-sm); opacity: 0.7; margin-top: 4px; }
.detail-section {
  background: #fff; border-radius: var(--border-radius); padding: 16px;
  border: 1px solid var(--neutral-200); margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.detail-section-title { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-bottom: 12px; color: var(--neutral-800); }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--neutral-100); }
.detail-row:last-child { border-bottom: none; }
.detail-row-label { font-size: var(--text-sm); color: var(--neutral-500); }
.detail-row-value { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--neutral-800); text-align: right; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 16px; }

/* ---- Documents List ---- */
.doc-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: var(--border-radius); padding: 14px;
  border: 1px solid var(--neutral-200); margin-bottom: 10px;
  transition: box-shadow 0.2s;
}
.doc-card:hover { box-shadow: var(--shadow-md); }
.doc-icon { font-size: 28px; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-name { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--neutral-800); }
.doc-meta { font-size: 12px; color: var(--neutral-500); margin-top: 2px; }

/* ---- Notifications List ---- */
.notifs-list { display: flex; flex-direction: column; gap: 8px; }
.notif-card {
  background: #fff; border-radius: var(--border-radius); padding: 14px;
  border: 1px solid var(--neutral-200); display: flex; gap: 12px;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}
.notif-card:hover { box-shadow: var(--shadow-sm); }
.notif-card.unread { background: #f0f5ff; border-color: #c7d8ff; border-left: 3px solid var(--brand-accent); }
.notif-icon-wrap { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notif-content { flex: 1; }
.notif-title { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--neutral-800); }
.notif-body { font-size: 12px; color: var(--neutral-600); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--neutral-400); margin-top: 4px; }

/* ---- Profile ---- */
.profile-hero {
  text-align: center; padding: 28px 16px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  border-radius: var(--border-radius-lg); color: #fff; margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(30,39,70,0.3);
}
.profile-avatar-large {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
  display: flex; align-items: center;
  justify-content: center; font-size: 28px; font-weight: 700; margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,0.3);
}
.profile-name { font-size: var(--text-xl); font-weight: var(--weight-bold); }
.profile-contact { font-size: var(--text-sm); opacity: 0.7; margin-top: 4px; }
.profile-menu { display: flex; flex-direction: column; gap: 4px; }
.profile-menu-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: #fff; border-radius: var(--border-radius);
  border: 1px solid var(--neutral-200); cursor: pointer;
  font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--neutral-700);
  transition: all 0.2s;
}
.profile-menu-item:hover { box-shadow: var(--shadow-sm); transform: translateX(2px); }
.profile-menu-item:active { background: var(--neutral-50); }
.profile-menu-icon { font-size: 20px; }
.profile-menu-arrow { margin-left: auto; color: var(--neutral-400); }

/* ---- Claim Form ---- */
.claim-form-wrap .form-card { background: #fff; border-radius: var(--border-radius); padding: 20px; border: 1px solid var(--neutral-200); box-shadow: var(--shadow-sm); }

/* ---- Timeline ---- */
.timeline { padding-left: 8px; }
.timeline-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; position: relative;
  padding-left: 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 22px;
  bottom: -10px;
  width: 2px;
  background: var(--neutral-200);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  position: absolute; left: 0; top: 14px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--neutral-200);
  z-index: 1;
}
.timeline-dot--info { background: var(--color-info); box-shadow: 0 0 0 2px var(--color-info-light); }
.timeline-dot--success { background: var(--color-success); box-shadow: 0 0 0 2px var(--color-success-light); }
.timeline-dot--warning { background: var(--color-warning); box-shadow: 0 0 0 2px var(--color-warning-light); }
.timeline-text { font-size: var(--text-sm); color: var(--neutral-700); text-transform: capitalize; }
.timeline-meta { font-size: 11px; color: var(--neutral-400); margin-top: 2px; }

/* ---- Login Overrides for Mobile ---- */
#view-login .login-screen { padding-bottom: 80px; }
#view-login .login-card { border-radius: 24px 24px 0 0; }
