@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --brand-blue: #1f5fa8;
  --brand-blue-dark: #173f79;
  --brand-green: #40a951;
  --brand-green-dark: #2f7f3d;
  --brand-gold: #f0b22d;
  --bg: #eef5fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(247, 250, 255, 0.9);
  --text: #173047;
  --muted: #5d7085;
  --border: rgba(147, 180, 214, 0.32);
  --shadow: 0 18px 42px rgba(20, 67, 114, 0.12);
  --radius: 24px;
}

html {
  scroll-padding-top: 120px;
}

body {
  font-family: "Manrope", "Avenir Next", sans-serif !important;
  color: var(--text) !important;
  background:
    radial-gradient(circle at top left, rgba(31, 95, 168, 0.15), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(64, 169, 81, 0.14), transparent 26%),
    linear-gradient(180deg, #f7fbff 0%, #f1f6fc 52%, #eaf2f8 100%) !important;
}

::selection {
  background: rgba(31, 95, 168, 0.18);
}

h1,
h2,
h3,
h4,
.page-head h1,
.page-head h2,
.hero-copy h1,
.dropdown-user,
.footer-column h4,
.wrap .panel h1 {
  font-family: "Fraunces", Georgia, serif !important;
  letter-spacing: -0.025em;
}

.site-top {
  backdrop-filter: blur(12px);
}

.promo-bar {
  background: linear-gradient(90deg, #184b89 0%, #1f5fa8 45%, #2b78c5 100%) !important;
  box-shadow: 0 10px 24px rgba(15, 63, 117, 0.2);
}

.header {
  background: rgba(255, 255, 255, 0.82) !important;
  border-bottom: 1px solid rgba(147, 180, 214, 0.22) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(23, 48, 71, 0.08);
}

.header-inner {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.logo-image,
.footer-logo-image {
  filter: drop-shadow(0 8px 16px rgba(23, 48, 71, 0.16));
}

.search-wrap {
  border-radius: 18px !important;
  border-color: rgba(141, 172, 205, 0.38) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 22px rgba(23, 48, 71, 0.08);
}

.search-wrap input {
  background: transparent !important;
  color: var(--text) !important;
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}

.search-wrap input::placeholder {
  color: #8b99a8;
}

.search-wrap button {
  background: linear-gradient(180deg, #2c79c4 0%, #1f5fa8 100%) !important;
  box-shadow: none !important;
}

.header-action .icon,
.account-trigger .icon {
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%) !important;
  border-color: rgba(143, 173, 205, 0.36) !important;
  box-shadow: 0 8px 18px rgba(23, 48, 71, 0.1);
}

.account-dropdown {
  border-radius: 20px !important;
  border-color: rgba(147, 180, 214, 0.26) !important;
  box-shadow: 0 24px 50px rgba(17, 56, 96, 0.16) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  overflow: hidden;
}

.dropdown-item:hover {
  background: linear-gradient(90deg, rgba(31, 95, 168, 0.08), rgba(64, 169, 81, 0.08)) !important;
}

.page,
.shell {
  padding-top: 34px !important;
  padding-bottom: 78px !important;
}

.breadcrumbs {
  color: #6e8197 !important;
}

.breadcrumbs a:hover {
  color: var(--brand-blue) !important;
}

.card,
.panel,
.result-card,
.info-card,
.mini-card,
.summary-card,
.value-card,
.detail-box,
.helper-card,
.library-card,
.qr-link-item,
.school-org-card,
.box-batch-card,
.result-item,
.hero-copy,
.hero-visual,
.collection-card,
.product-card,
.modal,
.notice,
.copy-block {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.92)) !important;
  border-color: rgba(147, 180, 214, 0.26) !important;
  box-shadow: 0 22px 46px rgba(20, 67, 114, 0.1) !important;
  border-radius: 26px !important;
}

.hero-copy {
  background:
    radial-gradient(circle at top left, rgba(64, 169, 81, 0.14), transparent 35%),
    radial-gradient(circle at bottom right, rgba(31, 95, 168, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.95)) !important;
}

.card:hover,
.mini-card:hover,
.summary-card:hover,
.value-card:hover,
.result-item:hover,
.library-card:hover,
.qr-link-item:hover,
.school-org-card:hover,
.box-batch-card:hover {
  transform: translateY(-2px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 26px 52px rgba(20, 67, 114, 0.14) !important;
}

button:not(.account-trigger):not(.dropdown-item),
.btn,
a.btn,
.secondary,
#printBtn {
  border-radius: 16px !important;
  font-weight: 800 !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:not(.account-trigger):not(.dropdown-item):hover,
.btn:hover,
a.btn:hover,
.secondary:hover,
#printBtn:hover {
  transform: translateY(-1px);
}

.btn,
.btn-primary,
button:not(.account-trigger):not(.dropdown-item):not(.secondary):not(.btn-secondary):not(.btn-danger):not(.btn-success) {
  background: linear-gradient(180deg, #2f7dc8 0%, #1f5fa8 100%) !important;
  color: #fff !important;
  box-shadow: 0 14px 26px rgba(31, 95, 168, 0.2);
}

.btn-primary:hover,
button:not(.account-trigger):not(.dropdown-item):not(.secondary):not(.btn-secondary):not(.btn-danger):not(.btn-success):hover {
  background: linear-gradient(180deg, #2a73ba 0%, #173f79 100%) !important;
}

.btn-secondary,
button.secondary,
a.secondary,
#backBtn,
#signInBtn,
#copyBoxBatchCsvBtn,
#copyQrPatternBtn,
#copyManualBaseUrlBtn,
#copyEditorQrBtn,
#clearBtn,
#editorCloseBtn,
#cancelEditorBtn {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--brand-blue) !important;
  border: 1px solid rgba(124, 158, 194, 0.42) !important;
  box-shadow: 0 10px 24px rgba(20, 67, 114, 0.08);
}

.btn-success,
button.btn-success {
  background: linear-gradient(180deg, #4ec762 0%, #379747 100%) !important;
  color: #fff !important;
}

.btn-danger,
button.btn-danger {
  background: linear-gradient(180deg, #e25a5a 0%, #c93333 100%) !important;
  color: #fff !important;
}

.search-wrap button,
.search-wrap button:hover {
  background: linear-gradient(180deg, #2c79c4 0%, #1f5fa8 100%) !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}

.field input,
.field select,
.field textarea,
.form-group input,
.form-group textarea,
.form-group select,
input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
  border-radius: 16px !important;
  border: 1px solid rgba(147, 180, 214, 0.38) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: rgba(52, 117, 183, 0.56) !important;
  box-shadow: 0 0 0 4px rgba(31, 95, 168, 0.1) !important;
  outline: none;
}

.msg,
.error,
.error-box,
.success-box,
.loading-box,
.notice,
.message {
  border-radius: 18px !important;
  box-shadow: 0 12px 24px rgba(20, 67, 114, 0.08);
}

.table-wrap {
  border-radius: 24px !important;
  border-color: rgba(147, 180, 214, 0.26) !important;
  box-shadow: 0 16px 30px rgba(20, 67, 114, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

table {
  background: rgba(255, 255, 255, 0.88) !important;
}

th {
  background: rgba(241, 247, 255, 0.95) !important;
}

.empty-state,
.email-preview,
.helper-card code,
.qr-link-url {
  border-radius: 18px !important;
  border-color: rgba(147, 180, 214, 0.28) !important;
}

.chip,
.set-chip,
.column-chip,
.language-chip,
.status-pill,
.pill {
  border-radius: 999px !important;
  border-color: rgba(147, 180, 214, 0.3) !important;
  background: rgba(246, 250, 255, 0.94) !important;
  color: var(--text) !important;
}

.footer {
  background: linear-gradient(180deg, #0a1f3f 0%, #08162e 100%) !important;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(64, 169, 81, 0.18), transparent 26%),
    radial-gradient(circle at 85% 10%, rgba(31, 95, 168, 0.22), transparent 24%);
  pointer-events: none;
}

.footer-inner,
.footer-bottom {
  position: relative;
  z-index: 1;
}

.footer-brand p,
.footer-links a,
.footer-bottom p {
  color: rgba(255, 255, 255, 0.72) !important;
}

.footer-links a:hover {
  color: #ffffff !important;
}

.wrap .panel {
  max-width: 460px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.94)) !important;
  border: 1px solid rgba(147, 180, 214, 0.28);
  border-radius: 30px !important;
  box-shadow: 0 30px 60px rgba(20, 67, 114, 0.14);
}

.wrap .logo strong,
.panel .logo strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .header {
    backdrop-filter: blur(14px);
  }

  .page,
  .shell {
    padding-top: 24px !important;
  }
}

@media (max-width: 640px) {
  .promo-bar {
    font-size: 0.82rem !important;
  }

  .card,
  .panel,
  .result-card,
  .info-card,
  .mini-card,
  .summary-card,
  .value-card,
  .detail-box,
  .helper-card,
  .library-card,
  .qr-link-item,
  .school-org-card,
  .box-batch-card,
  .result-item,
  .hero-copy,
  .hero-visual {
    border-radius: 22px !important;
  }
}


body.theme-store,
body.theme-account,
body.theme-admin,
body.theme-auth,
body.theme-flashcards {
  position: relative;
}

body.theme-store::before,
body.theme-account::before,
body.theme-admin::before,
body.theme-auth::before,
body.theme-flashcards::before,
body.theme-store::after,
body.theme-account::after,
body.theme-admin::after,
body.theme-auth::after,
body.theme-flashcards::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 38vw;
  height: 38vw;
  max-width: 480px;
  max-height: 480px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.7;
  z-index: -1;
}

body.theme-store::before {
  top: -120px;
  left: -90px;
  background: radial-gradient(circle, rgba(240, 178, 45, 0.18), transparent 65%);
}

body.theme-store::after {
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(64, 169, 81, 0.16), transparent 65%);
}

body.theme-admin::before {
  top: -120px;
  right: -110px;
  background: radial-gradient(circle, rgba(31, 95, 168, 0.18), transparent 66%);
}

body.theme-admin::after {
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(84, 111, 142, 0.16), transparent 64%);
}

body.theme-account::before {
  top: -140px;
  left: -100px;
  background: radial-gradient(circle, rgba(64, 169, 81, 0.15), transparent 66%);
}

body.theme-account::after {
  bottom: -160px;
  right: -100px;
  background: radial-gradient(circle, rgba(31, 95, 168, 0.14), transparent 66%);
}

body.theme-auth::before {
  top: -120px;
  right: -110px;
  background: radial-gradient(circle, rgba(240, 178, 45, 0.16), transparent 62%);
}

body.theme-auth::after {
  bottom: -140px;
  left: -110px;
  background: radial-gradient(circle, rgba(31, 95, 168, 0.16), transparent 66%);
}

body.theme-flashcards::before {
  top: -150px;
  left: -110px;
  background: radial-gradient(circle, rgba(31, 95, 168, 0.18), transparent 63%);
}

body.theme-flashcards::after {
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(240, 178, 45, 0.17), transparent 62%);
}

body.theme-store .page-head,
body.theme-account .page-head,
body.theme-admin .page-head,
body.theme-flashcards .page-head {
  padding: 24px 28px;
  border-radius: 28px;
  border: 1px solid rgba(147, 180, 214, 0.24);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,249,255,0.9)),
    radial-gradient(circle at top right, rgba(31,95,168,0.08), transparent 42%);
  box-shadow: 0 20px 42px rgba(20, 67, 114, 0.08);
}

body.theme-store .page-head h1,
body.theme-account .page-head h1,
body.theme-admin .page-head h1,
body.theme-flashcards .page-head h1 {
  color: #12283f;
}

body.page-home .hero-copy {
  border-radius: 34px !important;
  overflow: hidden;
}

body.page-home .hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 178, 45, 0.24), transparent 68%);
}

body.page-home .hero-visual {
  background:
    radial-gradient(circle at 28% 18%, rgba(64, 169, 81, 0.16), transparent 24%),
    radial-gradient(circle at 72% 78%, rgba(31, 95, 168, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,248,255,0.94)) !important;
}

body.page-home .value-card {
  border-radius: 24px !important;
}

body.page-home .eyebrow {
  background: rgba(18, 40, 63, 0.08) !important;
  color: #173f79 !important;
}

body.page-flashcards .content-grid {
  gap: 28px;
}

body.page-flashcards .filter-box {
  position: sticky;
  top: 128px;
}

body.page-flashcards .product-card,
body.page-wishlist .card,
body.page-cart .card {
  overflow: hidden;
}

body.page-flashcards .product-image {
  background:
    radial-gradient(circle at top left, rgba(31,95,168,0.1), transparent 30%),
    linear-gradient(180deg, #f7fbff, #eef4fb) !important;
}

body.page-flashcards .wishlist-btn {
  backdrop-filter: blur(8px);
}

body.page-product .shell,
body.page-cart .shell,
body.page-wishlist .shell,
body.page-support .shell,
body.page-success .shell,
body.page-cancel .shell {
  padding-top: 30px !important;
}

body.page-success .card,
body.page-cancel .card,
body.page-support .card {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

body.theme-auth {
  background:
    radial-gradient(circle at top left, rgba(240, 178, 45, 0.14), transparent 26%),
    radial-gradient(circle at bottom right, rgba(31, 95, 168, 0.15), transparent 32%),
    linear-gradient(180deg, #f9fcff 0%, #eef5fb 100%) !important;
}

body.theme-auth .wrap {
  padding: 28px 18px;
}

body.theme-auth .panel {
  padding: 34px 28px !important;
  position: relative;
  overflow: hidden;
}

body.theme-auth .panel::before {
  content: "";
  position: absolute;
  inset: -60px auto auto -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31,95,168,0.08), transparent 68%);
}

body.theme-auth .sub,
body.theme-auth .email-preview,
body.theme-auth .back-link {
  position: relative;
  z-index: 1;
}

body.theme-auth .logo strong {
  font-size: 1.18rem;
}

body.theme-account .layout,
body.theme-flashcards .layout,
body.theme-admin .layout {
  gap: 28px;
}

body.theme-account .mini-card,
body.theme-account .profile-item,
body.theme-account .summary-card,
body.theme-account .detail-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,251,255,0.94)) !important;
}

body.theme-account .page-head {
  background:
    radial-gradient(circle at top right, rgba(64,169,81,0.08), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,249,255,0.92)) !important;
}

body.theme-admin {
  background:
    linear-gradient(180deg, #f5f8fd 0%, #edf3f9 100%) !important;
}

body.theme-admin .page-head {
  background:
    radial-gradient(circle at top right, rgba(31,95,168,0.1), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(243,247,252,0.94)) !important;
}

body.theme-admin .summary-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,249,253,0.94)) !important;
  box-shadow: 0 14px 30px rgba(20, 67, 114, 0.08);
}

body.theme-admin .card h2,
body.theme-admin .page-head h1 {
  color: #14283d;
}

body.theme-admin .table-wrap th {
  color: #506377 !important;
}

body.page-admin-flashcards .card,
body.page-admin-inventory .card,
body.page-admin-orders .card,
body.page-admin-reviews .card {
  border-radius: 28px !important;
}

body.theme-flashcards {
  background:
    radial-gradient(circle at top left, rgba(31,95,168,0.14), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(240,178,45,0.12), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%) !important;
}

body.theme-flashcards .card-panel,
body.theme-flashcards .audio-panel,
body.theme-flashcards .result-card,
body.theme-flashcards .card {
  border-radius: 30px !important;
}

body.theme-flashcards .audio-item {
  border-radius: 22px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(246,250,255,0.92)),
    radial-gradient(circle at top right, rgba(31,95,168,0.06), transparent 32%) !important;
}

body.theme-flashcards .word-badge,
body.theme-flashcards .chip {
  background: rgba(31,95,168,0.08) !important;
}

body.theme-flashcards .play-btn {
  min-width: 144px;
  letter-spacing: 0.01em;
}

body.page-open-flashcard .helper-card,
body.page-school-access .helper-card,
body.page-activate-set .helper-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,255,0.94)) !important;
}

body.page-open-redirect {
  display: grid;
  place-items: center;
  text-align: center;
}

body.page-open-redirect div {
  padding: 28px 32px;
  border-radius: 28px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 20px 40px rgba(20, 67, 114, 0.1);
}

@media (max-width: 900px) {
  body.theme-store .page-head,
  body.theme-account .page-head,
  body.theme-admin .page-head,
  body.theme-flashcards .page-head {
    padding: 20px 20px;
  }

  body.page-flashcards .filter-box {
    position: static;
  }
}
