/* FaltaEssa — premium mobile-first */

:root {
    --green-900: #0a3d2e;
    --green-800: #0f5238;
    --green-700: #117a4a;
    --green-600: #18a060;
    --green-500: #2ec27e;
    --green-50:  #e8f7ef;
    --yellow:    #ffd400;
    --yellow-d:  #e8c200;
    --blue:      #1e6fb8;
    --red:       #d6342c;
    --red-soft:  #fde7e6;
    --gray-900:  #0f1419;
    --gray-700:  #364152;
    --gray-500:  #6b7280;
    --gray-300:  #d4d8dd;
    --gray-200:  #e6e9ee;
    --gray-100:  #f3f5f7;
    --gray-50:   #f8f9fb;
    --white:     #ffffff;
    --shadow-sm: 0 1px 2px rgba(15,30,25,.06), 0 1px 1px rgba(15,30,25,.04);
    --shadow-md: 0 4px 14px rgba(15,30,25,.08), 0 2px 4px rgba(15,30,25,.04);
    --shadow-lg: 0 12px 30px rgba(15,30,25,.12), 0 4px 10px rgba(15,30,25,.06);
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;
    --safe-bot:  env(safe-area-inset-bottom, 0px);
    --nav-h:     64px;
    --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overscroll-behavior-y: contain;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-800); }
button { font-family: inherit; }

/* Layout shells */
.app__main { padding: 16px 16px calc(var(--nav-h) + 24px + var(--safe-bot)); max-width: 720px; margin: 0 auto; }
.guest__main { padding: 24px 20px 32px; max-width: 480px; margin: 0 auto; min-height: 100vh; }

/* Bottom nav */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding-bottom: var(--safe-bot);
    z-index: 50;
    box-shadow: 0 -4px 14px rgba(15,30,25,.04);
}
.bottom-nav__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px 4px 8px; gap: 2px;
    color: var(--gray-500); font-size: 11px; font-weight: 600;
    height: var(--nav-h);
    transition: color .15s;
}
.bottom-nav__item svg { width: 22px; height: 22px; }
.bottom-nav__item.is-active { color: var(--green-700); }
.bottom-nav__item.is-active::before {
    content: ""; position: absolute; top: 0; width: 30px; height: 3px;
    background: var(--green-700); border-radius: 0 0 4px 4px;
}
.bottom-nav__item { position: relative; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600; font-size: 15px; cursor: pointer;
    transition: transform .08s, box-shadow .15s, background .15s;
    text-decoration: none;
    min-height: 44px;
}
.btn:active { transform: scale(.98); }
.btn--lg { padding: 14px 20px; font-size: 16px; min-height: 52px; border-radius: var(--radius); }
.btn--block { width: 100%; }
.btn--primary {
    background: linear-gradient(180deg, var(--green-700), var(--green-800));
    color: var(--white);
    box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: linear-gradient(180deg, var(--green-800), var(--green-900)); color: var(--white); }
.btn--ghost {
    background: transparent; color: var(--green-800); border-color: var(--gray-300);
}
.btn--ghost:hover { background: var(--gray-100); }
.btn--accent {
    background: linear-gradient(180deg, var(--yellow), var(--yellow-d));
    color: var(--green-900);
    box-shadow: var(--shadow-md);
}
.btn--danger { background: var(--red); color: var(--white); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__field--grow { flex: 1; }
.form__field--uf { width: 84px; }
.form__row { display: flex; gap: 10px; }
.form__label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.form__hint { font-size: 12px; color: var(--gray-500); }
.form input[type="text"], .form input[type="tel"], .form input[type="password"], .form input[type="email"], .form input[type="number"], .form select, .form textarea {
    width: 100%; padding: 14px 14px; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm); background: var(--white);
    font-size: 16px; color: var(--gray-900); transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none; border-color: var(--green-600);
    box-shadow: 0 0 0 4px rgba(46,194,126,.18);
}
.form__fieldset { border: none; padding: 0; margin: 4px 0; }
.form__fieldset .form__label { display: block; margin-bottom: 10px; }
.form--logout { margin-top: 24px; }

/* Radio cards */
.radio-grid { display: grid; gap: 8px; }
@media (min-width: 480px) { .radio-grid { grid-template-columns: repeat(3, 1fr); } }
.radio-card {
    display: block; padding: 14px 14px; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm); cursor: pointer; background: var(--white);
    transition: border-color .15s, background .15s;
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }
.radio-card--locked {
    opacity: .65;
    background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,212,0,.04) 8px, rgba(255,212,0,.04) 16px);
    cursor: not-allowed;
}
.radio-card--locked .radio-card__title { color: var(--gray-500); }
.scope-premium-hint {
    display: block; margin: 6px 0 4px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--green-800), var(--green-900));
    color: var(--white); border-radius: var(--radius-sm);
    font-size: 13px; text-decoration: none;
    border: 1px solid rgba(255,212,0,.4);
}
.scope-premium-hint:hover { color: var(--white); }
.radio-card__title { display: block; font-weight: 700; font-size: 14px; color: var(--gray-900); }
.radio-card__desc { display: block; font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* Splash */
.splash { display: flex; flex-direction: column; gap: 28px; min-height: 90vh; justify-content: space-between; padding: 16px 4px; }
.splash__brand { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 32px; text-align: center; }
.splash__logo { width: 120px; height: 120px; filter: drop-shadow(0 8px 20px rgba(10,61,46,.3)); }
.splash__logo svg,
.splash__logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.splash__title { font-size: 36px; font-weight: 800; margin: 0; color: var(--green-900); letter-spacing: -.02em; }
.splash__tag { font-size: 17px; color: var(--gray-700); margin: 0; max-width: 320px; }
.splash__cards { display: flex; flex-direction: column; gap: 10px; }
.splash__card { background: var(--white); padding: 14px 16px; border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.splash__card strong { color: var(--green-900); font-size: 15px; }
.splash__card span { font-size: 13px; color: var(--gray-500); }
.splash__cta { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; }

/* Auth */
.auth { padding-top: 16px; }
.auth__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--green-900); font-size: 18px; margin-bottom: 16px; }
.auth__header h1 { font-size: 26px; margin: 4px 0 4px; color: var(--green-900); letter-spacing: -.01em; }
.auth__header p { color: var(--gray-500); margin: 0 0 18px; }
.auth__links { display: flex; justify-content: space-between; padding-top: 4px; font-size: 14px; }
.auth__links--centered { justify-content: center; }
.auth__terms { font-size: 12px; color: var(--gray-500); text-align: center; margin: 6px 0 0; }

/* Dashboard */
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash__header { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.dash__greet { color: var(--gray-500); font-size: 13px; }
.dash__name { font-size: 24px; margin: 2px 0 0; font-weight: 800; color: var(--green-900); letter-spacing: -.01em; }
.avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--green-700); color: white;
    display: flex; align-items: center; justify-content: center; font-weight: 700; text-decoration: none;
}

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
    background: var(--white); border-radius: var(--radius); padding: 16px 12px;
    display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm);
    text-decoration: none; color: inherit; transition: transform .1s, box-shadow .15s;
    position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gray-300); }
.kpi--danger::before  { background: var(--red); }
.kpi--success::before { background: var(--green-600); }
.kpi--info::before    { background: var(--blue); }
.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kpi__value { font-size: 28px; font-weight: 800; color: var(--green-900); line-height: 1; }
.kpi__label { font-size: 12px; color: var(--gray-500); font-weight: 600; }

.banner-premium {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, var(--green-800), var(--green-700));
    color: var(--white); padding: 16px 18px; border-radius: var(--radius);
    box-shadow: var(--shadow-md); text-decoration: none;
    border: 1px solid rgba(255,212,0,.4);
}
.banner-premium strong { display: block; font-size: 16px; }
.banner-premium span { font-size: 13px; opacity: .85; }
.banner-premium__arrow { font-size: 24px; }
.banner-premium:hover { color: var(--white); transform: translateY(-1px); }

.dash-premium {
    position: relative;
    background: linear-gradient(135deg, var(--green-800) 0%, var(--green-700) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 18px 18px 14px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,212,0,.35);
    overflow: hidden;
}
.dash-premium::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at top right, rgba(255,212,0,.18), transparent 60%);
    pointer-events: none;
}
.dash-premium__head {
    display: flex; align-items: center; gap: 12px;
    padding-bottom: 12px; margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,212,0,.20);
    position: relative;
}
.dash-premium__icon {
    width: 38px; height: 38px; flex: 0 0 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,212,0,.18);
    border: 1px solid rgba(255,212,0,.5);
    border-radius: 50%;
    font-size: 18px; color: #FFD400;
    text-shadow: 0 0 12px rgba(255,212,0,.45);
}
.dash-premium__title strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.dash-premium__title small  { display: block; font-size: 11.5px; opacity: .80; margin-top: 2px; }
.dash-premium__perks {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
    position: relative;
}
.dash-premium__perks li {
    display: flex; align-items: flex-start; gap: 12px;
}
.dash-premium__perk-icon {
    flex: 0 0 30px; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.10);
    border-radius: 8px;
    font-size: 15px;
    line-height: 1;
}
.dash-premium__perks li > div { flex: 1; min-width: 0; }
.dash-premium__perks strong { display: block; font-size: 13.5px; font-weight: 600; }
.dash-premium__perks small  { display: block; font-size: 12px; opacity: .78; margin-top: 1px; line-height: 1.35; }

.quick-actions { display: flex; flex-direction: column; gap: 10px; }
.quick-action {
    display: flex; align-items: center; gap: 14px;
    background: var(--white); padding: 14px 16px; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
}
.quick-action__icon {
    width: 44px; height: 44px; border-radius: 12px; background: var(--green-50);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.quick-action strong { display: block; color: var(--green-900); font-size: 15px; }
.quick-action small { color: var(--gray-500); font-size: 13px; }

/* Page generic */
.page { display: flex; flex-direction: column; gap: 16px; }
.page__header h1 { font-size: 24px; margin: 4px 0; color: var(--green-900); letter-spacing: -.01em; }

/* Flash messages */
.flash-stack {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; flex-direction: column; gap: 6px; padding: env(safe-area-inset-top, 0) 12px 0;
    pointer-events: none;
}
.flash {
    pointer-events: all;
    margin: 8px auto 0; max-width: 480px; width: 100%;
    background: var(--gray-900); color: var(--white);
    padding: 12px 14px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px;
    animation: slideDown .2s ease-out;
}
.flash--success { background: var(--green-700); }
.flash--error   { background: var(--red); }
.flash button { background: transparent; border: 0; color: inherit; font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Error page */
.error-page { text-align: center; padding: 60px 20px; }
.error-page__code { font-size: 80px; font-weight: 800; color: var(--green-800); line-height: 1; }
.error-page h1 { font-size: 22px; margin: 8px 0 4px; }
.error-page p  { color: var(--gray-500); margin: 0 0 18px; }
.error-page__debug { text-align: left; background: var(--gray-100); padding: 12px; border-radius: 8px; font-size: 11px; overflow: auto; margin-top: 18px; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Utilities */
.center { text-align: center; }
.muted  { color: var(--gray-500); }
.hidden { display: none !important; }

/* Tap targets */
button, a, .radio-card, .quick-action, .kpi { -webkit-tap-highlight-color: rgba(46,194,126,.15); }

/* Selo Premium / Verificado */
.premium-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px 2px 6px;
    background: linear-gradient(135deg, rgba(255,212,0,.20), rgba(255,212,0,.08));
    color: var(--green-900);
    border: 1px solid rgba(255,212,0,.55);
    border-radius: 99px;
    font-size: 11px; font-weight: 700; letter-spacing: .02em;
    vertical-align: middle; line-height: 1;
    white-space: nowrap;
}
.premium-badge svg {
    width: 11px; height: 11px;
    fill: var(--green-700);
    flex-shrink: 0;
}
.premium-badge--md { padding: 4px 10px 4px 8px; font-size: 12.5px; }
.premium-badge--md svg { width: 13px; height: 13px; }
.premium-badge__text { line-height: 1; }
.premium-badge--icon { padding: 3px; }
.premium-badge--icon .premium-badge__text { display: none; }

/* Phone input (DDI selector + mask) */
.phone-input {
    position: relative; display: flex; gap: 8px; align-items: stretch;
    width: 100%;
}
.phone-input__country {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 12px; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm); background: var(--white);
    cursor: pointer; font-size: 15px; font-family: inherit; color: var(--gray-900);
    transition: border-color .15s, box-shadow .15s; min-height: 50px;
}
.phone-input__country:hover { border-color: var(--gray-300); }
.phone-input__country[aria-expanded="true"] { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(46,194,126,.18); }
.phone-input__flag-wrap { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 16px; flex-shrink: 0; }
.phone-input__flag {
    width: 22px; height: 16px; object-fit: cover; border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08); display: block;
}
.phone-input__flag-fb {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 16px; background: var(--gray-100); color: var(--gray-700);
    font-size: 10px; font-weight: 700; border-radius: 2px; letter-spacing: -.02em;
}
.phone-input__ddi { font-weight: 700; color: var(--gray-700); font-size: 14px; }
.phone-input__caret { color: var(--gray-500); font-size: 10px; }
.phone-input__number { flex: 1; min-width: 0; }
.phone-input__pop {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm); box-shadow: 0 12px 30px rgba(15,30,25,.15);
    z-index: 60; padding: 8px; max-height: 320px; display: flex; flex-direction: column; gap: 6px;
}
.phone-input__pop[hidden] { display: none; }
.phone-input__search { width: 100%; }
.phone-input__list {
    list-style: none; padding: 0; margin: 0; overflow-y: auto; max-height: 240px;
}
.phone-input__item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 6px; cursor: pointer; font-size: 14px;
}
.phone-input__item:hover, .phone-input__item.is-active { background: var(--gray-100); }
.phone-input__item.is-active { font-weight: 600; }
.phone-input__cname { flex: 1; }
.phone-input__cddi { color: var(--gray-500); font-weight: 600; font-size: 13px; }
.phone-input__empty { padding: 14px; color: var(--gray-500); text-align: center; font-size: 13px; }

/* CEP lookup status */
.cep-status { font-size: 12px; min-height: 16px; color: var(--gray-500); transition: color .15s; }
.cep-status--loading { color: var(--green-700); }
.cep-status--success { color: var(--green-700); font-weight: 600; }
.cep-status--warn    { color: var(--red); }
.form__field--cep    { width: 140px; }

/* Album */
.counter-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--white); padding: 10px 14px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm); font-size: 13px; color: var(--gray-700);
}
.counter-bar a { font-weight: 700; }
.counter-bar--bottom {
    position: sticky; bottom: calc(var(--nav-h) + 8px + var(--safe-bot));
    margin: 16px 0 0; backdrop-filter: blur(6px); background: rgba(255,255,255,.94);
    border: 1px solid var(--gray-200);
}

.group-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    margin-top: 14px;
}
@media (min-width: 520px) { .group-grid { grid-template-columns: repeat(3, 1fr); } }
.group-card {
    background: var(--white); padding: 14px 14px 12px; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
    transition: transform .08s, box-shadow .15s;
}
.group-card:active { transform: scale(.98); }
.group-card:hover { box-shadow: var(--shadow-md); }
.group-card--special { background: linear-gradient(135deg, var(--green-50), #fff8d6); }
.group-card__code { font-size: 11px; font-weight: 700; color: var(--green-700); letter-spacing: .04em; }
.group-card__name { font-size: 15px; font-weight: 700; color: var(--green-900); line-height: 1.2; }
.group-card__stats { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray-500); font-weight: 600; }
.group-card__bar { height: 4px; background: var(--gray-200); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.group-card__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-600), var(--green-700)); border-radius: 99px; transition: width .25s; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-300); }
.dot--red    { background: var(--red); }
.dot--green  { background: var(--green-600); }

.album-group { display: flex; flex-direction: column; gap: 14px; }
.album-group__header { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.album-group__header h1 { font-size: 22px; margin: 0; color: var(--green-900); }
.back-link {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm);
    color: var(--green-900); font-size: 20px; text-decoration: none;
}

.mode-toggle {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    background: var(--gray-200); padding: 4px; border-radius: 999px;
}
.mode-toggle__btn {
    border: 0; background: transparent; padding: 10px 12px; border-radius: 999px;
    font-weight: 700; font-size: 13px; color: var(--gray-700); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: background .15s, color .15s, box-shadow .15s;
}
.mode-toggle__btn.is-active { background: var(--white); color: var(--green-900); box-shadow: var(--shadow-sm); }

.sticker-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.sticker {
    aspect-ratio: 1 / 1.2; border: 2px solid var(--gray-200); background: var(--white);
    border-radius: var(--radius-sm); cursor: pointer; position: relative;
    display: flex; align-items: center; justify-content: center; padding: 0;
    transition: transform .08s, border-color .15s, background .15s;
}
.sticker:active { transform: scale(.94); }
.sticker__num { font-weight: 800; color: var(--gray-500); font-size: 16px; }
.sticker__check { display: none; }
.sticker--wanted {
    background: var(--red-soft); border-color: var(--red);
}
.sticker--wanted .sticker__num { color: var(--red); }
.sticker--repeated {
    background: var(--green-50); border-color: var(--green-600);
}
.sticker--repeated .sticker__num { color: var(--green-700); }

/* Chips & lists */
.list-rows { list-style: none; padding: 0; margin: 0; }
.list-rows__group { display: flex; justify-content: space-between; padding: 14px 4px 6px; font-size: 14px; }
.list-rows__group a { font-size: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 6px; }
.chip {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 38px; padding: 0 10px;
    border-radius: 8px; background: var(--white); box-shadow: var(--shadow-sm);
    font-weight: 700; font-size: 13px; text-decoration: none; color: var(--gray-700);
}
.chip--wanted   { background: var(--red-soft);  color: var(--red); }
.chip--repeated { background: var(--green-50);  color: var(--green-700); }

.empty { text-align: center; padding: 32px 16px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.empty p { margin: 0 0 14px; color: var(--gray-500); }

/* Premium */
.premium { display: flex; flex-direction: column; gap: 18px; }
.premium__hero {
    background: linear-gradient(135deg, var(--green-800), var(--green-900));
    color: var(--white); padding: 24px 22px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,212,0,.4);
}
.premium__badge {
    display: inline-block; background: var(--yellow); color: var(--green-900);
    padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 11px; letter-spacing: .05em;
}
.premium__hero h1 { font-size: 26px; margin: 10px 0 4px; letter-spacing: -.01em; line-height: 1.15; }
.premium__hero p  { margin: 0; opacity: .9; }
.premium__active {
    background: var(--green-700); color: var(--white); padding: 16px; border-radius: var(--radius);
    display: flex; flex-direction: column; gap: 4px;
}
.premium__price { display: flex; align-items: baseline; gap: 4px; padding: 8px 4px; }
.premium__price strong { font-size: 64px; font-weight: 800; line-height: 1; color: var(--green-900); letter-spacing: -.04em; }
.premium__price small { font-size: 18px; font-weight: 700; color: var(--gray-700); }
.premium__price-tag { margin-left: auto; background: var(--green-50); color: var(--green-800); padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.benefits { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.benefits li {
    display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--white);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); font-size: 15px;
}
.benefits li span { font-size: 20px; }
.premium__safe { text-align: center; color: var(--gray-500); font-size: 12px; margin: -4px 0 0; }
.premium__faq h2 { font-size: 18px; margin: 24px 0 8px; color: var(--green-900); }
.premium__faq details {
    background: var(--white); padding: 12px 14px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm); margin-bottom: 6px;
}
.premium__faq summary { font-weight: 700; cursor: pointer; font-size: 14px; color: var(--green-900); }
.premium__faq p { margin: 8px 0 0; color: var(--gray-700); font-size: 14px; }

/* Progress card (dashboard) */
.progress-card {
    background: var(--white); padding: 14px 16px; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
}
.progress-card__head { display: flex; justify-content: space-between; font-size: 13px; color: var(--gray-700); font-weight: 600; }
.progress-card__head strong { color: var(--green-700); font-size: 16px; }
.progress-bar { height: 8px; background: var(--gray-200); border-radius: 99px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-500), var(--green-700)); border-radius: 99px; transition: width .3s; }

/* Matches */
.match-list { display: flex; flex-direction: column; gap: 12px; }
.match-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 14px; display: flex; flex-direction: column; gap: 12px;
    border-left: 4px solid var(--gray-300);
}
.match-card--perfect { border-left-color: var(--yellow); background: linear-gradient(180deg, #fffbe6 0%, #ffffff 60%); }
.match-card--partial { border-left-color: var(--green-600); }
.match-card__head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.match-card__type { font-weight: 800; color: var(--green-900); text-transform: uppercase; letter-spacing: .04em; }
.match-card__loc  { color: var(--gray-500); font-weight: 600; }
.match-card__body strong { display: block; font-size: 16px; color: var(--green-900); }
.match-card__deal {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 10px;
}
.match-card__side { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.match-card__side small { font-size: 11px; color: var(--gray-500); text-transform: uppercase; font-weight: 600; letter-spacing: .03em; }
.match-card__arrow { font-size: 22px; color: var(--green-600); font-weight: 800; }
.match-card__foot .btn { margin-top: 4px; }
.match-card__deal--grouped { align-items: flex-start; }
.match-card__deal--grouped .match-card__arrow { padding-top: 18px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 4px; }
.match-card__count { font-weight: 500; margin-left: 6px; }

/* Scanner */
.scanner { display: flex; flex-direction: column; gap: 16px; }
.select-lg {
    width: 100%; padding: 14px; border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm); background: var(--white); font-size: 16px;
    color: var(--gray-900);
}
.sticker-grid--review { margin-top: 8px; }
.scanner-mode { margin: 10px 0 14px; }
.scanner-mode .radio-card__title { font-size: 13.5px; }
.scanner-mode .radio-card__desc  { font-size: 11.5px; }

/* Card de limite atingido (free sem scans) */
.scanner-limit-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fdf9 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin: 12px 0;
}
.scanner-limit-card__icon {
    width: 64px; height: 64px; margin: 0 auto 12px;
    background: var(--green-50); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
}
.scanner-limit-card h2 {
    font-size: 20px; color: var(--green-900); margin: 0 0 6px; letter-spacing: -.01em;
}
.scanner-limit-card p {
    color: var(--gray-700); margin: 0 0 18px; font-size: 15px;
}
.scanner-limit-card__perks {
    list-style: none; padding: 0; margin: 0 0 22px;
    display: flex; flex-direction: column; gap: 8px;
    text-align: left;
}
.scanner-limit-card__perks li {
    background: var(--green-50);
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 14px; color: var(--green-900); font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}
.scanner-limit-card__perks li::before {
    content: "✓"; color: var(--green-700); font-weight: 800; font-size: 16px; flex-shrink: 0;
}

/* Scanner status com spinner */
.scanner-status {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin: 18px 0; color: var(--gray-700); font-size: 14px; font-weight: 500;
    min-height: 32px;
}
.scanner-status__text { transition: opacity .2s; }
.scanner-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2.5px solid var(--gray-200);
    border-top-color: var(--green-600);
    border-right-color: var(--green-600);
    border-radius: 50%;
    animation: scanner-spin .9s linear infinite;
    flex-shrink: 0;
}
@keyframes scanner-spin { to { transform: rotate(360deg); } }

.scanner-preview {
    background: var(--white); border-radius: var(--radius); padding: 10px 14px;
    box-shadow: var(--shadow-sm); margin: 6px 0 12px;
}
.scanner-preview summary {
    cursor: pointer; font-size: 13px; font-weight: 600; color: var(--green-900);
    list-style: none; padding: 4px 0;
}
.scanner-preview summary::before { content: "▸ "; transition: transform .15s; display: inline-block; }
.scanner-preview[open] summary::before { content: "▾ "; }
.scanner-preview canvas { max-width: 100%; height: auto; border-radius: 8px; margin-top: 8px; }

/* Teaser do scanner IA para free users */
.scanner-ai-teaser {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, var(--green-800), var(--green-900));
    color: var(--white); padding: 14px 16px; border-radius: var(--radius);
    margin: 8px 0 14px; text-decoration: none;
    border: 1px solid rgba(255,212,0,.4);
    box-shadow: var(--shadow-md);
}
.scanner-ai-teaser:hover { color: var(--white); transform: translateY(-1px); }
.scanner-ai-teaser__icon { font-size: 22px; flex-shrink: 0; }
.scanner-ai-teaser strong { display: block; font-size: 14px; }
.scanner-ai-teaser span { display: block; font-size: 12px; opacity: .85; margin-top: 2px; }

.scanner-ai-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,212,0,.16); color: var(--green-900);
    padding: 6px 10px; border-radius: 99px;
    font-size: 12px; font-weight: 700;
    margin: 4px 0 14px;
}

/* Nome do jogador no card da revisão (quando vem da IA) */
.sticker__name {
    position: absolute; bottom: 4px; left: 3px; right: 3px;
    font-size: 9px; line-height: 1.1; text-align: center; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sticker--repeated .sticker__name { color: var(--green-700); }
.sticker--wanted   .sticker__name { color: var(--red); }

/* Ajuste de perspectiva — 4 cantos arrastáveis + linhas */
.rotate-preview {
    background: var(--gray-900);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    min-height: 200px;
    padding: 8px;
}
.rotate-preview canvas {
    display: block;
    max-width: 100%; max-height: 60vh;
    height: auto; width: auto;
    border-radius: 4px;
}
.rotate-actions {
    display: flex; gap: 10px; margin: 12px 0 6px;
}
.rotate-actions .btn { flex: 1; }

.perspective-wrap {
    position: relative;
    background: var(--gray-900);
    border-radius: var(--radius-sm);
    overflow: hidden;
    touch-action: none; /* impede pinch/scroll durante drag */
    user-select: none;
    box-shadow: var(--shadow-md);
}
.perspective-wrap canvas {
    display: block; width: 100%; height: auto;
    pointer-events: none;
}
.perspective-lines {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none;
}
.perspective-lines polygon {
    fill: rgba(46, 194, 126, 0.10);
    stroke: #2ec27e;
    stroke-width: 2;
    stroke-dasharray: 8 6;
    vector-effect: non-scaling-stroke;
}
.perspective-corner {
    position: absolute;
    width: 44px; height: 44px;
    margin: -22px 0 0 -22px; /* centraliza no ponto */
    border: 0; padding: 0; background: transparent;
    cursor: grab; touch-action: none;
    z-index: 2;
}
.perspective-corner::before {
    content: ""; position: absolute; inset: 14px;
    background: #ffffff; border: 3px solid #2ec27e;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
    transition: transform .12s;
}
.perspective-corner:hover::before { transform: scale(1.15); }
.perspective-corner:active::before,
.perspective-corner.is-dragging::before {
    transform: scale(1.3);
    background: #ffd400;
    border-color: var(--green-800);
}
.perspective-corner:active { cursor: grabbing; }
/* Posições iniciais (substituídas pelo JS) */
.perspective-corner[data-corner="tl"] { left: 5%;  top: 5%; }
.perspective-corner[data-corner="tr"] { left: 95%; top: 5%; }
.perspective-corner[data-corner="br"] { left: 95%; top: 95%; }
.perspective-corner[data-corner="bl"] { left: 5%;  top: 95%; }

/* Admin */
body.admin { background: var(--gray-100); }
.admin-bar {
    background: var(--green-900); color: var(--white); padding: 12px 18px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.admin-bar__brand { color: var(--yellow); font-weight: 800; text-decoration: none; }
.admin-bar__brand span { color: var(--white); opacity: .7; font-weight: 600; }
.admin-bar__nav { display: flex; gap: 16px; flex-wrap: wrap; }
.admin-bar__nav a { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600; }
.admin-bar__nav a.is-active { color: var(--yellow); }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 24px 18px 60px; }
.admin-page h1 { font-size: 24px; margin: 0 0 16px; color: var(--green-900); }
.admin-search { display: flex; gap: 8px; margin: 12px 0 16px; }
.admin-search input { flex: 1; padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 15px; }
.admin-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.admin-kpi { background: var(--white); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.admin-kpi strong { display: block; font-size: 24px; color: var(--green-900); font-weight: 800; }
.admin-kpi span { color: var(--gray-500); font-size: 12px; font-weight: 600; }
.admin-table {
    width: 100%; border-collapse: collapse; background: var(--white);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.admin-table thead { background: var(--gray-100); }
.admin-table th, .admin-table td { padding: 10px 12px; font-size: 13px; text-align: left; border-bottom: 1px solid var(--gray-200); }
.admin-table th { font-weight: 700; color: var(--gray-700); }
.admin-table tr:last-child td { border-bottom: 0; }
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; background: var(--gray-200); color: var(--gray-700);
}
.tag--premium, .tag--confirmed, .tag--success, .tag--perfect { background: var(--green-50); color: var(--green-800); }
.tag--admin    { background: #ffe6e6; color: var(--red); }
.tag--pending, .tag--partial { background: #fff4d6; color: #8a6a00; }
.tag--failed, .tag--cancelled, .tag--refunded { background: #fde7e6; color: var(--red); }
.tag--free { background: var(--gray-100); color: var(--gray-700); }
