:root { --ink:#17211c; --muted:#6f7771; --cream:#f6f4ed; --paper:#fffdf8; --line:#dcddd6; --green:#1e5a3f; --green-dark:#153e2d; --lime:#dff277; --orange:#ee6b3d; --red:#a33c32; --shadow:0 18px 55px rgba(23,33,28,.08); }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--cream); font-family:"DM Sans",sans-serif; -webkit-font-smoothing:antialiased; }
button,input,textarea { font:inherit; }
a { color:inherit; text-decoration:none; }
.admin-login-page { min-height:100vh; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 50% 12%,#edf2da,var(--cream) 55%); }
.login-card { width:min(460px,100%); padding:45px; border:1px solid rgba(23,33,28,.08); border-radius:26px; background:var(--paper); box-shadow:var(--shadow); }
.admin-brand { display:inline-flex; align-items:center; gap:10px; font:800 19px/1 "Manrope",sans-serif; letter-spacing:.07em; }
.admin-brand > span { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; color:#fff; background:var(--green); transform:rotate(-3deg); }
.admin-brand small { padding:5px 7px; border-radius:5px; color:var(--green); background:#e9eedf; font:800 9px/1 "DM Sans"; letter-spacing:.12em; }
.admin-kicker { margin:0 0 10px; color:var(--orange); font-size:10px; font-weight:800; letter-spacing:.17em; }
.login-card .admin-kicker { margin-top:38px; }
h1,h2 { margin:0; font-family:"Manrope",sans-serif; letter-spacing:-.04em; }
.login-card h1 { font-size:38px; }
.login-copy { margin-bottom:28px; color:var(--muted); line-height:1.6; }
label { display:block; font-size:12px; font-weight:700; }
input,textarea { width:100%; margin-top:7px; padding:13px 14px; border:1px solid #ced1ca; border-radius:11px; color:var(--ink); background:#fff; outline:0; }
input:focus,textarea:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(30,90,63,.1); }
textarea { resize:vertical; line-height:1.55; }
label em { float:right; color:#969b96; font-style:normal; font-weight:500; }
label small { display:block; margin-top:6px; color:var(--muted); font-size:10px; font-weight:400; }
.admin-button { min-height:48px; display:inline-flex; align-items:center; justify-content:center; gap:14px; padding:0 22px; border:0; border-radius:11px; color:#fff; background:var(--green); font-weight:700; cursor:pointer; }
.admin-button:hover { background:var(--green-dark); }
.login-card .admin-button { width:100%; margin-top:20px; }
.back-link { display:block; margin-top:24px; color:var(--muted); text-align:center; font-size:12px; }
.admin-alert { margin:18px 0; padding:13px 16px; border-radius:10px; color:#25573e; background:#e4efdd; font-size:13px; }
.admin-alert.error { color:#8a342d; background:#f6dfda; }
.admin-alert.warning { color:#7a5321; background:#f7ead0; }
.admin-header { height:78px; padding:0 max(24px,calc((100% - 1180px)/2)); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(23,33,28,.1); background:rgba(246,244,237,.92); backdrop-filter:blur(10px); }
.admin-header nav { display:flex; align-items:center; gap:25px; color:var(--muted); font-size:12px; }
.admin-header nav form { margin:0; }
.admin-header nav button { padding:0; border:0; color:var(--muted); background:transparent; cursor:pointer; }
.admin-shell { width:min(1180px,calc(100% - 40px)); margin:42px auto 70px; }
.dashboard-title { display:flex; align-items:end; justify-content:space-between; gap:25px; margin-bottom:30px; }
.dashboard-title h1 { font-size:clamp(34px,5vw,54px); }
.dashboard-actions { display:flex; align-items:center; gap:12px; }
.stripe-mode-control { height:48px; padding:0 13px 0 16px; display:flex; align-items:center; gap:13px; border:1px solid rgba(23,33,28,.12); border-radius:11px; background:var(--paper); }
.stripe-mode-copy span,.stripe-mode-copy strong { display:block; }
.stripe-mode-copy span { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.15em; }
.stripe-mode-copy strong { margin-top:2px; font-size:11px; }
.mode-switch { position:relative; width:44px; height:24px; flex:0 0 auto; cursor:pointer; }
.mode-switch input { position:absolute; opacity:0; pointer-events:none; }
.mode-switch span { position:absolute; inset:0; border-radius:99px; background:#c8cbc5; transition:.2s; }
.mode-switch span::after { content:""; position:absolute; width:18px; height:18px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(0,0,0,.2); transition:.2s; }
.mode-switch input:checked + span { background:var(--orange); }
.mode-switch input:checked + span::after { transform:translateX(20px); }
.button-link { text-decoration:none; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:22px; }
.stats-grid article { padding:23px; border:1px solid rgba(23,33,28,.08); border-radius:17px; background:var(--paper); box-shadow:0 8px 25px rgba(23,33,28,.04); }
.stats-grid span,.stats-grid small { display:block; color:var(--muted); }
.stats-grid span { font-size:11px; }
.stats-grid strong { display:block; margin:8px 0 5px; font:800 30px/1 "Manrope"; }
.stats-grid small { font-size:10px; }
.stats-grid .revenue { color:#fff; background:var(--green); }
.stats-grid .revenue span,.stats-grid .revenue small { color:rgba(255,255,255,.67); }
.admin-card { margin-top:22px; padding:clamp(24px,4vw,42px); border:1px solid rgba(23,33,28,.08); border-radius:22px; background:var(--paper); box-shadow:var(--shadow); }
.card-heading { display:flex; align-items:start; justify-content:space-between; gap:25px; margin-bottom:30px; }
.card-heading h2 { font-size:31px; }
.text-link { color:var(--green); font-size:12px; font-weight:700; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.form-grid .wide { grid-column:1/-1; }
.form-divider { margin-top:10px; padding-top:24px; border-top:1px solid var(--line); }
.form-divider span { color:var(--green); font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.form-actions { display:flex; justify-content:flex-end; margin-top:28px; }
.current-images { margin-top:25px; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.current-image { padding:14px; display:flex; align-items:center; gap:14px; border:1px solid var(--line); border-radius:13px; }
.current-image img { width:100px; height:75px; object-fit:cover; border-radius:9px; }
.current-image strong { display:block; margin-bottom:8px; font-size:11px; }
.current-image label { display:flex; align-items:center; gap:8px; color:var(--muted); font-weight:500; }
.current-image input { width:auto; margin:0; }
.result-video-card .card-heading p:not(.admin-kicker) { max-width:650px; margin:8px 0 0; color:var(--muted); font-size:12px; }
.result-video-toggle { min-width:245px; min-height:64px; padding:12px 14px 12px 17px; display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid var(--line); border-radius:12px; background:#f7f7f2; }
.result-video-toggle span,.result-video-toggle strong { display:block; }
.result-video-toggle div>span { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.12em; }
.result-video-toggle strong { margin-top:3px; font-size:12px; }
.result-video-toggle .mode-switch input:checked + span { background:var(--green); }
.result-video-toggle .mode-switch:has(input:disabled) { opacity:.45; cursor:not-allowed; }
.result-video-current { display:grid; grid-template-columns:minmax(260px,480px) 1fr; gap:22px; align-items:center; margin-bottom:25px; padding:18px; border:1px solid var(--line); border-radius:15px; background:#f7f7f2; }
.result-video-current video { width:100%; max-height:300px; border-radius:11px; background:#111; }
.result-video-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.result-video-actions strong,.result-video-actions small { display:block; }
.result-video-actions small { margin-top:5px; color:var(--muted); }
.result-video-upload { padding-top:4px; }
.result-video-upload>label { margin-bottom:8px; }
.result-video-upload>div:not(.video-upload-progress) { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; }
.result-video-upload input { margin:0; }
.result-video-upload>small { display:block; margin-top:8px; color:var(--muted); }
.result-video-upload .video-locked-note { color:#9a6721; font-weight:700; }
.video-upload-progress { grid-column:1/-1; margin-top:12px; }
.video-upload-progress[hidden] { display:none; }
.video-upload-progress>span { display:block; height:8px; overflow:hidden; border-radius:99px; background:#e3e5df; }
.video-upload-progress i { display:block; width:0; height:100%; border-radius:inherit; background:var(--green); transition:width .2s ease; }
.video-upload-progress small { display:block; margin-top:7px; color:var(--muted); font-size:11px; }
.video-upload-progress.error i { background:var(--red); }
.video-upload-progress.error small { color:var(--red); }
.result-video-upload button:disabled { opacity:.55; cursor:wait; }
.danger-zone { margin-top:38px; padding-top:28px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-top:1px solid var(--line); }
.danger-zone strong { font-size:13px; }
.danger-zone p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.reset-zone { margin-top:38px; padding:20px; display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid #ead7ad; border-radius:13px; background:#fffaf0; }
.reset-zone strong { color:#76501e; font-size:13px; }
.reset-zone p { max-width:650px; margin:5px 0 0; color:#8c7351; font-size:11px; line-height:1.5; }
.compact-reset-zone { margin-top:22px; margin-bottom:0; }
.draw-card { display:flex; align-items:center; justify-content:space-between; gap:32px; background:linear-gradient(135deg,#fffdf8,#f0f3e4); }
.draw-card--winner { color:#fff; background:linear-gradient(135deg,#1e5a3f,#123c2a); }
.draw-card h2 { font-size:clamp(27px,4vw,39px); }
.draw-card h2 span { color:var(--orange); }
.draw-card p:not(.admin-kicker) { margin:9px 0 0; color:var(--muted); font-size:12px; }
.draw-card--winner p:not(.admin-kicker) { color:rgba(255,255,255,.7); }
.draw-controls { min-width:330px; display:grid; gap:12px; }
.live-draw-control { padding:14px; border:1px solid rgba(23,33,28,.12); border-radius:12px; background:#fff; color:var(--ink); }
.live-draw-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:12px; }
.live-draw-heading span,.live-draw-heading strong { display:block; }
.live-draw-heading div>span { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.12em; }
.live-draw-heading strong { margin-top:3px; font-size:12px; }
.live-draw-switch input:checked + span { background:var(--green); }
.live-draw-control>label { margin-top:10px; font-size:10px; }
.live-draw-control>label:first-of-type { margin-top:0; }
.live-draw-control input[type="url"],.live-draw-control input[type="datetime-local"] { margin-top:6px; padding:10px 11px; font-size:11px; }
.live-draw-save { width:100%; min-height:40px; margin-top:9px; border:0; border-radius:9px; color:#fff; background:var(--green); font-size:11px; font-weight:800; cursor:pointer; }
.live-draw-save:hover { background:var(--green-dark); }
.sales-switch-control { min-height:64px; padding:12px 14px 12px 17px; display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid rgba(23,33,28,.12); border-radius:12px; background:#fff; color:var(--ink); }
.sales-switch-control span,.sales-switch-control strong { display:block; }
.sales-switch-control div>span { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.12em; }
.sales-switch-control strong { margin-top:3px; font-size:12px; }
.sales-switch input:checked + span { background:var(--red); }
.draw-button { width:100%; min-height:50px; padding:0 20px; border:0; border-radius:11px; color:#1d3528; background:var(--lime); font-weight:800; cursor:pointer; }
.draw-button:disabled { opacity:.45; cursor:not-allowed; }
.draw-methods-heading { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.14em; text-align:center; }
.draw-method-selector { padding:4px; display:grid; grid-template-columns:1fr 1fr; gap:4px; border:1px solid var(--line); border-radius:11px; background:#eeeee8; }
.draw-method-selector button { min-height:40px; border:0; border-radius:8px; color:var(--muted); background:transparent; font-size:12px; font-weight:800; cursor:pointer; }
.draw-method-selector button.active { color:#fff; background:var(--green); box-shadow:0 3px 10px rgba(23,33,28,.16); }
.draw-method-panel { min-width:0; }
.automatic-draw-button { color:#fff; background:var(--green); }
.automatic-roulette { padding:17px 14px 14px; border:1px solid rgba(23,33,28,.12); border-radius:12px; background:#fff; text-align:center; }
.automatic-roulette-stage { width:170px; height:170px; margin-bottom:13px; }
.automatic-roulette>small { display:block; margin-top:8px; color:var(--muted); font-size:10px; }
.draw-method-separator { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:9px; text-transform:uppercase; }
.draw-method-separator::before,.draw-method-separator::after { content:""; height:1px; flex:1; background:var(--line); }
.manual-winner-form { padding:14px; border:1px solid rgba(23,33,28,.12); border-radius:12px; background:#fff; color:var(--ink); }
.manual-winner-form>label { margin-bottom:8px; }
.roulette-toggle-control { min-height:48px; margin-bottom:13px; padding:8px 10px 8px 12px; display:flex; align-items:center; justify-content:space-between; gap:15px; border-radius:9px; background:#f3f4ed; }
.roulette-toggle-control div>span,.roulette-toggle-control div>strong { display:block; }
.roulette-toggle-control div>span { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.12em; }
.roulette-toggle-control div>strong { margin-top:2px; font-size:11px; }
.roulette-toggle-control .mode-switch input:checked + span { background:var(--green); }
.manual-roulette { margin:0 0 16px; padding:18px 12px 14px; border:1px solid var(--line); border-radius:12px; background:#faf9f3; text-align:center; }
.roulette-stage { position:relative; width:190px; height:190px; margin:0 auto 14px; }
.roulette-pointer { position:absolute; z-index:3; left:50%; top:-7px; width:0; height:0; border-left:10px solid transparent; border-right:10px solid transparent; border-top:22px solid var(--ink); filter:drop-shadow(0 2px 2px rgba(0,0,0,.2)); transform:translateX(-50%); }
.roulette-wheel { width:100%; height:100%; border:7px solid #fff; border-radius:50%; box-shadow:0 8px 24px rgba(23,33,28,.2),inset 0 0 0 2px rgba(23,33,28,.12); transition:transform 3.6s cubic-bezier(.12,.72,.08,1); }
.roulette-result { position:absolute; z-index:2; left:50%; top:50%; width:72px; height:72px; display:grid; place-items:center; border:5px solid #fff; border-radius:50%; background:var(--paper); box-shadow:0 3px 12px rgba(23,33,28,.2); font:800 25px/1 "Manrope"; transform:translate(-50%,-50%); }
.spin-roulette-button { min-height:40px; padding:0 18px; border:0; border-radius:9px; color:#fff; background:var(--orange); font-size:12px; font-weight:800; cursor:pointer; }
.spin-roulette-button:disabled { opacity:.55; cursor:wait; }
.manual-roulette>small { display:block; margin-top:9px; color:var(--muted); font-size:10px; }
.manual-winner-entry { display:grid; grid-template-columns:minmax(90px,120px) 1fr; gap:9px; }
.manual-winner-entry input { height:50px; margin:0; text-align:center; font-size:18px; font-weight:800; }
.draw-controls form>small { display:block; margin-top:7px; color:var(--muted); font-size:10px; text-align:center; }
.reset-button { min-height:42px; padding:0 16px; border:1px solid #d7a64d; border-radius:9px; color:#704810; background:#fff; font-weight:700; cursor:pointer; white-space:nowrap; }
.reset-button:hover { color:#fff; background:#a66b18; }
.danger-button { min-height:42px; padding:0 16px; border:1px solid #d8a6a0; border-radius:9px; color:var(--red); background:#fff; font-weight:700; cursor:pointer; }
.empty-state { padding:60px 25px; border:1px dashed #bec3ba; border-radius:20px; text-align:center; }
.empty-state > span { width:65px; height:65px; margin:0 auto 18px; display:grid; place-items:center; border-radius:18px; color:var(--green); background:var(--lime); font-size:28px; }
.empty-state h2 { font-size:30px; }
.empty-state p { color:var(--muted); }
.empty-state .admin-button { margin-top:10px; }
.history-table { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:12px; }
th { padding:11px 13px; color:var(--muted); text-align:left; font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
td { padding:14px 13px; border-top:1px solid #e4e4df; }
td strong,td small { display:block; }
td small { margin-top:3px; color:var(--muted); }
.status { display:inline-block; padding:5px 8px; border-radius:99px; font-size:9px; font-weight:800; text-transform:uppercase; }
.status.active { color:#1f5b3e; background:#e2eedb; }
.status.closed { color:#777; background:#e8e8e4; }
.status.draft { color:#875c20; background:#f5e9d0; }
.status.paid { color:#1f5b3e; background:#e2eedb; }
.status.pending { color:#875c20; background:#f5e9d0; }
.status.expired { color:#777; background:#e8e8e4; }
.summary-total { align-self:center; color:var(--green); font-size:13px; }
.ticket-chip { width:42px; height:34px; display:grid; place-items:center; border-radius:8px; color:#fff; background:var(--green); font-weight:800; }
.email-link { color:var(--green); text-decoration:underline; text-decoration-color:rgba(30,90,63,.25); text-underline-offset:3px; }
.empty-cell { padding:28px; color:var(--muted); text-align:center; }
@media(max-width:800px){.stats-grid{grid-template-columns:1fr 1fr}.dashboard-title,.draw-card,.result-video-card .card-heading{align-items:start;flex-direction:column}.draw-controls,.result-video-toggle{width:100%;min-width:0}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.current-images{grid-template-columns:1fr}.result-video-current{grid-template-columns:1fr}.result-video-upload>div:not(.video-upload-progress){grid-template-columns:1fr}}
@media(max-width:520px){.admin-header{height:68px;padding:0 16px}.admin-brand small,.admin-header nav>a{display:none}.admin-shell{width:calc(100% - 24px);margin-top:26px}.stats-grid{grid-template-columns:1fr 1fr;gap:8px}.stats-grid article{padding:17px}.stats-grid strong{font-size:25px}.admin-card{padding:22px 17px}.danger-zone,.reset-zone{align-items:stretch;flex-direction:column}.danger-button,.reset-button{width:100%}.login-card{padding:35px 22px}.dashboard-actions{width:100%;align-items:stretch;flex-direction:column}.stripe-mode-control{justify-content:space-between}.dashboard-title .admin-button{width:100%}.manual-winner-entry{grid-template-columns:1fr}}

/* Raffle overview and navigation */
.dashboard-intro{margin:14px 0 0;color:var(--muted);font-size:14px;line-height:1.6}
.raffles-back{display:inline-flex;margin-bottom:24px;color:var(--green);font-size:13px;font-weight:700}
.dashboard-title>div:first-child{min-width:0}.dashboard-title h1{overflow-wrap:anywhere}
.admin-raffles-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.admin-raffle-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--paper);box-shadow:0 8px 24px rgba(23,33,28,.04);transition:transform .2s,box-shadow .2s,border-color .2s}
.admin-raffle-card:hover{transform:translateY(-4px);border-color:#789f83;box-shadow:var(--shadow)}
.admin-raffle-card:focus-visible,.raffles-back:focus-visible{outline:3px solid var(--green);outline-offset:5px}
.admin-raffle-art{position:relative;height:220px;background:#e7ebd9;display:grid;place-items:center;overflow:hidden}
.admin-raffle-art img{display:block;width:100%;height:100%;object-fit:cover}
.raffle-art-placeholder{font-size:90px;color:#789665}
.raffle-card-status{position:absolute;top:16px;left:16px;padding:7px 11px;border-radius:20px;font-size:11px;font-weight:700;background:#e4efdd;color:#25573e}
.raffle-card-status.finished{background:var(--green);color:#fff}.raffle-card-status.draft{background:#f7ead0;color:#7a5321}
.admin-raffle-body{padding:24px;display:flex;flex:1;flex-direction:column}
.raffle-card-slug{margin:0 0 10px;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.admin-raffle-body h2{font-size:25px;line-height:1.25;overflow-wrap:anywhere}
.raffle-card-numbers{display:flex;gap:24px;margin:23px 0;color:var(--muted);font-size:12px}
.raffle-card-numbers strong{color:var(--ink);font-size:16px}
.raffle-card-open{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:17px;border-top:1px solid var(--line);margin-top:auto;color:var(--green);font-size:13px;font-weight:700}
.raffle-card-open>span{font-size:22px}
@media(max-width:1000px){.admin-raffles-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-title{align-items:start;flex-wrap:wrap}}
@media(max-width:600px){.admin-raffles-grid{grid-template-columns:1fr;gap:18px}.admin-raffle-art{height:230px}.admin-raffle-body{padding:21px}.dashboard-intro{font-size:13px}.dashboard-title h1{font-size:34px}}
@media(prefers-reduced-motion:reduce){.admin-raffle-card{transition:none}}

.section-options{padding:22px;border:1px solid var(--line);border-radius:16px;background:#f6f7ef}.section-options .form-divider{margin:0;padding:0;border:0}.section-options>p{font-size:12px;line-height:1.6;color:var(--muted)}.section-option{position:relative;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid var(--line);cursor:pointer}.section-option strong{font-size:14px}.section-option small{font-size:12px;line-height:1.5}.section-option input{position:absolute;right:0;width:46px;height:26px;margin:0;opacity:0}.section-switch{position:relative;display:block;flex:0 0 46px;height:26px;border-radius:20px;background:#babfb6;pointer-events:none}.section-switch:after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:white;transition:transform .15s}.section-option input:checked+.section-switch{background:var(--green)}.section-option input:checked+.section-switch:after{transform:translateX(20px)}.section-option input:focus-visible+.section-switch{outline:3px solid var(--orange);outline-offset:3px}.connection-mode-label{margin-top:20px}.connection-mode-label select{display:block;width:100%;padding:12px;margin-top:8px;background:white;border:1px solid var(--line);border-radius:10px;font:inherit;color:var(--ink)}.section-options>small{display:block;margin-top:13px;font-size:11px;color:var(--muted);line-height:1.6}
