/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: 'Inter', sans-serif; color: #1a1a1a; background: #f8f7f4; line-height: 1.6; }
a { color: #534AB7; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr { border: none; border-top: 1px solid #e5e3dc; margin: 1rem 0; }

/* ===== LAYOUT ===== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ===== NAVBAR ===== */
.navbar { background: #fff; border-bottom: 1px solid #e5e3dc; position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 60px; }
.logo { font-size: 20px; font-weight: 600; color: #1a1a1a; }
.logo span { color: #534AB7; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 14px; color: #555; font-weight: 500; }
.nav-links a:hover { color: #534AB7; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.notif-btn { font-size: 18px; position: relative; cursor: pointer; text-decoration: none; }
.notif-badge { position: absolute; top: -4px; right: -6px; background: #E24B4A; color: #fff; border-radius: 50%; font-size: 10px; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }

/* Dropdown */
.dropdown { position: relative; }
.avatar-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.avatar-btn:hover { background: #f3f2ee; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #EEEDFE; color: #3C3489; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.nav-username { font-size: 14px; font-weight: 500; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #e5e3dc; border-radius: 12px; padding: 6px; min-width: 180px; box-shadow: 0 4px 20px rgba(0,0,0,.08); z-index: 200; }
.dropdown:hover .dropdown-menu, .dropdown-menu:hover { display: block; }
.dropdown-menu a { display: block; padding: 8px 12px; font-size: 14px; color: #333; border-radius: 8px; }
.dropdown-menu a:hover { background: #f3f2ee; text-decoration: none; }
.dropdown-menu .admin-link { color: #534AB7; }
.dropdown-menu .logout { color: #E24B4A; }
.dropdown-menu hr { margin: 4px 0; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: all .15s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: #534AB7; color: #fff; border-color: #534AB7; }
.btn-primary:hover { background: #3C3489; border-color: #3C3489; }
.btn-outline { background: transparent; color: #534AB7; border-color: #534AB7; }
.btn-outline:hover { background: #EEEDFE; }
.btn-success { background: #0F6E56; color: #fff; border-color: #0F6E56; }
.btn-danger  { background: #E24B4A; color: #fff; border-color: #E24B4A; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-disabled { background: #ccc; color: #888; cursor: not-allowed; border-color: #ccc; }

/* ===== ALERTS ===== */
.alert { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.alert-success { background: #E1F5EE; color: #085041; border: 1px solid #9FE1CB; }
.alert-danger  { background: #FCEBEB; color: #791F1F; border: 1px solid #F7C1C1; }
.alert-warning { background: #FAEEDA; color: #633806; border: 1px solid #FAC775; }
.alert-info    { background: #E6F1FB; color: #0C447C; border: 1px solid #B5D4F4; }
.alert-close   { background: none; border: none; font-size: 18px; cursor: pointer; opacity: .6; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-live    { background: #EEEDFE; color: #3C3489; }
.badge-success { background: #E1F5EE; color: #085041; }
.badge-warn    { background: #FAEEDA; color: #633806; }
.badge-default { background: #f3f2ee; color: #666; }
.badge-info    { background: #E6F1FB; color: #0C447C; }
.badge-purple  { background: #EEEDFE; color: #3C3489; }

/* ===== HERO ===== */
.hero { background: #fff; padding: 70px 0 60px; text-align: center; border-bottom: 1px solid #e5e3dc; }
.hero-badge { display: inline-block; background: #EEEDFE; color: #534AB7; font-size: 13px; font-weight: 500; padding: 5px 14px; border-radius: 20px; margin-bottom: 16px; }
.hero h1 { font-size: 48px; font-weight: 600; line-height: 1.2; margin-bottom: 14px; }
.hero h1 .highlight { color: #534AB7; }
.hero-sub { font-size: 18px; color: #555; max-width: 520px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: #666; }

/* ===== SECTIONS ===== */
.section { padding: 56px 0; }
.section-alt { background: #fff; }
.section-title { font-size: 26px; font-weight: 600; margin-bottom: 28px; }
.section-more { text-align: center; margin-top: 24px; }

/* ===== DRAWS GRID ===== */
.draws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.draw-card { background: #fff; border: 1px solid #e5e3dc; border-radius: 14px; overflow: hidden; transition: box-shadow .2s; }
.draw-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.draw-img { height: 180px; overflow: hidden; position: relative; background: #EEEDFE; }
.draw-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-badge { position: absolute; top: 10px; left: 10px; background: #534AB7; color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.draw-body { padding: 16px; }
.draw-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { background: #f3f2ee; color: #666; font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.draw-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.draw-prize { font-size: 24px; font-weight: 600; color: #534AB7; margin-bottom: 10px; }
.progress-bar { height: 6px; background: #f3f2ee; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: #534AB7; border-radius: 4px; transition: width .3s; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin: 4px 0 12px; }
.draw-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== COUNTDOWN ===== */
.draw-countdown { margin: 10px 0; }
.cd-label { font-size: 12px; color: #888; }
.countdown-boxes { display: flex; gap: 6px; margin-top: 4px; }
.cd-box { background: #f3f2ee; border-radius: 6px; padding: 6px 10px; text-align: center; min-width: 48px; }
.cd-box span { display: block; font-size: 18px; font-weight: 600; color: #534AB7; }
.cd-box small { font-size: 10px; color: #888; }
.countdown-inline { font-size: 14px; font-weight: 600; color: #534AB7; }
.countdown-mini { font-size: 12px; color: #534AB7; margin-top: 4px; }

/* ===== WINNERS ===== */
.winners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.winner-card { background: #fff; border: 1px solid #e5e3dc; border-radius: 12px; padding: 16px; text-align: center; }
.winner-avatar { width: 48px; height: 48px; border-radius: 50%; background: #EEEDFE; color: #3C3489; font-weight: 600; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 16px; }
.winner-name { font-weight: 600; font-size: 14px; }
.winner-prize { font-size: 13px; color: #555; margin-top: 2px; }
.winner-value { font-size: 18px; font-weight: 600; color: #0F6E56; }
.winner-date { font-size: 11px; color: #888; margin-top: 4px; }

/* ===== HOW IT WORKS ===== */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.step { text-align: center; padding: 28px 20px; background: #fff; border-radius: 14px; border: 1px solid #e5e3dc; }
.step-icon { font-size: 36px; margin-bottom: 8px; }
.step-num { display: inline-block; width: 24px; height: 24px; background: #534AB7; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 600; line-height: 24px; text-align: center; margin-bottom: 10px; }
.step h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 13px; color: #666; }

/* ===== CHECKOUT ===== */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding: 36px 20px; }
.page-title { font-size: 24px; font-weight: 600; margin-bottom: 20px; }
.card { background: #fff; border: 1px solid #e5e3dc; border-radius: 14px; padding: 20px; }
.mb-4 { margin-bottom: 16px; }
.card h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.qty-btn { width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 8px; background: none; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: #f3f2ee; }
.qty-val { font-size: 22px; font-weight: 600; min-width: 36px; text-align: center; }
.qty-note { font-size: 13px; color: #888; }
.helper-text { font-size: 12px; color: #888; margin-bottom: 8px; }
.info-box { background: #EEEDFE; color: #3C3489; border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.pay-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.pay-opt { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 10px; background: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: all .15s; }
.pay-opt.active { border: 2px solid #534AB7; background: #EEEDFE; color: #3C3489; }
.stripe-input { border: 1px solid #ddd; border-radius: 8px; padding: 12px; margin-bottom: 14px; background: #fff; }
.form-error { color: #E24B4A; font-size: 13px; margin-bottom: 8px; }
.secure-note { text-align: center; font-size: 12px; color: #888; margin-top: 10px; }
.summary-draw { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #f0ede8; }
.summary-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #f3f2ee; }
.summary-title { font-weight: 600; font-size: 14px; }
.summary-sub { font-size: 12px; color: #888; margin-top: 2px; }
.summary-lines { margin-bottom: 12px; }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px solid #f3f2ee; color: #555; }
.summary-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 600; padding-top: 10px; }
.summary-prize-box { background: #f8f7f4; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #555; margin-top: 14px; }
.mt-3 { margin-top: 12px; }
.text-muted { color: #888; font-size: 13px; }

/* ===== ACCOUNT ===== */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 32px 20px; }
.account-sidebar { }
.account-profile { text-align: center; background: #fff; border: 1px solid #e5e3dc; border-radius: 14px; padding: 20px; margin-bottom: 12px; }
.account-name { font-weight: 600; font-size: 15px; margin-top: 10px; }
.account-email { font-size: 13px; color: #888; }
.verify-banner { background: #FAEEDA; color: #633806; font-size: 12px; padding: 6px 10px; border-radius: 8px; margin-top: 8px; }
.account-nav { background: #fff; border: 1px solid #e5e3dc; border-radius: 14px; overflow: hidden; }
.account-nav a { display: block; padding: 11px 16px; font-size: 14px; color: #444; border-bottom: 1px solid #f3f2ee; transition: background .1s; }
.account-nav a:last-child { border-bottom: none; }
.account-nav a:hover { background: #f8f7f4; text-decoration: none; }
.account-nav a.active { background: #EEEDFE; color: #534AB7; font-weight: 600; }
.notif-badge-sm { display: inline-block; background: #E24B4A; color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 6px; margin-left: 4px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: #f3f2ee; border-radius: 10px; padding: 14px; }
.stat-label { font-size: 12px; color: #888; margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 600; }
.stat-value.green { color: #0F6E56; }
.section-block { margin-bottom: 28px; }
.section-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-hdr h2 { font-size: 17px; font-weight: 600; }
.link-more { font-size: 13px; color: #534AB7; }
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ticket-card { background: #fff; border: 1px solid #e5e3dc; border-radius: 12px; padding: 14px; }
.ticket-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.ticket-draw-name { font-size: 13px; font-weight: 600; }
.ticket-prize { font-size: 20px; font-weight: 600; color: #534AB7; margin-bottom: 8px; }
.ticket-no { font-size: 12px; color: #888; margin-top: 6px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e5e3dc; color: #888; font-weight: 500; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f3f2ee; }
.data-table tr:last-child td { border-bottom: none; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #444; margin-bottom: 5px; }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; }
.form-control:focus { outline: none; border-color: #534AB7; box-shadow: 0 0 0 3px rgba(83,74,183,.1); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-checkboxes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form-control-file { font-size: 14px; }
.current-image { max-width: 100px; margin-top: 8px; border-radius: 8px; }
.form-layout { max-width: 860px; }
.admin-form { background: #fff; border: 1px solid #e5e3dc; border-radius: 14px; padding: 24px; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 40px 20px; color: #888; background: #fff; border-radius: 14px; border: 1px solid #e5e3dc; }

/* ===== PAYMENT PAGES ===== */
.payment-result { max-width: 480px; margin: 60px auto; text-align: center; background: #fff; border-radius: 16px; padding: 48px 32px; border: 1px solid #e5e3dc; }
.payment-result .icon { font-size: 56px; margin-bottom: 16px; }
.payment-result h1 { font-size: 26px; font-weight: 600; margin-bottom: 10px; }
.payment-result p { font-size: 15px; color: #666; margin-bottom: 24px; }

/* ===== FOOTER ===== */
.footer { background: #fff; border-top: 1px solid #e5e3dc; margin-top: 60px; padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand p { font-size: 13px; color: #888; margin-top: 4px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: #666; }
.footer-copy { font-size: 13px; color: #aaa; }

/* ===== AUTH PAGES ===== */
.auth-layout { max-width: 440px; margin: 60px auto; padding: 0 20px; }
.auth-card { background: #fff; border: 1px solid #e5e3dc; border-radius: 16px; padding: 36px; }
.auth-card h1 { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.auth-card .auth-sub { font-size: 14px; color: #888; margin-bottom: 24px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 14px; color: #666; }

/* ===== MISC ===== */
.text-center { text-align: center; }
.text-muted { color: #888; }
.mt-4 { margin-top: 24px; }
.mb-3 { margin-bottom: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .draws-grid { grid-template-columns: 1fr; }
}
