* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: #0a0a0b;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

a { color: #c084fc; text-decoration: none; }
a:hover { color: #d8b4fe; text-decoration: underline; }

.panel-header {
    background: rgba(24, 24, 27, 0.95);
    border-bottom: 1px solid #27272a;
    padding: 1rem 2rem;
}
.panel-header .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-header h1 {
    font-size: 1.25rem;
    color: #f1f5f9;
}
.panel-header h1 a { color: inherit; }
.panel-header nav { display: flex; gap: 1.25rem; align-items: center; }
.panel-header nav a { font-size: 0.875rem; }

.panel-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.panel-card {
    background: rgba(24, 24, 27, 0.6);
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.panel-card h2 {
    color: #f1f5f9;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.panel-card h3 {
    color: #f1f5f9;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: rgba(24, 24, 27, 0.6);
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    padding: 1.25rem;
}
.stat-card .label { color: #94a3b8; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .value { color: #f1f5f9; font-size: 1.75rem; font-weight: 700; margin-top: 0.5rem; }
.stat-card .sub { color: #64748b; font-size: 0.75rem; margin-top: 0.25rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    color: #cbd5e1;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(24, 24, 27, 0.7);
    border: 1px solid #3f3f46;
    border-radius: 0.5rem;
    color: #f1f5f9;
    font-size: 0.875rem;
    font-family: inherit;
}
.form-group small { color: #64748b; font-size: 0.75rem; display: block; margin-top: 0.25rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #9333ea;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.btn:hover { background: #a855f7; color: white; text-decoration: none; }
.btn.secondary { background: #3f3f46; }
.btn.secondary:hover { background: #52525b; }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #ef4444; }

.btn-sm {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: #9333ea;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}
.btn-sm:hover { background: #a855f7; color: white; text-decoration: none; }
.btn-sm.secondary { background: #3f3f46; }
.btn-sm.secondary:hover { background: #52525b; }
.btn-sm.danger { background: #dc2626; }
.btn-sm.danger:hover { background: #ef4444; }

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.action-row form { margin: 0; }

.ticket-notif-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.18), rgba(147, 51, 234, 0.10));
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    color: #f1f5f9;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.ticket-notif-banner:hover {
    border-color: #a855f7;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.25), rgba(147, 51, 234, 0.15));
    color: #f1f5f9;
    text-decoration: none;
}
.ticket-notif-icon { font-size: 1.25rem; line-height: 1; }

.alert {
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.alert.success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: #86efac; }
.alert.error   { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }
.alert.info    { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); color: #93c5fd; }

.captcha-click {
    display: inline-block;
    line-height: 0;
    border-radius: 0.5rem;
    border: 1px solid #3f3f46;
    overflow: hidden;
    background: #18181b;
}
.captcha-click input[type="image"] {
    display: block;
    cursor: crosshair;
    /* Don't scale — click coords are reported in rendered pixels. */
}
.captcha-click input[type="image"]:hover { opacity: 0.95; }

.token-box {
    background: rgba(15, 15, 17, 0.9);
    border: 1px dashed #a855f7;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #f1f5f9;
    font-size: 0.95rem;
    word-break: break-all;
    margin: 0.75rem 0;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.plan-option {
    display: block;
    padding: 1.25rem 1rem;
    background: rgba(15, 15, 17, 0.6);
    border: 2px solid #27272a;
    border-radius: 0.625rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-option:hover { border-color: #52525b; }
.plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.plan-option-selected { border-color: #a855f7; background: rgba(168, 85, 247, 0.08); }
.plan-name { color: #cbd5e1; font-size: 0.875rem; font-weight: 600; }
.plan-price { color: #f1f5f9; font-size: 1.5rem; font-weight: 700; margin: 0.25rem 0; }
.plan-duration { color: #64748b; font-size: 0.75rem; }
@media (max-width: 520px) { .plan-grid { grid-template-columns: 1fr; } }

.qr-wrap {
    display: inline-block;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 0.5rem;
    line-height: 0;
}
.qr-wrap img { display: block; }

.address-box {
    background: rgba(15, 15, 17, 0.9);
    border: 1px solid #3f3f46;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #f1f5f9;
    font-size: 0.95rem;
    word-break: break-all;
}

table.panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
table.panel-table th, table.panel-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #27272a;
}
table.panel-table th { color: #cbd5e1; font-weight: 600; }
table.panel-table td { color: #94a3b8; }

.status-pill {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-pill.pending   { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-pill.confirmed { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.status-pill.credited  { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.status-pill.expired   { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.status-pill.donated   { background: rgba(244, 114, 182, 0.15); color: #f472b6; }
.status-pill.active    { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.status-pill.paused    { background: rgba(100, 116, 139, 0.15); color: #cbd5e1; }
.status-pill.rejected  { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

.balance-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #34d399;
}
.balance-display .currency { color: #64748b; font-size: 1.25rem; font-weight: 500; }
