/* Claim Parlay v3.4.3 — Unified BOLAPELANGI Comfort UI
   One palette for public claim + status pages. No orange legacy layer. */

:root{
  color-scheme:light;
  --brand:#1BB1CA;
  --front-accent:#1BB1CA;
  --front-accent-strong:#16879a;
  --front-accent-hover:#1595aa;
  --front-accent-soft:rgba(27,177,202,.11);
  --front-accent-soft-2:rgba(27,177,202,.065);
  --front-accent-line:rgba(27,177,202,.25);

  --front-bg:#e8eef1;
  --front-bg-2:#edf2f4;
  --front-surface:#f3f6f7;
  --front-surface-2:#eaf0f2;
  --front-surface-3:#e1e9ec;
  --front-input:#e5ecef;
  --front-input-hover:#edf2f4;
  --front-text:#314454;
  --front-heading:#203443;
  --front-muted:#718693;
  --front-subtle:#8799a5;
  --front-border:#ccd8de;
  --front-border-soft:#d9e3e7;
  --front-shadow:0 10px 26px rgba(34,61,74,.055);
  --front-shadow-hover:0 14px 32px rgba(34,61,74,.08);

  --front-success:#3f7f5d;
  --front-success-bg:#e3efe8;
  --front-warning:#946e31;
  --front-warning-bg:#f1eadc;
  --front-danger:#9b5159;
  --front-danger-bg:#f2e4e6;
}

html[data-theme="dark"]{
  color-scheme:dark;
  --front-accent:#1BB1CA;
  --front-accent-strong:#64cad9;
  --front-accent-hover:#45c3d5;
  --front-accent-soft:rgba(27,177,202,.12);
  --front-accent-soft-2:rgba(27,177,202,.07);
  --front-accent-line:rgba(72,190,210,.24);

  --front-bg:#10171d;
  --front-bg-2:#131c23;
  --front-surface:#18232b;
  --front-surface-2:#1c2932;
  --front-surface-3:#22333d;
  --front-input:#20303a;
  --front-input-hover:#243640;
  --front-text:#d6e4ea;
  --front-heading:#edf6f8;
  --front-muted:#9eb0ba;
  --front-subtle:#8296a2;
  --front-border:#2d414c;
  --front-border-soft:#263842;
  --front-shadow:0 12px 30px rgba(0,0,0,.20);
  --front-shadow-hover:0 16px 36px rgba(0,0,0,.25);

  --front-success:#83c39d;
  --front-success-bg:#1c3027;
  --front-warning:#d5ad68;
  --front-warning-bg:#342d20;
  --front-danger:#da8c93;
  --front-danger-bg:#342329;
}

*{box-sizing:border-box}
html,body{min-height:100%}
html{background:var(--front-bg)!important}
body{
  margin:0!important;
  color:var(--front-text)!important;
  background:
    radial-gradient(circle at 10% -8%,var(--front-accent-soft),transparent 32%),
    linear-gradient(180deg,var(--front-bg),var(--front-bg-2))!important;
  font-family:Inter,"Segoe UI",Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body:before,body:after,.bg-only-anim-layer,.bg-sweep{display:none!important}
a{color:inherit}

/* Layout */
.container{width:min(1120px,calc(100% - 36px))!important}
.page,.page-shell{
  background:transparent!important;
  color:var(--front-text)!important;
  padding-top:26px!important;
  padding-bottom:38px!important;
}
.main-grid,.content-grid{gap:18px!important}

/* Header: same visual language as admin */
.site-header{
  background:color-mix(in srgb,var(--front-surface) 94%,transparent)!important;
  border-bottom:1px solid var(--front-border)!important;
  box-shadow:0 3px 16px rgba(34,61,74,.045)!important;
  backdrop-filter:blur(16px)!important;
}
.header-inner{min-height:70px!important}
.brand-logo,.brand-fallback{
  width:42px!important;height:42px!important;border-radius:12px!important;
  background:var(--front-surface-2)!important;
  border:1px solid var(--front-border)!important;
  box-shadow:none!important;filter:none!important;
}
.brand-logo{padding:4px!important}
.brand-fallback{
  display:grid!important;place-items:center!important;
  color:#f7fdff!important;background:var(--front-accent)!important;
}
.brand-name{
  color:var(--front-heading)!important;
  font-size:18px!important;font-weight:900!important;letter-spacing:-.035em!important;
  text-shadow:none!important;
}
.brand-sub{color:var(--front-subtle)!important;font-size:9px!important;letter-spacing:.15em!important}
.header-actions{gap:7px!important}
.header-link,.header-btn,.hero-btn,.hero-status-btn{
  min-height:39px!important;padding:0 14px!important;border-radius:10px!important;
  font-size:12px!important;font-weight:800!important;box-shadow:none!important;
  transition:.16s ease!important;
}
.header-link,.hero-status-btn{
  background:var(--front-surface)!important;color:var(--front-text)!important;
  border:1px solid var(--front-border)!important;
}
.header-link:hover,.hero-status-btn:hover{
  background:var(--front-accent-soft)!important;color:var(--front-accent-strong)!important;
  border-color:var(--front-accent-line)!important;
}
.header-btn,.hero-btn,.btn-primary,.submit-btn,button[type="submit"]{
  background:var(--front-accent)!important;color:#f7fdff!important;
  border:1px solid var(--front-accent)!important;box-shadow:none!important;
}
.header-btn:hover,.hero-btn:hover,.btn-primary:hover,.submit-btn:hover,button[type="submit"]:hover{
  background:var(--front-accent-hover)!important;border-color:var(--front-accent-hover)!important;
  transform:translateY(-1px)!important;
}
.front-theme-toggle{
  width:39px!important;height:39px!important;border-radius:10px!important;
  border:1px solid var(--front-border)!important;background:var(--front-surface)!important;
  color:var(--front-muted)!important;display:inline-grid!important;place-items:center!important;
  box-shadow:none!important;cursor:pointer!important;
}
.front-theme-toggle:hover{background:var(--front-accent-soft)!important;border-color:var(--front-accent-line)!important;color:var(--front-accent-strong)!important}
.front-theme-toggle svg{width:17px!important;height:17px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important}
.front-theme-toggle .theme-sun{display:none!important}
html[data-theme="dark"] .front-theme-toggle .theme-moon{display:none!important}
html[data-theme="dark"] .front-theme-toggle .theme-sun{display:block!important}

/* Surfaces */
.hero-card,.panel-card,.rules-panel,.status-card,.search-card,.result-card,.history-item,.claim-popup{
  background:var(--front-surface)!important;
  border:1px solid var(--front-border)!important;
  color:var(--front-text)!important;
  box-shadow:var(--front-shadow)!important;
}
.hero-card:before,.hero-card:after,.panel-card:before,.panel-card:after,.rule-favorite:before{display:none!important}
.hero-card{border-radius:17px!important;padding:26px 28px!important;margin-bottom:18px!important}
.panel-card,.rules-panel{border-radius:15px!important;overflow:hidden!important}
.rules-panel{margin-top:18px!important;margin-bottom:18px!important}
.section-head{
  padding:18px 20px!important;
  background:transparent!important;
  border-bottom:1px solid var(--front-border-soft)!important;
}
.section-head h2{margin:0!important;color:var(--front-heading)!important;font-size:20px!important;letter-spacing:-.025em!important}
.section-head p{margin:6px 0 0!important;color:var(--front-muted)!important;line-height:1.55!important;font-size:12px!important}
.card-body{padding:20px!important}

/* Hero */
.kicker{
  color:var(--front-accent-strong)!important;background:var(--front-accent-soft)!important;
  border:1px solid var(--front-accent-line)!important;box-shadow:none!important;
  border-radius:999px!important;padding:7px 11px!important;font-size:10px!important;
}
.kicker:before{background:var(--front-accent)!important;box-shadow:none!important}
.hero-title,.hero-card h1{
  color:var(--front-heading)!important;text-shadow:none!important;
  font-size:clamp(32px,4.2vw,48px)!important;letter-spacing:-.045em!important;
}
.hero-desc,.hero-card p{color:var(--front-muted)!important;line-height:1.68!important}
.hero-actions{gap:8px!important}
.banner-wrap{
  border-radius:12px!important;border:1px solid var(--front-border)!important;
  background:var(--front-surface-2)!important;box-shadow:none!important;
}

/* Rules */
.rules-list{gap:9px!important}
.rule-item{
  grid-template-columns:38px minmax(0,1fr)!important;gap:11px!important;
  padding:12px!important;border-radius:11px!important;
  background:var(--front-surface-2)!important;border:1px solid var(--front-border)!important;
  color:var(--front-text)!important;box-shadow:none!important;
}
.rule-number,.history-number,.join-count{
  background:var(--front-accent-soft)!important;color:var(--front-accent-strong)!important;
  border:1px solid var(--front-accent-line)!important;box-shadow:none!important;
}
.rule-number{width:32px!important;height:32px!important;border-radius:9px!important}
.rule-copy{color:var(--front-text)!important;font-size:12px!important}
.rule-copy a,.form-status-link a{color:var(--front-accent-strong)!important}
.rule-favorite{background:color-mix(in srgb,var(--front-surface-2) 92%,var(--front-warning-bg))!important;border-color:color-mix(in srgb,var(--front-warning) 24%,var(--front-border))!important;box-shadow:none!important}
.rule-fav-badge{background:var(--front-warning-bg)!important;color:var(--front-warning)!important;border-color:color-mix(in srgb,var(--front-warning) 28%,transparent)!important}

/* Form */
.form-grid{gap:14px!important}
label{color:var(--front-text)!important;font-size:12px!important;font-weight:800!important;margin-bottom:7px!important}
.required-mark{color:#d77c86!important}
input[type="text"],input[type="tel"],input[type="email"],input[type="number"],input[type="password"],select,textarea{
  width:100%!important;min-height:47px!important;
  border:1px solid var(--front-border)!important;border-radius:10px!important;
  background:var(--front-input)!important;color:var(--front-heading)!important;
  padding:12px 13px!important;outline:none!important;box-shadow:none!important;
  font:inherit!important;font-size:13px!important;font-weight:650!important;
  transition:.16s ease!important;
}
input::placeholder,textarea::placeholder{color:var(--front-subtle)!important;opacity:1!important}
input[type="text"]:hover,input[type="tel"]:hover,input[type="email"]:hover,input[type="number"]:hover,input[type="password"]:hover,select:hover,textarea:hover{background:var(--front-input-hover)!important}
input:focus,select:focus,textarea:focus{
  background:var(--front-surface)!important;border-color:var(--front-accent)!important;
  box-shadow:0 0 0 3px var(--front-accent-soft)!important;
}

/* Upload cards: remove native white browser controls completely */
.file-box,.join-upload-area,.join-file-card{
  background:var(--front-surface-2)!important;border:1px solid var(--front-border)!important;
  box-shadow:none!important;
}
.file-box{border-radius:12px!important;padding:13px!important}
.join-upload-area{border-radius:13px!important;padding:13px!important;gap:10px!important}
.join-file-card{border-radius:11px!important;padding:12px!important}
.join-upload-head{gap:10px!important}
.join-upload-head h3{color:var(--front-heading)!important;font-size:17px!important}
.join-upload-head p{color:var(--front-muted)!important;font-size:11px!important}
.join-count{min-height:30px!important;padding:0 10px!important;font-size:10px!important}
.upload-control{
  position:relative!important;display:flex!important;align-items:center!important;gap:10px!important;
  width:100%!important;min-height:56px!important;margin:0!important;padding:8px!important;
  border-radius:10px!important;border:1px solid var(--front-border)!important;
  background:var(--front-input)!important;color:var(--front-text)!important;
  cursor:pointer!important;transition:.16s ease!important;overflow:hidden!important;
}
.upload-control:hover{background:var(--front-input-hover)!important;border-color:var(--front-accent-line)!important}
.upload-control:focus-within{border-color:var(--front-accent)!important;box-shadow:0 0 0 3px var(--front-accent-soft)!important}
.upload-native{
  position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;
  overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;
  white-space:nowrap!important;pointer-events:none!important;
}
.upload-icon{
  width:38px!important;height:38px!important;flex:0 0 38px!important;border-radius:9px!important;
  display:grid!important;place-items:center!important;background:var(--front-accent-soft)!important;
  color:var(--front-accent-strong)!important;border:1px solid var(--front-accent-line)!important;
}
.upload-icon svg{width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.upload-copy{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important;flex:1!important}
.upload-copy strong{color:var(--front-heading)!important;font-size:11px!important;font-weight:850!important;line-height:1.25!important}
.upload-control-name{color:var(--front-muted)!important;font-size:10px!important;font-weight:650!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.upload-control.has-file{border-color:var(--front-accent-line)!important;background:color-mix(in srgb,var(--front-input) 90%,var(--front-accent-soft))!important}
.upload-control.has-file .upload-control-name{color:var(--front-accent-strong)!important}
.upload-action{
  flex:0 0 auto!important;min-height:34px!important;padding:0 11px!important;border-radius:8px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  background:var(--front-surface)!important;color:var(--front-text)!important;
  border:1px solid var(--front-border)!important;font-size:10px!important;font-weight:850!important;
}
.upload-control:hover .upload-action{background:var(--front-accent-soft)!important;color:var(--front-accent-strong)!important;border-color:var(--front-accent-line)!important}
.file-note{margin-top:7px!important;color:var(--front-muted)!important;font-size:10px!important;line-height:1.45!important}
.file-name{display:none!important}

/* Submit / notices */
.submit-btn,.btn-primary,button[type="submit"]{min-height:49px!important;border-radius:10px!important;font-weight:850!important}
.submit-note,.form-status-link,.empty,.notice.info{
  background:var(--front-surface-2)!important;border:1px solid var(--front-border)!important;
  color:var(--front-muted)!important;border-radius:10px!important;box-shadow:none!important;
}
.submit-note,.form-status-link{padding:11px!important;font-size:11px!important}
.alert-success,.status-approved,.badge.ok{background:var(--front-success-bg)!important;color:var(--front-success)!important;border-color:color-mix(in srgb,var(--front-success) 28%,transparent)!important}
.alert-error,.notice.err,.status-rejected,.badge.bad{background:var(--front-danger-bg)!important;color:var(--front-danger)!important;border-color:color-mix(in srgb,var(--front-danger) 28%,transparent)!important}
.status-pending,.status-processed,.badge.wait{background:var(--front-warning-bg)!important;color:var(--front-warning)!important;border-color:color-mix(in srgb,var(--front-warning) 28%,transparent)!important}
.badge.info{background:var(--front-accent-soft)!important;color:var(--front-accent-strong)!important;border-color:var(--front-accent-line)!important}

/* History and status result */
.history-list{gap:8px!important}
.history-item{
  min-height:56px!important;padding:10px 11px!important;border-radius:10px!important;
  background:var(--front-surface-2)!important;border-color:var(--front-border)!important;box-shadow:none!important;
}
.history-number{border-radius:8px!important}
.history-item b,.claim-code-item b,.kv span,.status-top h2,.result-card h2,.result-card h3{color:var(--front-heading)!important}
.history-item span,.history-total-note,.file-note,.form-status-link,.claim-code-item span,.status-top p,.result-meta,.search-help,.site-footer,.footer{color:var(--front-muted)!important}
.history-page{background:var(--front-surface)!important;border-color:var(--front-border)!important;color:var(--front-text)!important}
.history-page.active{background:var(--front-accent)!important;border-color:var(--front-accent)!important;color:#f7fdff!important}
.status-card,.search-card,.result-card{border-radius:12px!important;background:var(--front-surface-2)!important;border-color:var(--front-border)!important;box-shadow:none!important}
.status-top{border-color:var(--front-border-soft)!important}
.kv,.claim-code-item,.step{
  background:var(--front-surface-2)!important;border-color:var(--front-border)!important;box-shadow:none!important;
}
.kv b,.step span{color:var(--front-muted)!important}
.step-dot{background:var(--front-accent-soft)!important;color:var(--front-accent-strong)!important;box-shadow:none!important;border:1px solid var(--front-accent-line)!important}
.btn-alt{
  background:var(--front-surface)!important;color:var(--front-text)!important;
  border:1px solid var(--front-border)!important;border-radius:9px!important;box-shadow:none!important;
}
.btn-alt:hover{background:var(--front-accent-soft)!important;color:var(--front-accent-strong)!important;border-color:var(--front-accent-line)!important}

/* Popup */
.claim-popup-overlay{background:rgba(9,16,21,.52)!important;backdrop-filter:blur(5px)!important}
.claim-popup{border-radius:14px!important}
.claim-popup-icon{background:var(--front-success-bg)!important;color:var(--front-success)!important;border-color:color-mix(in srgb,var(--front-success) 28%,transparent)!important}
.claim-popup-error .claim-popup-icon{background:var(--front-danger-bg)!important;color:var(--front-danger)!important;border-color:color-mix(in srgb,var(--front-danger) 28%,transparent)!important}
.claim-popup-btn{background:var(--front-accent)!important;color:#f7fdff!important;border-color:var(--front-accent)!important}
.claim-popup-btn-alt{background:var(--front-surface)!important;color:var(--front-text)!important;border-color:var(--front-border)!important}

/* Safety: force every public surface to follow selected theme. */
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .panel-card,
html[data-theme="dark"] .rules-panel,
html[data-theme="dark"] .status-card,
html[data-theme="dark"] .search-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .claim-popup{background:var(--front-surface)!important}
html[data-theme="dark"] .file-box,
html[data-theme="dark"] .join-upload-area,
html[data-theme="dark"] .join-file-card,
html[data-theme="dark"] .rule-item,
html[data-theme="dark"] .kv,
html[data-theme="dark"] .step,
html[data-theme="dark"] .claim-code-item{background:var(--front-surface-2)!important}
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .upload-control{background:var(--front-input)!important;color:var(--front-heading)!important}

@media(max-width:980px){
  .main-grid,.content-grid{grid-template-columns:1fr!important}
}
@media(max-width:760px){
  .container{width:min(100% - 24px,1120px)!important}
  .header-inner{padding:10px 0!important;min-height:auto!important}
  .brand-logo,.brand-fallback{width:39px!important;height:39px!important}
  .brand-name{font-size:16px!important}.brand-sub{display:none!important}
  .header-actions{gap:6px!important}.header-link{display:none!important}
  .header-btn{min-height:37px!important;padding:0 11px!important}
  .hero-card{padding:20px!important;border-radius:14px!important}
  .hero-title,.hero-card h1{font-size:31px!important}
  .section-head,.card-body{padding-left:15px!important;padding-right:15px!important}
  .upload-control{min-height:54px!important}
  .upload-action{padding:0 9px!important}
}
@media(max-width:480px){
  .upload-action{display:none!important}
  .upload-icon{width:36px!important;height:36px!important;flex-basis:36px!important}
  .join-file-card{padding:10px!important}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
