/* ══════════════════════════════════════════════════════════════
   Fui de Oferta 🏷️ — Style Sheet
   Tema escuro · Preto + Amarelo + Branco · Glassmorphism
   ══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --gold: #FFD700;
    --gold-dark: #CCAA00;
    --gold-light: #FFE44D;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #666666;
    --border: rgba(255, 215, 0, 0.15);
    --border-hover: rgba(255, 215, 0, 0.35);
    --danger: #ff4444;
    --success: #44cc44;
    --warning: #ffaa00;
    --info: #4488ff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --sidebar-width: 240px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

/* ─── Tipografia refinada ──────────────────────────────────── */
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; text-wrap: balance; }
p { max-width: 70ch; }
p + p { margin-top: 1rem; }
code { font-size: 0.875em; }

a { color: var(--gold); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }

img { max-width: 100%; }

/* ─── Glassmorphism ────────────────────────────────────────── */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.glass:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.06);
}
/* Glass mais sutil para cartões de segundo nível */
.glass-subtle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
}

/* ─── Utilities ────────────────────────────────────────────── */
.gold { color: var(--gold); }
.text-muted { color: var(--text-secondary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-title { font-size: 2rem; margin-bottom: 2.5rem; text-align: center; }
.text-center { text-align: center; }

/* ─── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}
.logo-icon { font-size: 1.5rem; }
.logo-text { letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 0.75rem; align-items: center; }

.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-primary) !important;
}
.btn-telegram { background: rgba(0, 136, 204, 0.2); border: 1px solid rgba(0, 136, 204, 0.3); }
.btn-telegram:hover { background: rgba(0, 136, 204, 0.35); }
.btn-admin { background: rgba(255, 215, 0, 0.15); border: 1px solid var(--border); }
.btn-admin:hover { background: rgba(255, 215, 0, 0.25); }
.btn-logout { background: rgba(255, 68, 68, 0.15); border: 1px solid rgba(255, 68, 68, 0.3); }
.btn-logout:hover { background: rgba(255, 68, 68, 0.3); }

/* ─── Flash Messages ───────────────────────────────────────── */
.flash-container {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
}
.flash-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
.flash-success { background: rgba(68, 204, 68, 0.15); border: 1px solid rgba(68, 204, 68, 0.3); color: #8f8; }
.flash-danger { background: rgba(255, 68, 68, 0.15); border: 1px solid rgba(255, 68, 68, 0.3); color: #f88; }
.flash-warning { background: rgba(255, 170, 0, 0.15); border: 1px solid rgba(255, 170, 0, 0.3); color: #fa8; }
.flash-info { background: rgba(68, 136, 255, 0.15); border: 1px solid rgba(68, 136, 255, 0.3); color: #88f; }
.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.25rem;
    opacity: 0.6;
}
.flash-close:hover { opacity: 1; }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 4rem;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 215, 0, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 215, 0, 0.04) 0%, transparent 50%);
    overflow: hidden;
}
.hero-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}
.hero-text { flex: 1; max-width: 600px; }
.hero-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 45%;
}
.hero-logo {
    width: 100%;
    height: auto;
    max-width: 500px;
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.15));
    animation: heroFadeIn 0.8s ease-out;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: scale(0.9) translateX(20px); }
    to   { opacity: 1; transform: scale(1) translateX(0); }
}
.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}
.hero-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-text {
    color: #ccc;
    margin-bottom: 2rem;
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-telegram-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #0088CC, #006699);
    color: #fff !important;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}
.btn-telegram-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 136, 204, 0.45);
    opacity: 1;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: transparent;
    color: var(--text-primary) !important;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-outline:hover {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.08);
    opacity: 1;
}

/* ─── Stats ────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}
.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.stat-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ─── Steps ────────────────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step-card {
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}
.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    opacity: 0.4;
    transition: opacity 0.25s ease;
}
.step-card:hover::before { opacity: 0.8; }
.step-number {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #000;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0.75rem;
}
.step-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin: 0; }

/* ─── Offers List ──────────────────────────────────────────── */
.offers-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.offer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    gap: 1rem;
}
.offer-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}
.offer-meta { display: flex; gap: 0.75rem; font-size: 0.8rem; }
.offer-store { color: var(--text-secondary); }
.offer-discount { color: var(--gold); font-weight: 600; }
.offer-prices { text-align: right; white-space: nowrap; }
.old-price { color: var(--text-muted); text-decoration: line-through; font-size: 0.85rem; display: block; }
.new-price { color: var(--gold); font-size: 1.3rem; font-weight: 700; }
.empty-state { text-align: center; color: var(--text-secondary); padding: 2rem; }

/* ─── CTA Section ──────────────────────────────────────────── */
.cta-section { text-align: center; padding: 5rem 0; }

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.footer-links { margin-top: 0.5rem; }
.footer-links a { color: var(--gold); }

/* ══════════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ══════════════════════════════════════════════════════════════ */

body.admin {
    background: var(--bg-primary);
}

/* ─── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(15, 15, 15, 0.97);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    z-index: 50;
}
.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary) !important;
}
.sidebar-link.active {
    background: rgba(255, 215, 0, 0.12);
    color: var(--gold) !important;
    border: 1px solid rgba(255, 215, 0, 0.15);
}
.sidebar-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.sidebar-user { color: var(--text-secondary); }
.sidebar-logout {
    color: var(--danger) !important;
    font-weight: 600;
}

/* ─── Admin Main ───────────────────────────────────────────── */
.admin-main {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
    max-width: 1200px;
}

.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; }
.page-subtitle { color: var(--text-secondary); margin-top: 0.25rem; }

/* ─── Metric Cards ─────────────────────────────────────────── */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}
.metric-icon { font-size: 2rem; }
.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
}
.metric-label { font-size: 0.8rem; color: var(--text-secondary); }

/* ─── Charts ───────────────────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.chart-card {
    padding: 1.5rem;
}
.chart-card.full-width { grid-column: 1 / -1; }
.chart-title { font-size: 1rem; margin-bottom: 1rem; color: var(--text-secondary); }
.chart-container { position: relative; height: 280px; }
.chart-container canvas { max-height: 100%; max-width: 100%; }

/* ─── Config Form ──────────────────────────────────────────── */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.config-field {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.config-field label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.config-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color 0.2s;
}
.config-input:focus {
    outline: none;
    border-color: var(--gold);
}
.config-tipo {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-actions { margin-top: 1rem; }

.btn-primary {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.25);
}

/* ─── Categorias ───────────────────────────────────────────── */
.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.categoria-card {
    text-align: center;
    padding: 1.25rem 1rem;
}
.categoria-card.inativa { opacity: 0.5; }
.categoria-emoji { font-size: 2rem; margin-bottom: 0.5rem; }
.categoria-nome { font-weight: 600; margin-bottom: 0.25rem; }
.categoria-status { font-size: 0.8rem; color: var(--text-secondary); }

/* ─── Users ────────────────────────────────────────────────── */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}
.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #000;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; }
.user-username { color: var(--text-secondary); font-size: 0.85rem; }
.user-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.user-status {
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.user-status.ativo { background: rgba(68, 204, 68, 0.15); color: #8f8; }
.user-status.inativo { background: rgba(255, 68, 68, 0.15); color: #f88; }
.user-badge {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
}
.btn-small {
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid;
    font-family: var(--font);
    transition: all 0.2s;
}
.btn-danger { background: rgba(255, 68, 68, 0.12); border-color: rgba(255, 68, 68, 0.3); color: #f88; }
.btn-danger:hover { background: rgba(255, 68, 68, 0.25); }
.btn-success { background: rgba(68, 204, 68, 0.12); border-color: rgba(68, 204, 68, 0.3); color: #8f8; }
.btn-success:hover { background: rgba(68, 204, 68, 0.25); }

/* ─── User Form ────────────────────────────────────────────── */
.user-form {
    padding: 1.5rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.form-group-btn { display: flex; align-items: end; }
.form-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
    width: 100%;
}
.form-input:focus { outline: none; border-color: var(--gold); }

/* ─── Login Page ───────────────────────────────────────────── */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at center, rgba(255, 215, 0, 0.05) 0%, transparent 60%);
}
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1.5rem;
}
.login-card {
    padding: 2.5rem 2rem;
    text-align: center;
}
.login-header { margin-bottom: 1.5rem; }
.login-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.login-header h1 { font-size: 1.8rem; }
.login-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem; }
.login-form { text-align: left; }
.login-form .form-group { margin-bottom: 1rem; }
.login-form label { display: block; margin-bottom: 0.35rem; color: var(--text-secondary); font-size: 0.85rem; }
.login-form input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
}
.login-form input:focus { outline: none; border-color: var(--gold); }
.btn-login {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s;
    font-family: var(--font);
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.25);
}
.login-footer { margin-top: 1.5rem; font-size: 0.85rem; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 0; }
    .nav-container { padding: 0.6rem 1rem; }
    .nav-links { gap: 0.4rem; }
    .nav-btn { font-size: 0.8rem; padding: 0.4rem 0.7rem; }
    .hero { min-height: auto; padding: 5rem 1rem 3rem; }
    .hero-content { flex-direction: column; text-align: center; gap: 2rem; }
    .hero-text { max-width: 100%; }
    .hero-visual { max-width: 70%; }
    .hero-cta { justify-content: center; }
    .hero-logo { max-width: 350px; }
    .hero-title { font-size: clamp(1.8rem, 8vw, 2.5rem); }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; padding: 0.5rem; }
    .sidebar-link { font-size: 0.8rem; padding: 0.5rem 0.6rem; }
    .sidebar-footer { display: none; }
    .admin-main {
        margin-left: 0;
        padding: 1rem;
    }
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .config-grid { grid-template-columns: 1fr; }

    .section { padding: 2.5rem 0; }
    .section-title { font-size: 1.5rem; }
    .stat-value { font-size: 2rem; }
    .metric-value { font-size: 1.4rem; }
}
