/* ============================================================
   SamGenie EduShelf — REDESIGN v2 (modern mobile UI)
   ------------------------------------------------------------
   Additive override layer. Same class names / variable names as
   the base stylesheet, so no markup or JavaScript changes are
   required. Loaded after style.css so it takes precedence.
   Palette: modern purple primary + orange accent, soft cards.
   ============================================================ */

:root {
  /* Brand */
  --blue: #6A1FB5;
  --violet: #8B3CE0;
  --violet-mid: #6A1FB5;
  --violet-deep: #4E1190;
  --orange: #FF7A29;
  --yellow: #FF7A29;
  --gold: #FF7A29;
  --gold-light: #FFE3CF;
  --pink: #F26D8E;
  --rose: #F26D8E;
  --green: #1FA971;
  --red: #E5484D;
  --amber: #F5B32B;

  /* Neutrals */
  --bg: #F4F5FA;
  --surface: #FFFFFF;
  --text: #17171F;
  --muted: #7C7E90;
  --border: #ECECF4;
  --plum-ink: #17171F;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #7D35E0 0%, #5E17A8 100%);
  --grad-gold: linear-gradient(135deg, #FF9248 0%, #F76B12 100%);
  --grad-rose: linear-gradient(135deg, #FF9E7A, #F76B12);
  --grad-hero: linear-gradient(135deg, #4E1190 0%, #6A1FB5 55%, #8B3CE0 100%);
  --grad-aurora: linear-gradient(135deg, #FFFFFF, #F6F2FE 55%, #FFF6EE);

  /* Soft shadows */
  --shadow-soft: 0 4px 14px rgba(35, 20, 70, 0.06);
  --shadow-app: 0 14px 34px rgba(35, 20, 70, 0.10);
  --shadow-pop: 0 20px 50px rgba(35, 20, 70, 0.22);
  --glass: rgba(255, 255, 255, 0.92);

  --radius-xl: 22px;
  --radius-lg: 16px;
}

body {
  background:
    radial-gradient(900px 520px at 92% -8%, rgba(125, 53, 224, 0.10), transparent 60%),
    radial-gradient(820px 520px at -10% 8%, rgba(255, 122, 41, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
}

h1, h2, h3, h4 { letter-spacing: -0.3px; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  height: 64px; gap: 10px;
}
.menu-btn {
  width: 44px; height: 44px; border-radius: 14px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-soft); font-size: 18px;
}
.search-app {
  background: #F1F2F8; border: 1.5px solid transparent; border-radius: 14px;
  padding: 0 14px; height: 44px; transition: .18s;
}
.search-app:focus-within { background: #fff; border-color: #D9CCF3; box-shadow: 0 0 0 4px rgba(106,31,181,.08); }
.search-app input { font-size: 14px; font-weight: 600; color: var(--muted); }
.search-app span { font-size: 14px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow-soft); color: var(--violet-mid);
}
.icon-btn .badge { border: 2px solid #fff; }
.top-actions .icon-btn:last-child { background: var(--grad-primary); color: #fff; border-color: transparent; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  border-radius: 15px; padding: 13px 18px; font-weight: 800; font-size: 14.5px;
  letter-spacing: .1px; box-shadow: none; gap: 8px;
}
.btn-orange, .btn-dark {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 10px 22px -8px rgba(106,31,181,.55);
}
.btn-white {
  background: #fff; color: var(--violet-mid);
  border: 1.5px solid #E9E2F8; box-shadow: var(--shadow-soft);
}
/* Payment accent = orange (matches mockups) */
#unlockPayOnlineBtn, #pastPayOnlineBtn {
  background: linear-gradient(135deg, #FF9248, #F76B12) !important;
  color: #fff !important; border: 0 !important;
  box-shadow: 0 10px 22px -8px rgba(247,107,18,.55) !important;
}
.back-btn {
  background: #fff; border: 1.5px solid var(--border); border-radius: 13px;
  padding: 10px 15px; font-weight: 700; font-size: 13px; color: var(--violet-mid);
  box-shadow: var(--shadow-soft);
}

/* ============================================================
   BOTTOM NAVIGATION (mobile) — light active pill
   ============================================================ */
.bottom-nav {
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 18px 40px -16px rgba(35,20,70,.28); padding: 7px; gap: 4px;
}
.bnav-item { color: #A6A8B8; border-radius: 14px; padding: 8px 2px; }
.bnav-item .ico svg { color: currentColor; }
.bnav-item.active { background: #F1E8FC; color: var(--violet-mid); box-shadow: none; }
.bnav-item span { font-weight: 700; }

/* ============================================================
   SIDEBAR NAV (drawer)
   ============================================================ */
.sidebar { border-right: 1px solid var(--border); }
.brand-mark img { border-radius: 14px; }
.nav-item { border-radius: 14px; margin: 2px 10px; color: var(--text); font-weight: 600; }
.nav-item:hover { background: rgba(106,31,181,.07); }
.nav-item.active { background: var(--grad-primary); color: #fff; box-shadow: 0 10px 20px -10px rgba(106,31,181,.6); }
.nav-section { color: var(--faint, #A6A8B8); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.overlay { background: rgba(23,12,45,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ============================================================
   CONTENT / SCREENS
   ============================================================ */
.content { padding: 18px 16px 110px; }
.breadcrumb {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 11px 15px; box-shadow: var(--shadow-soft); font-size: 13px; margin-bottom: 16px;
}
.breadcrumb b { color: var(--violet-mid); }
.breadcrumb a { color: var(--muted); font-weight: 700; }
.section-title { margin: 22px 2px 12px; align-items: center; }
.section-title h2 { font-size: 18px; font-weight: 900; letter-spacing: -.4px; }
.section-title a { color: var(--violet-mid); font-weight: 800; font-size: 12.5px; }

/* ---------- Hero banner ---------- */
.app-banner {
  background: var(--grad-hero); border-radius: 24px; padding: 24px;
  box-shadow: var(--shadow-pop); position: relative; overflow: hidden;
}
.app-banner::after { background: radial-gradient(circle at 82% 12%, rgba(255,255,255,.20), transparent 42%); }
.app-banner h1 { font-family: 'Fraunces', serif; font-size: 30px; line-height: 1.12; }
.app-banner h1 span { color: #FFC46B; }
.app-banner p { opacity: .92; }
.banner-stats b { color: #fff; }
.banner-stats span { color: rgba(255,255,255,.75); letter-spacing: .08em; }

/* ---------- Daily / dark cards ---------- */
.daily-card, .dark-card {
  background: linear-gradient(135deg, #3A0F6E, #5E17A8) !important;
  border-radius: 22px; box-shadow: var(--shadow-pop); border: 1px solid rgba(255,255,255,.08);
}
.daily-card [style*="color:var(--yellow)"] { color: #FFB36B !important; }

/* ---------- Generic cards / lists ---------- */
.choice-card, .course-row, .past-q-card, .year-card, .app-card,
.mini-card, .level-card, .why-card, .empty {
  background: #fff; border: 1px solid #F1F1F7; box-shadow: var(--shadow-soft);
}
.choice-card { border-radius: 20px; padding: 16px; gap: 14px; border-width: 1.5px; }
.choice-card:hover, .choice-card:active { border-color: var(--violet); box-shadow: var(--shadow-app); transform: translateY(-2px); }
.choice-icon { background: #F1E8FC; color: var(--violet-mid); border-radius: 14px; }
.course-row { border-radius: 16px; padding: 13px 15px; }
.course-row:hover, .course-row:active { border-color: #E3D8FB; box-shadow: var(--shadow-soft); }
.past-q-card { border-radius: 18px; }
.past-q-answer { background: #E4F7EF; border: 1px solid #BFEAD8; color: #127A56; border-radius: 12px; }
.year-card { border-radius: 14px; }
.year-card:hover { background: var(--grad-primary); color: #fff; }
.app-card { border-radius: 20px; overflow: hidden; border: 1px solid #F1F1F7; }
.app-card:hover { box-shadow: var(--shadow-app); border-color: rgba(106,31,181,.35); }
.app-card-top.university { background: linear-gradient(135deg, #7D35E0, #5E17A8); }
.app-card-top.jamb { background: linear-gradient(135deg, #FF9248, #F76B12); }
.app-card-top.primary { background: linear-gradient(135deg, #FFE3CF, #FFC46B); }
.app-card-top.secondary { background: linear-gradient(135deg, #FFB3D0, #F26D8E); color: #fff; }
.empty { border-radius: 20px; }
.why-card {
  border-radius: 16px; padding: 18px 12px; background: #fff !important;
  box-shadow: var(--shadow-soft); font-size: 13px;
}

/* ---------- Pills / chips / tabs ---------- */
.store-tab, .cat-pill, .level-chip, .mini-chip {
  border-radius: 999px; border: 1.5px solid var(--border); background: #fff; color: var(--muted);
  box-shadow: var(--shadow-soft);
}
.store-tab { padding: 9px 17px; font-weight: 700; }
.store-tab.active, .cat-pill.active {
  background: var(--grad-primary); color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px -8px rgba(106,31,181,.5);
}
.cat-pill.active .cat-ico { filter: none; }
.subj:hover { background: var(--grad-primary) !important; border-color: transparent !important; }
.cat-ico { filter: none; }

/* ---------- Scroll pills (levels) ---------- */
.h-scroll .cat-pill { min-width: 150px; }

/* ============================================================
   FORMS / INPUTS
   ============================================================ */
input, select, textarea { font-family: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="search"], input:not([type]), select, textarea,
.search-box {
  border-radius: 14px; border: 1.5px solid var(--border); background: #fff;
  transition: .18s; box-shadow: var(--shadow-soft);
}
input:focus, select:focus, textarea:focus, .search-box:focus {
  outline: none; border-color: #D9CCF3; box-shadow: 0 0 0 4px rgba(106,31,181,.08);
}

/* ============================================================
   MODALS — modern bottom sheets
   ============================================================ */
#unlockModal, #subjectAccessModal {
  align-items: flex-end !important; justify-content: stretch !important; padding: 0 !important;
}
#unlockModal > div, #subjectAccessModal > div {
  width: 100% !important; max-width: 520px !important; margin: 0 auto !important;
  border-radius: 28px 28px 0 0 !important;
  padding: 18px 20px calc(22px + env(safe-area-inset-bottom)) !important;
  box-shadow: 0 -20px 60px rgba(20,10,40,.35) !important;
  animation: sgSheetUp .32s cubic-bezier(.2,.9,.25,1);
  max-height: 92vh; overflow-y: auto;
}
@keyframes sgSheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
/* Grab handle for bottom sheets */
#unlockModal > div::before, #subjectAccessModal > div::before {
  content: ""; display: block; width: 42px; height: 5px; border-radius: 3px;
  background: #E2E2EC; margin: 4px auto 14px;
}
/* Centered modals keep rounded card look */
#pastReportModal > div, #pastCopyrightModal > div, #appAnnouncementModal > div,
#signupPolicyModal > div { border-radius: 24px !important; box-shadow: var(--shadow-pop) !important; }

/* Unlock modal accents */
#unlockSubscriptionInfo, #subjectAccessText ~ * { }
#unlockOnlineBox { background: #F2FBF6 !important; border: 1px solid #BFEAD8 !important; border-radius: 16px !important; }

/* ============================================================
   MISC
   ============================================================ */
.badge { background: var(--orange); color: #fff; border: 2px solid #fff; }
.top-center-brand { background: var(--grad-primary); color: #fff; letter-spacing: .08em; }
.content::-webkit-scrollbar-thumb { background: #D9C6EC; }

/* Level cards (study categories) */
.level-card { border-radius: 18px; }
.level-card:hover { box-shadow: var(--shadow-app); transform: translateY(-2px); }

/* Profile / receipts rows use course-row — already styled */

/* Purchase / orders status pills inline */
.pill-green, .pill-orange { }

/* Make the "View my library" dark button on banner match */
.phone-mock [style*="background:var(--text)"] { background: var(--orange) !important; }

/* Nicer focus rings for accessibility */
button:focus-visible, a:focus-visible, .course-row:focus-visible, .choice-card:focus-visible {
  outline: 3px solid rgba(106,31,181,.25); outline-offset: 2px;
}

/* Disable heavy hover transforms on touch (avoid sticky hover) */
@media (hover: none) {
  .app-card:hover, .choice-card:hover, .level-card:hover { transform: none; }
}
