/* ═══════════════════════════════════════════════════════
   CALLDIR — Premium Business Directory App
   Design: Modern Android · Blue-Teal-White palette
   Font: Plus Jakarta Sans + Syne
═══════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #E8EDF5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  transition: background 0.4s ease;
}

/* ── CSS VARIABLES ── */
:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: #E0F2FE;
  --teal: #0D9488;
  --teal-light: #CCFBF1;
  --accent: #6366F1;
  --green: #10B981;
  --green-light: #D1FAE5;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --orange: #F59E0B;
  --orange-light: #FEF3C7;
  --whatsapp: #25D366;

  --bg: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.18);
  --shadow-primary: 0 8px 24px rgba(14,165,233,.35);
  --shadow-green: 0 8px 24px rgba(16,185,129,.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --nav-height: 68px;
  --android-nav-height: 44px;
  --header-bg: linear-gradient(135deg, #0EA5E9 0%, #0D9488 100%);
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bg: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --surface: #1E293B;
  --surface-2: #334155;
  --border: #334155;
  --border-light: #1E293B;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  --header-bg: linear-gradient(135deg, #0284C7 0%, #0F766E 100%);
}
[data-theme="dark"] body { background: #0A0F1E; }
[data-theme="dark"] .phone-frame { background: var(--bg); }
[data-theme="dark"] .search-bar { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .search-bar input { color: var(--text-primary); }
[data-theme="dark"] .contact-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .note-card { filter: brightness(0.85); }
[data-theme="dark"] .key-btn { background: var(--surface-2); color: var(--text-primary); }
[data-theme="dark"] .bottom-nav { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .android-nav { background: var(--bg-secondary); }
[data-theme="dark"] .bill-form-card { background: var(--surface); }
[data-theme="dark"] .form-input { background: var(--surface-2); border-color: var(--border); color: var(--text-primary); }
[data-theme="dark"] .bills-stats .stat-card { background: var(--surface); }
[data-theme="dark"] .bill-item { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .template-card { background: var(--surface-2); }
[data-theme="dark"] .post-item { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .ai-banner { background: linear-gradient(135deg, #1E3A5F 0%, #0F3D38 100%); }
[data-theme="dark"] .tag { background: var(--surface-2); color: var(--text-secondary); border-color: var(--border); }
[data-theme="dark"] .tag.active { background: var(--primary); color: white; }
[data-theme="dark"] .fav-add { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .keypad-display { background: var(--surface-2); }
[data-theme="dark"] .keypad-caller-id { background: var(--surface-2); color: var(--text-secondary); }
[data-theme="dark"] .profile-modal-content { background: var(--surface); }
[data-theme="dark"] .modal-sheet { background: var(--surface); }
[data-theme="dark"] .profile-menu-item { color: var(--text-primary); }
[data-theme="dark"] .profile-menu-item:hover { background: var(--surface-2); }
[data-theme="dark"] .screen-header { background: var(--bg); border-color: var(--border); }
[data-theme="dark"] .note-title-input,
[data-theme="dark"] .note-body-input { background: var(--surface-2); border-color: var(--border); color: var(--text-primary); }
[data-theme="dark"] .note-compose { background: var(--surface); border-color: var(--border); }

/* ═══════════════════════════════════════════
   PHONE FRAME
═══════════════════════════════════════════ */
.phone-frame {
  width: 390px;
  height: 844px;
  background: var(--bg);
  border-radius: 48px;
  box-shadow:
    0 0 0 10px #1A1A2E,
    0 0 0 12px #2D2D4E,
    var(--shadow-xl);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #1A1A2E;
  border-radius: 0 0 20px 20px;
  z-index: 100;
}

/* STATUS BAR */
.status-bar {
  height: 44px;
  padding: 12px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--header-bg);
  color: white;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.status-time { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; }
.status-icons { display: flex; align-items: center; gap: 6px; }
.battery-icon {
  width: 22px; height: 11px;
  border: 1.5px solid rgba(255,255,255,.8);
  border-radius: 2px;
  position: relative;
  display: flex; align-items: center;
}
.battery-icon::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 5px;
  background: rgba(255,255,255,.8);
  border-radius: 0 1px 1px 0;
}
.battery-fill {
  width: 65%; height: 100%;
  background: white;
  border-radius: 1px;
  margin: 1px;
}

/* APP CONTAINER */
.app-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
}

/* ═══════════════════════════════════════════
   SCREENS
═══════════════════════════════════════════ */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: var(--bg-secondary);
}
.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* SCROLL CONTENT */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 calc(var(--nav-height) + 8px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-content::-webkit-scrollbar { display: none; }

/* SCREEN HEADER (non-home screens) */
.screen-header {
  padding: 16px 20px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.screen-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.header-action-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-primary);
}
.header-action-btn:hover { transform: translateY(-1px); background: var(--primary-dark); }
.header-action-btn:active { transform: scale(0.96); }

/* ═══════════════════════════════════════════
   HOME HEADER
═══════════════════════════════════════════ */
.home-header {
  background: var(--header-bg);
  padding: 12px 20px 0;
  flex-shrink: 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.avatar-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.6);
  overflow: visible;
  cursor: pointer;
  position: relative;
  background: none;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.avatar-btn:hover { transform: scale(1.05); }
.avatar-btn img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.online-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  background: var(--green);
  border: 2px solid white;
  border-radius: 50%;
}
.header-greeting { display: flex; flex-direction: column; }
.greeting-sub { font-size: 11px; color: rgba(255,255,255,.75); font-weight: 500; }
.greeting-name { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; color: white; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  backdrop-filter: blur(8px);
}
.icon-btn:hover { background: rgba(255,255,255,.25); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.95); }
.notif-badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 16px; height: 16px;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid white;
}

/* SEARCH BAR */
.search-wrapper {
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 14px 16px 0;
  backdrop-filter: blur(10px);
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: var(--radius-full);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15), var(--shadow-md);
}
.search-icon { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  background: transparent;
}
.search-bar input::placeholder { color: var(--text-muted); }
.voice-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  border: none;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.voice-btn:hover { background: var(--primary); color: white; }

/* SEARCH TAGS */
.search-tags {
  display: flex;
  gap: 8px;
  padding: 12px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.search-tags::-webkit-scrollbar { display: none; }
.tag {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.tag:hover { background: rgba(255,255,255,.3); }
.tag.active { background: white; color: var(--primary); border-color: white; }

/* ═══════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.see-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: opacity 0.2s;
}
.see-all:hover { opacity: 0.7; }

/* ═══════════════════════════════════════════
   FAVORITES SLIDER
═══════════════════════════════════════════ */
.favorites-slider {
  display: flex;
  gap: 16px;
  padding: 4px 20px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.favorites-slider::-webkit-scrollbar { display: none; }

.fav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.fav-item:hover { transform: translateY(-2px); }
.fav-item:active { transform: scale(0.95); }

.fav-avatar-wrap {
  width: 58px; height: 58px;
  border-radius: 50%;
  position: relative;
  border: 2.5px solid var(--primary-light);
  overflow: hidden;
  background: var(--bg-tertiary);
  transition: border-color 0.2s ease;
}
.fav-avatar-wrap:hover { border-color: var(--primary); }
.fav-avatar-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.fav-online {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 12px; height: 12px;
  background: var(--green);
  border: 2px solid white;
  border-radius: 50%;
}
.fav-add {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border);
  color: var(--text-muted);
}
.fav-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-role {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

/* ═══════════════════════════════════════════
   AI BANNER
═══════════════════════════════════════════ */
.ai-banner {
  margin: 4px 20px 4px;
  background: linear-gradient(135deg, #0EA5E9 0%, #0D9488 100%);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.ai-banner:hover { transform: translateY(-1px); }
.ai-banner-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.ai-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ai-title { font-size: 13px; font-weight: 700; color: white; }
.ai-sub { font-size: 11.5px; color: rgba(255,255,255,.8); }
.ai-cta {
  background: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.4);
  color: white;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background 0.2s ease;
}
.ai-cta:hover { background: rgba(255,255,255,.35); }

/* ═══════════════════════════════════════════
   CONTACT CARDS
═══════════════════════════════════════════ */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 8px;
}

.contact-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.25s ease;
  animation: cardIn 0.4s ease both;
}
.contact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}
.contact-card:active { transform: scale(0.98); }

.spam-card {
  border-color: var(--red-light);
  background: #FFF8F8;
}
[data-theme="dark"] .spam-card { background: #2D1515; border-color: #4D2020; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.contact-card:nth-child(1) { animation-delay: 0.05s; }
.contact-card:nth-child(2) { animation-delay: 0.1s; }
.contact-card:nth-child(3) { animation-delay: 0.15s; }
.contact-card:nth-child(4) { animation-delay: 0.2s; }
.contact-card:nth-child(5) { animation-delay: 0.25s; }

/* CARD AVATAR */
.card-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.card-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.avatar-initial {
  background: var(--av-color, var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: white;
}
.card-online-dot {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 10px; height: 10px;
  background: var(--green);
  border: 2px solid white;
  border-radius: 50%;
}

/* CARD BODY */
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-row1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-badges { display: flex; gap: 4px; flex-wrap: wrap; }

.badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
}
.badge.verified { background: var(--green-light); color: #065F46; }
.badge.business { background: var(--primary-light); color: #0369A1; }
.badge.spam { background: var(--red-light); color: #991B1B; }

.card-row2 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.card-cat-icon { font-size: 12px; }
.card-cat { font-weight: 600; color: var(--primary); }
.card-dot { color: var(--text-muted); }
.card-loc { color: var(--text-muted); font-size: 11px; }

.card-row3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.card-phone { color: var(--text-secondary); font-weight: 500; }
.spam-safe {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-light);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.spam-warn {
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-light);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.card-row4 { display: flex; align-items: center; gap: 6px; }
.rating-stars { display: flex; gap: 1px; }
.star { font-size: 11px; }
.star.filled { color: #F59E0B; }
.star.half { color: #F59E0B; opacity: 0.5; }
.star.empty { color: #CBD5E1; }
.rating-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Syne', sans-serif;
}
.rating-max { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.review-count { font-size: 10.5px; color: var(--text-muted); }
.spam-reports { font-size: 11px; color: var(--red); font-weight: 600; }

/* CARD ACTIONS */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.btn-call {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--green);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-green);
}
.btn-call:hover { background: #059669; transform: scale(1.08); }
.btn-call:active { transform: scale(0.95); }

.btn-whatsapp {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--whatsapp);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37,211,102,.35);
}
.btn-whatsapp:hover { background: #1DA851; transform: scale(1.08); }
.btn-whatsapp:active { transform: scale(0.95); }

.btn-block {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--red-light);
  border: none;
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-block:hover { background: var(--red); color: white; }

/* ═══════════════════════════════════════════
   BILLS SCREEN
═══════════════════════════════════════════ */
.bills-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px 4px;
}
.stat-card {
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-green { background: linear-gradient(135deg, #10B981, #059669); }
.stat-blue { background: linear-gradient(135deg, #0EA5E9, #0284C7); }
.stat-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.8); }
.stat-value { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: white; }
.stat-sub { font-size: 10.5px; color: rgba(255,255,255,.7); }

.bill-form-card {
  margin: 12px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.form-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-group label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.form-input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus { border-color: var(--primary); background: white; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group.half { margin-bottom: 0; }
.bill-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.bill-total-val {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.form-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-primary {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 11px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  flex: 1;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 11px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover { background: var(--border); }

.bill-list { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 8px; }
.bill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.bill-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bill-paid { background: var(--green-light); color: var(--green); }
.bill-pending { background: var(--orange-light); color: var(--orange); }
.bill-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bill-name { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.bill-desc { font-size: 11px; color: var(--text-muted); }
.bill-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bill-amount { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 800; color: var(--text-primary); }
.bill-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.bill-status.paid { background: var(--green-light); color: #065F46; }
.bill-status.pending { background: var(--orange-light); color: #92400E; }

/* ═══════════════════════════════════════════
   NOTES SCREEN
═══════════════════════════════════════════ */
.note-compose {
  margin: 12px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1.5px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.1);
}
.note-title-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  margin-bottom: 10px;
}
.note-body-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  color: var(--text-secondary);
  background: transparent;
  resize: none;
  min-height: 80px;
  line-height: 1.6;
}
.note-compose-actions { display: flex; gap: 10px; margin-top: 12px; }

.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px 20px 8px;
}
.note-card {
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.note-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.note-yellow { background: #FEF9C3; }
.note-blue { background: #DBEAFE; }
.note-green { background: #D1FAE5; }
.note-pink { background: #FCE7F3; }
.note-card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.note-card-body { font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; }
.note-card-date { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-top: auto; }

/* ═══════════════════════════════════════════
   POSTS SCREEN
═══════════════════════════════════════════ */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 8px;
}
.template-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.template-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tmpl-preview {
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
}
.tmpl-blue .tmpl-preview { background: linear-gradient(135deg, #0EA5E9, #6366F1); }
.tmpl-green .tmpl-preview { background: linear-gradient(135deg, #10B981, #0D9488); }
.tmpl-purple .tmpl-preview { background: linear-gradient(135deg, #8B5CF6, #EC4899); }
.tmpl-orange .tmpl-preview { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.tmpl-biz { font-size: 13px; font-weight: 800; color: white; font-family: 'Syne', sans-serif; }
.tmpl-offer { font-size: 22px; font-weight: 800; color: white; font-family: 'Syne', sans-serif; }
.tmpl-tag { font-size: 10px; color: rgba(255,255,255,.8); font-weight: 500; }
.tmpl-phone { font-size: 10px; color: rgba(255,255,255,.9); font-weight: 600; }
.tmpl-label {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface);
  text-align: center;
}

.post-list { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 8px; }
.post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.post-thumb {
  width: 52px; height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.tmpl-blue-sm { background: linear-gradient(135deg, #0EA5E9, #6366F1); }
.tmpl-green-sm { background: linear-gradient(135deg, #10B981, #0D9488); }
.post-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.post-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.post-meta { font-size: 11px; color: var(--text-muted); }
.post-share-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.post-share-btn:hover { background: var(--primary-light); color: var(--primary); }

/* ═══════════════════════════════════════════
   KEYPAD SCREEN
═══════════════════════════════════════════ */
.keypad-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  gap: 12px;
  overflow: hidden;
}
.keypad-display {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.keypad-number {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2px;
  flex: 1;
}
.keypad-backspace {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--red-light);
  border: none;
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.keypad-backspace:hover { background: var(--red); color: white; }
.keypad-backspace:active { transform: scale(0.9); }

.keypad-caller-id {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex: 1;
}
.key-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
  padding: 10px;
  min-height: 58px;
}
.key-btn:hover { background: var(--primary-light); border-color: var(--primary); transform: scale(1.03); }
.key-btn:active { transform: scale(0.93); background: var(--primary); }
.key-btn:active .key-num,
.key-btn:active .key-sub { color: white; }
.key-num {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.key-sub {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.keypad-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px;
}
.keypad-action-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.keypad-action-btn:hover { background: var(--primary-light); color: var(--primary); }
.keypad-call-btn {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--green);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-green);
}
.keypad-call-btn:hover { background: #059669; transform: scale(1.06); box-shadow: 0 12px 32px rgba(16,185,129,.5); }
.keypad-call-btn:active { transform: scale(0.95); }

/* ═══════════════════════════════════════════
   BOTTOM NAVIGATION
═══════════════════════════════════════════ */
.bottom-nav {
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  flex-shrink: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
  position: relative;
  z-index: 20;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
  border-radius: var(--radius-md);
  position: relative;
}
.nav-item:hover { color: var(--primary); }
.nav-item.active { color: var(--primary); }
.nav-icon-wrap {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.nav-item.active .nav-icon-wrap {
  background: var(--primary-light);
}
.nav-item:active { transform: scale(0.92); }

/* ANDROID NAV */
.android-nav {
  height: var(--android-nav-height);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 40px;
  flex-shrink: 0;
  border-top: 1px solid var(--border-light);
}
.android-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.android-btn:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.android-home-circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

/* ═══════════════════════════════════════════
   PROFILE MODAL
═══════════════════════════════════════════ */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-sheet {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 0 0 20px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-height: 85%;
  overflow-y: auto;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 12px auto 0;
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.modal-close:hover { background: var(--red-light); color: var(--red); }

.profile-modal-content { padding: 8px 20px 0; }
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--border-light);
}
.profile-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  position: relative;
  border: 3px solid var(--primary-light);
}
.profile-avatar-lg img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.profile-edit-btn {
  position: absolute;
  bottom: 0; right: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid white;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.profile-edit-btn:hover { background: var(--primary-dark); transform: scale(1.1); }
.profile-name {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.profile-role { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.profile-badges { display: flex; gap: 6px; }

.profile-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.pstat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pstat-val {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}
.pstat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.pstat-divider { width: 1px; height: 36px; background: var(--border); }

.profile-menu { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}
.profile-menu-item:hover { background: var(--bg-secondary); color: var(--primary); }
.profile-menu-item.danger { color: var(--red); }
.profile-menu-item.danger:hover { background: var(--red-light); }

/* ═══════════════════════════════════════════
   CALL OVERLAY
═══════════════════════════════════════════ */
.call-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0F172A 0%, #0D9488 100%);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.call-overlay.active { opacity: 1; pointer-events: all; }
.call-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.call-avatar-ring {
  position: relative;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.call-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  animation: callRing 2s ease-out infinite;
}
.call-ring.r1 { width: 120px; height: 120px; animation-delay: 0s; }
.call-ring.r2 { width: 100px; height: 100px; animation-delay: 0.4s; }
.call-ring.r3 { width: 80px; height: 80px; animation-delay: 0.8s; }
@keyframes callRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
.call-avatar-img {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  color: white;
  z-index: 1;
  border: 2px solid rgba(255,255,255,.3);
}
.call-name {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: white;
}
.call-status { font-size: 14px; color: rgba(255,255,255,.7); font-weight: 500; }
.call-end-btn {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(239,68,68,.5);
}
.call-end-btn:hover { background: #DC2626; transform: scale(1.06); }
.call-end-btn:active { transform: scale(0.95); }

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.toast {
  position: absolute;
  bottom: calc(var(--nav-height) + var(--android-nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0F172A;
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 400;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════
   RESPONSIVE — DESKTOP SHOWCASE
═══════════════════════════════════════════ */
@media (max-width: 480px) {
  body { padding: 0; align-items: flex-start; background: var(--bg); }
  .phone-frame {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .phone-notch { display: none; }
}

/* ═══════════════════════════════════════════
   MICRO-ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.fav-online { animation: pulse 2s ease-in-out infinite; }
.card-online-dot { animation: pulse 2.5s ease-in-out infinite; }
.online-dot { animation: pulse 2s ease-in-out infinite; }

/* Ripple effect on buttons */
.btn-call, .btn-whatsapp, .keypad-call-btn, .key-btn {
  position: relative;
  overflow: hidden;
}
.btn-call::after, .btn-whatsapp::after, .keypad-call-btn::after, .key-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.3);
  border-radius: inherit;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.btn-call:active::after, .btn-whatsapp:active::after,
.keypad-call-btn:active::after, .key-btn:active::after {
  transform: scale(2);
  opacity: 0;
  transition: 0s;
}