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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 640px; margin: 0 auto; padding: 16px; }

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    padding: 32px;
    margin-bottom: 20px;
}

.header { text-align: center; padding: 28px 0 12px; }
.header h1 { font-size: 1.6rem; font-weight: 700; }
.header p { color: #64748b; margin-top: 4px; }

h1 { font-size: 1.5rem; margin-bottom: 6px; }
h2 { font-size: 1.15rem; font-weight: 600; color: #475569; margin-bottom: 16px; }
h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }

.form-group { margin-bottom: 16px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    color: #475569;
    margin-bottom: 4px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="time"], input[type="number"],
textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea { resize: vertical; min-height: 80px; }

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s, transform .1s;
    text-align: center;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e2e8f0; color: #475569; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { display: block; width: 100%; }

.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: .9rem;
}
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.flash-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.event-details { margin: 16px 0; }
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0 20px;
}
.event-meta-item {
    font-size: .9rem;
    color: #475569;
}
.event-meta-item strong { color: #1e293b; }

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}
.stat-value { font-size: 2rem; font-weight: 700; color: #2563eb; }
.stat-label { font-size: .8rem; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }

.url-box {
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.url-box code {
    flex: 1;
    font-size: .85rem;
    word-break: break-all;
    color: #2563eb;
}

.qr-section { text-align: center; margin: 16px 0; }
.qr-section canvas { border-radius: 8px; }

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { font-weight: 600; color: #475569; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-active { background: #dcfce7; color: #16a34a; }
.badge-count { background: #dbeafe; color: #2563eb; }

.section-title {
    font-size: .85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.custom-field-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.custom-field-row input { flex: 1; }

.event-poster {
    text-align: center;
    margin-bottom: 20px;
}
.event-poster img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.custom-content {
    line-height: 1.7;
    word-wrap: break-word;
}
.custom-content img { max-width: 100%; height: auto; border-radius: 8px; }
.custom-content h1, .custom-content h2, .custom-content h3 { margin: 16px 0 8px; }
.custom-content p { margin-bottom: 12px; }
.custom-content ul, .custom-content ol { margin: 0 0 12px 20px; }

input[type="file"] {
    width: 100%;
    padding: 8px;
    font-size: .9rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.interest-banner {
    text-align: center;
    padding: 12px;
    background: #dbeafe;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #1d4ed8;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    color: #16a34a;
}

.footer {
    text-align: center;
    padding: 24px 0;
    font-size: .8rem;
    color: #94a3b8;
}
.footer a { color: #64748b; text-decoration: none; }
.footer a:hover { color: #2563eb; }

.hint { font-size: .8rem; color: #94a3b8; margin-top: 2px; }

@media (max-width: 480px) {
    .card { padding: 20px; }
    .form-row { flex-direction: column; gap: 0; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; }
    th, td { padding: 8px 6px; }
}
