/* Mobile-first styling for installer, attendee flow, and admin dashboard. */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: #f6f7fb;
    color: #1f2937;
}

.container {
    width: min(1100px, 94%);
    margin: 20px auto 36px;
}

.container.narrow {
    width: min(640px, 94%);
}

h1, h2, h3 {
    margin: 0 0 12px;
}

p {
    margin: 0 0 10px;
}

.muted {
    color: #6b7280;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.topbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.attendee-wrap {
    background: radial-gradient(circle at top right, #ecfeff, transparent 35%), radial-gradient(circle at top left, #eff6ff, transparent 30%);
    border-radius: 16px;
    padding: 10px;
}

.attendee-hero {
    border: 1px solid #dbeafe;
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
}

.upload-card {
    border: 1px solid #c7d2fe;
    background: #ffffff;
}

.upload-greeting {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.upload-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.upload-tile {
    display: block;
    padding: 14px;
    border: 1px dashed #93c5fd;
    background: #f8fbff;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.upload-tile:hover {
    transform: translateY(-1px);
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-title {
    display: block;
    font-weight: 600;
    color: #1e3a8a;
}

.upload-sub {
    display: block;
    font-size: 0.9rem;
    color: #475569;
    margin-top: 2px;
}

.file-hidden {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.file-summary {
    margin-top: 12px;
}

label {
    display: block;
    font-size: 0.9rem;
    margin: 10px 0 6px;
    color: #374151;
}

input, textarea, button {
    font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 10px 14px;
    margin-top: 12px;
    cursor: pointer;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-light {
    background: #e5e7eb;
    color: #111827;
}

.btn-light:hover {
    background: #d1d5db;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.alert-success {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fca5a5;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.event-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #fafafa;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.photo-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.photo-card .meta {
    padding: 8px;
    display: grid;
    gap: 4px;
}

.small-link {
    display: inline-block;
    margin-top: 10px;
    color: #1d4ed8;
    text-decoration: none;
}

.small-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .container {
        width: 96%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .topbar-actions .btn {
        width: auto;
    }
}
