@import url("theme.css.php");
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: #fbfaf7; color: #191a1f; }
a { color: inherit; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px clamp(18px, 5vw, 60px); background: #fff; border-bottom: 1px solid #d9dde7; }
.brand { font-weight: 900; font-size: 1.2rem; text-decoration: none; }
.nav { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.language-switch { display: inline-flex; border: 1px solid #cbd1da; border-radius: 7px; overflow: hidden; background: #fff; }
.language-switch a { padding: 8px 10px; text-decoration: none; font-size: .82rem; font-weight: 900; color: #4c5360; }
.language-switch a.active { background: #222733; color: #fff; }
.button, button { min-height: 40px; border: 0; border-radius: 7px; padding: 0 14px; background: #0f766e; color: #fff; font-weight: 850; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.button.secondary, button.secondary { background: #222733; }
.button.light, button.light { background: #e9edf2; color: #191a1f; }
.button.danger, button.danger { background: #b4233c; }
button:disabled, .button.disabled { opacity: .48; cursor: not-allowed; }
.wrap { width: min(1120px, calc(100% - 36px)); margin: 30px auto; }
.hero { position: relative; min-height: 360px; padding: 44px 0 26px; display: flex; align-items: end; overflow: hidden; }
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero-with-image { min-height: 520px; padding: 42px; color: #fff; }
.hero-with-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17,19,24,.82), rgba(17,19,24,.18)); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 5rem); line-height: .95; }
.hero p { max-width: 680px; color: #626671; line-height: 1.55; font-size: 1.1rem; }
.hero-with-image p { color: #fff; }
.home-intro { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 30px; align-items: center; padding: 34px 0; }
.home-intro h2 { font-size: 2rem; margin: 0 0 10px; }
.home-intro p { color: #626671; line-height: 1.65; }
.home-intro img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.editor-preview { width: min(320px, 100%); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; border: 1px solid #d9dde7; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card, .panel { background: #fff; border: 1px solid #d9dde7; border-radius: 8px; box-shadow: 0 10px 30px rgba(31,34,41,.07); overflow: hidden; }
.cover { aspect-ratio: 1 / 1; background: #e7edf3; display: grid; place-items: center; }
.cover img { width: 100%; height: 100%; object-fit: contain; padding: 14px; background: #f7f8fa; }
.cd-gallery { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; padding: 10px 18px 0; }
.cd-gallery img { display: block; width: 64px; height: 64px; object-fit: contain; padding: 3px; background: #f7f8fa; border: 1px solid #d9dde7; border-radius: 6px; }
.gallery-thumb { min-height: 0; padding: 0; border: 2px solid transparent; background: transparent !important; border-radius: 8px; }
.gallery-thumb.active { border-color: #0f766e; }
.gallery-thumb img { border: 0; }
.fake-cover { width: 76%; aspect-ratio: 1 / 1; border-radius: 7px; background: linear-gradient(135deg, #203252, #0f766e); box-shadow: 0 16px 30px rgba(0,0,0,.2); }
.image-placeholder { width: 78%; aspect-ratio: 1/1; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 18px; border: 2px dashed #aeb6c2; border-radius: 8px; color: #626671; text-align: center; background: #f7f8fa; }
.placeholder-icon { font-size: 3rem; line-height: 1; }
.image-placeholder small { font-weight: 700; }
.gallery-missing { width: 68px; height: 68px; display: grid; grid-template-columns: auto 1fr; gap: 3px; place-items: center; padding: 4px; border: 2px dashed #cbd1da; border-radius: 8px; color: #737b88; background: #f7f8fa; text-align: center; }
.gallery-missing span { font-size: 1.25rem; }
.gallery-missing small { font-size: .61rem; line-height: 1.15; font-weight: 850; }
.info, .panel { padding: 18px; }
.meta { display: flex; justify-content: space-between; gap: 12px; }
.price { color: #bf2444; font-weight: 950; white-space: nowrap; }
.muted { color: #626671; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.chip { border: 1px solid #d9dde7; background: #f7f8fa; border-radius: 999px; padding: 5px 9px; font-size: .85rem; font-weight: 800; }
.stars { color: #e3a008; letter-spacing: 1px; white-space: nowrap; }
.empty-stars { color: #cbd1da; }
.layout { display: grid; grid-template-columns: 1fr .85fr; gap: 18px; align-items: start; }
.cart-list { display: grid; gap: 10px; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; border: 1px solid #d9dde7; border-radius: 7px; padding: 10px; }
.download-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid #d9dde7; }
.totals { display: grid; gap: 8px; border-top: 1px solid #d9dde7; margin-top: 14px; padding-top: 14px; }
.total-row { display: flex; justify-content: space-between; gap: 10px; font-weight: 850; }
.total-row.grand { font-size: 1.2rem; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 800; color: #3f4652; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid #d9dde7; border-radius: 7px; padding: 9px 11px; font: inherit; }
input[type="checkbox"] { width: 18px; min-height: 18px; padding: 0; }
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span-2 { grid-column: 1 / -1; }
.notice { padding: 12px; border: 1px solid rgba(15,118,110,.35); background: #eef8f6; border-radius: 7px; color: #0b514d; font-weight: 850; }
.error { padding: 12px; border: 1px solid rgba(180,35,60,.35); background: #fff1f3; border-radius: 7px; color: #b4233c; font-weight: 850; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #d9dde7; }
.table th, .table td { padding: 10px; border-bottom: 1px solid #d9dde7; text-align: left; vertical-align: top; }
.thumb { width: 70px; height: 70px; border-radius: 6px; object-fit: cover; background: #e7edf3; }
.forum-list { display: grid; gap: 12px; }
.forum-topic { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 16px; border: 1px solid #d9dde7; border-radius: 7px; text-decoration: none; background: #fff; }
.forum-topic:hover { border-color: #0f766e; }
.forum-topic h2 { margin: 0 0 6px; font-size: 1.08rem; }
.forum-post { padding: 18px 0; border-bottom: 1px solid #d9dde7; }
.forum-post:last-child { border-bottom: 0; }
.forum-post-body { white-space: pre-wrap; line-height: 1.6; }
.user-list { display: grid; gap: 12px; }
.user-row { display: grid; gap: 16px; padding: 16px; border: 1px solid #d9dde7; border-radius: 7px; }
.user-row-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.user-controls { display: grid; grid-template-columns: minmax(340px,1.4fr) minmax(260px,1fr) auto auto; gap: 10px; align-items: end; padding-top: 14px; border-top: 1px solid #d9dde7; }
.credit-control { display: grid; grid-template-columns: minmax(90px,130px) 1fr; gap: 8px; align-items: end; }
.button-group { display: flex; flex-wrap: wrap; gap: 6px; }
.user-action { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.admin-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 18px 0; }
.credit-summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.credit-summary h1 { margin-top: 0; }
.credit-balance { min-width: 130px; display: grid; place-items: center; padding: 18px; border-radius: 8px; background: #eef8f6; color: #0f766e; }
.credit-balance strong { font-size: 2.6rem; line-height: 1; }
.stat-card { display: grid; gap: 4px; padding: 20px; background: #fff; border: 1px solid #d9dde7; border-radius: 8px; box-shadow: 0 10px 30px rgba(31,34,41,.07); }
.stat-number { font-size: 2.25rem; line-height: 1; font-weight: 950; color: #0f766e; }
.cd-view-switch { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.cd-list-row { scroll-margin-top: 20px; }
.cd-list-row:target { background: #fff7d6; animation: saved-row-highlight 2.5s ease-out; }
@keyframes saved-row-highlight { from { background: #ffe28a; } to { background: #fff7d6; } }
.site-footer { margin-top: 54px; background: #222733; color: #f7f8fa; }
.footer-grid { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 38px 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 30px; }
.site-footer h2 { margin: 0 0 12px; font-size: 1.05rem; }
.site-footer p { margin: 0 0 12px; color: #cbd1da; line-height: 1.6; }
.site-footer a { color: #fff; font-weight: 800; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 16px 18px; text-align: center; color: #cbd1da; }
.news-section { margin: 28px 0; }
.section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 16px; }
.section-heading h2 { margin: 0 0 5px; }
.section-heading p { margin: 0; }
.news-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.news-card { background: #fff; border: 1px solid #d9dde7; border-radius: 8px; padding: 16px; }
.news-card time { color: #626671; font-size: .82rem; font-weight: 800; }
.news-card h3 { margin: 8px 0 0; font-size: 1rem; line-height: 1.4; }
.news-card a { text-decoration: none; }
.news-card a:hover { text-decoration: underline; }
@media (max-width: 850px) { .grid, .layout, .form-grid, .home-intro, .user-action, .user-controls, .credit-control, .footer-grid, .news-grid, .admin-stats { grid-template-columns: 1fr; } .user-row-head { align-items: stretch; flex-direction: column; } .credit-summary { align-items: stretch; flex-direction: column; } .span-2 { grid-column: auto; } .cart-row { grid-template-columns: 1fr; } .download-row { align-items: stretch; flex-direction: column; } .hero-with-image { min-height: 440px; padding: 24px; } }
.text-format-button {
  display: block;
  width: auto;
  margin: 6px 0;
  padding: 7px 14px;
  font-weight: 700;
}
.pending-user-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 2px solid #e39b13;
  border-radius: 10px;
  background: #fff4cf;
  color: #4c3500;
  box-shadow: 0 5px 18px rgba(126, 82, 0, .14);
}
.pending-user-alert strong,
.pending-user-alert span { display: block; }
.pending-user-alert strong { margin-bottom: 4px; font-size: 1.08rem; }
.pending-user-alert .button { flex: 0 0 auto; }
.pending-user-alert.no-pending-users {
  border-color: #4a9b63;
  background: #e7f7ec;
  color: #174d28;
  box-shadow: none;
}
.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d72638;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
@media (max-width: 650px) {
  .pending-user-alert { align-items: stretch; flex-direction: column; }
  .pending-user-alert .button { text-align: center; }
}
