/* ============================================
   PhotoBuk - Estilos Globais
   Font: ABCRepro (--font-sans / --font-heading / --font-mono)
   ============================================ */

@font-face {
    font-family: 'ABCRepro';
    src: url('../fonts/ABCRepro-Screen.2d0dd2ca.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABCRepro';
    src: url('../fonts/ABCRepro-Medium.0a64b59a.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABCRepro';
    src: url('../fonts/ABCRepro-Bold.815748f4.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais */
    --color-primary: #1a365d;
    --color-primary-light: #2b6cb0;
    --color-primary-lighter: #3182ce;
    --color-white: #ffffff;
    --color-gray-100: #f7fafc;
    --color-gray-200: #edf2f7;
    --color-gray-600: #718096;
    --color-gray-800: #2d3748;
    --color-dark: #1a202c;

    /* Tipografia */
    --font-sans: 'ABCRepro', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-heading: 'ABCRepro', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --font-family: var(--font-sans);
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    color: var(--color-gray-800);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tipografia - Títulos */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: var(--font-weight-medium);
}

h1, h2 {
    font-weight: var(--font-weight-medium);
}

h3, h4 {
    font-weight: var(--font-weight-medium);
}

h5, h6 {
    font-weight: var(--font-weight-medium);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    text-decoration: none;
    color: var(--color-primary-light);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Landing Page
   ============================================ */

.landing-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
        url('../img/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.landing-user-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
}

.account-menu {
    position: relative;
    display: inline-block;
}

.account-menu summary {
    list-style: none;
}

.account-menu summary::marker {
    content: '';
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu-trigger {
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 999px;
    color: #3f3f46;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-menu-trigger:hover {
    transform: translateY(-1px);
}

.account-menu-trigger-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 3px solid #4caf50;
    background: linear-gradient(135deg, #f5f7fb 0%, #e7ecf4 100%);
    color: #111827;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.account-menu-panel {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    width: min(92vw, 330px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    padding: 0.75rem;
    display: none;
    gap: 0.25rem;
    z-index: 120;
    text-align: left;
}

.account-menu[open] .account-menu-panel {
    display: grid;
}

.account-menu-head {
    padding: 0.35rem 0.35rem 0.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.account-menu-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.account-menu-avatar {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 3px solid #4caf50;
    background: linear-gradient(135deg, #f5f7fb 0%, #e7ecf4 100%);
    color: #111827;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.account-menu-head-text {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
}

.account-menu-head strong {
    font-size: 1rem;
    font-weight: 700;
    color: #18181b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-menu-head span {
    font-size: 0.82rem;
    color: #5f6470;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-menu-badge {
    flex-shrink: 0;
    border: 1px solid #c8d7f4;
    background: #eef4ff;
    color: #3156d3;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    line-height: 1;
}

.account-menu-separator {
    height: 1px;
    background: #eceff3;
    margin: 0.15rem -0.1rem;
}

.account-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    font-size: 0.98rem;
    color: #23262d;
    text-decoration: none;
    line-height: 1.25;
    white-space: normal;
    gap: 0.75rem;
}

.account-menu-item-main {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.account-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #7c8290;
}

.account-menu-item:hover {
    background: #f5f7fa;
    color: #111827;
}

.account-menu-item-static {
    color: #5f6470;
    cursor: default;
}

.account-menu-item-static strong,
.account-menu-item-static .account-menu-chip {
    color: #111827;
}

.account-menu-item-static:hover {
    background: transparent;
    color: #5f6470;
}

.account-menu-chip {
    border: 1px solid #d9dee8;
    background: #ffffff;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    line-height: 1;
}

.account-menu-logout {
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid #dfe4ea;
    background: #ffffff;
    color: #1f2937;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.account-menu-logout:hover {
    background: #f8fafc;
    color: #111827;
}

.landing-user-name {
    font-size: 0.83rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-gray-800);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-user-link {
    color: var(--color-primary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: var(--font-weight-medium);
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
}

.landing-user-link:hover {
    background: rgba(26, 54, 93, 0.08);
}

.landing-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.landing-container.video-ready .landing-bg-video {
    opacity: 1;
}

.landing-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.78);
    z-index: 1;
    pointer-events: none;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.landing-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: min(92vw, 520px);
}

.landing-logo {
    width: 464px;
    max-width: 80vw;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(26, 54, 93, 0.08));
    animation: logoFadeIn 1.2s ease-out;
}

.landing-tagline {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: 1.1rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-gray-600);
    opacity: 0;
    animation: taglineFadeIn 1s ease-out 0.6s forwards;
}

.landing-enter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    animation: none;
}

.landing-enter:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.25);
}

.landing-enter svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.landing-enter:hover svg {
    transform: translateX(3px);
}

.event-form {
    width: 100%;
    display: grid;
    gap: 0.75rem;
}

.form-label {
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.form-input {
    width: 100%;
    border: 1px solid rgba(26, 54, 93, 0.25);
    border-radius: 6px;
    padding: 0.8rem 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--color-dark);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.16);
}

.form-input[type="file"] {
    padding: 0.45rem 0.55rem;
    background: #f8fafc;
    border-style: dashed;
    cursor: pointer;
}

.form-input[type="file"]::file-selector-button {
    border: 1px solid rgba(26, 54, 93, 0.3);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font-family: var(--font-family);
    font-size: 0.86rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.03em;
    padding: 0.42rem 0.75rem;
    margin-right: 0.55rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-input[type="file"]::-webkit-file-upload-button {
    border: 1px solid rgba(26, 54, 93, 0.3);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font-family: var(--font-family);
    font-size: 0.86rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.03em;
    padding: 0.42rem 0.75rem;
    margin-right: 0.55rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-input[type="file"]:hover::file-selector-button,
.form-input[type="file"]:hover::-webkit-file-upload-button {
    background: rgba(49, 130, 206, 0.09);
    border-color: rgba(49, 130, 206, 0.5);
}

.auth-form .gallery-tab {
    width: 100%;
    justify-content: center;
}

.auth-submit {
    justify-content: center;
    width: 100%;
    margin-top: 0.35rem;
}

.landing-auth-actions {
    width: 100%;
    display: grid;
    gap: 0.65rem;
}

.landing-events {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.landing-events-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #edf2f7;
}

.landing-events-title {
    font-size: 1.05rem;
    color: #1a202c;
    font-weight: 700;
    margin: 0;
}

.landing-events-count {
    font-size: 0.72rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.landing-events-list {
    display: grid;
    gap: 0.55rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.1rem;
}

.landing-event-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.landing-event-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.08);
    transform: translateY(-1px);
}

.landing-event-main {
    min-width: 0;
}

.landing-event-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-event-meta {
    margin: 0;
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: var(--color-gray-600);
}

.landing-event-enter {
    flex-shrink: 0;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: #2b6cb0;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    border-radius: 999px;
    padding: 0.38rem 0.78rem;
}

.landing-event-enter:hover {
    border-color: #93c5fd;
    background: #dbeafe;
    color: #1e40af;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(26, 54, 93, 0.25);
    border-radius: 6px;
    padding: 0.7rem 1rem;
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    text-decoration: none;
}

.btn-google-icon {
    flex-shrink: 0;
}

.btn-google:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-light);
}

.auth-page,
.event-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('../img/bg.png');
    background-size: cover;
    background-position: center;
}

.auth-card,
.event-card {
    width: min(92vw, 460px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(26, 54, 93, 0.12);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(26, 54, 93, 0.08);
    padding: 1.4rem 1.2rem 1.3rem;
    display: grid;
    gap: 0.85rem;
}

.auth-logo {
    width: min(100%, 280px);
    justify-self: center;
}

.auth-title {
    color: var(--color-primary);
    font-size: 1.65rem;
    font-weight: var(--font-weight-semibold);
    text-align: center;
}

.auth-subtitle,
.auth-help {
    text-align: center;
    color: var(--color-gray-600);
    font-size: 0.95rem;
}

.auth-inline {
    margin-top: -0.3rem;
}

.auth-form {
    display: grid;
    gap: 0.65rem;
}

.auth-back {
    color: var(--color-primary);
    text-align: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: var(--font-weight-medium);
}

.alert {
    border-radius: 6px;
    font-size: 0.9rem;
    padding: 0.62rem 0.72rem;
}

.alert-error {
    color: #8a1f2b;
    border: 1px solid rgba(138, 31, 43, 0.25);
    background: rgba(255, 235, 238, 0.92);
}

.alert-success {
    color: #1d5f3a;
    border: 1px solid rgba(29, 95, 58, 0.25);
    background: rgba(233, 248, 238, 0.92);
}

.event-actions {
    display: grid;
    gap: 0.55rem;
}

/* Animações */
@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes taglineFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Gallery Header
   ============================================ */

/* Barra de atalho para o admin voltar ao painel (página do evento) */
.event-admin-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 0.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.event-admin-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s;
}
.event-admin-bar-link:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.gallery-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(26, 54, 93, 0.1);
    padding: 0.6rem 1rem;
}

.gallery-header-minimal .gallery-header-inner {
    max-width: 100%;
}

.gallery-header-logo-link {
    display: flex;
    text-decoration: none;
}

.gallery-header-logo {
    width: 100px;
    height: auto;
}

.gallery-header-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.gallery-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
}

.gallery-user {
    color: var(--color-gray-800);
    font-weight: var(--font-weight-medium);
}

.gallery-profile-logout {
    color: var(--color-gray-600);
    padding: 0.35rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.gallery-profile-link {
    color: var(--color-primary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: var(--font-weight-medium);
}

.gallery-profile-logout:hover {
    color: var(--color-primary);
    background: rgba(26, 54, 93, 0.06);
}

.gallery-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gallery-event-name {
    font-size: 1.15rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    line-height: 1.2;
}

.gallery-event-code {
    font-size: 0.78rem;
    color: var(--color-gray-600);
    letter-spacing: 0.04em;
}

.gallery-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
}

.gallery-logout {
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: var(--font-weight-medium);
    font-size: 0.75rem;
}

.profile-card {
    width: min(92vw, 520px);
}

.profile-divider {
    border: 0;
    border-top: 1px solid rgba(26, 54, 93, 0.12);
    margin: 0.25rem 0;
}

/* Event shell + sidebar */
.event-shell {
    display: flex;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: calc(100vh - 60px);
}

.event-sidebar {
    flex-shrink: 0;
    width: 200px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(26, 54, 93, 0.1);
    border-radius: 10px;
    padding: 1rem 0.75rem;
}

.event-sidebar-title {
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin: 0 0 0.75rem;
    padding: 0 0.5rem 0.5rem;
    border-bottom: 1px solid rgba(26, 54, 93, 0.12);
}

/* Card de total de fotos acima da galeria */
.event-photo-count-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 54, 93, 0.25);
}

.event-photo-count-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

.event-photo-count-icon svg {
    width: 26px;
    height: 26px;
}

.event-photo-count-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.event-photo-count-label {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.9;
}

.event-photo-count-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.event-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.event-nav-link {
    display: block;
    font-size: 0.88rem;
    color: var(--color-gray-700);
    text-decoration: none;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.event-nav-link:hover {
    background: rgba(26, 54, 93, 0.06);
    color: var(--color-primary);
}

.event-nav-link.is-active {
    background: rgba(26, 54, 93, 0.1);
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
}

/* ============================================
   Selfie Section
   ============================================ */

.gallery-main {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0;
}

.event-shell .gallery-main {
    max-width: none;
    margin: 0;
}

.selfie-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    text-align: center;
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
}

/* Encontre suas fotos - layout compacto com ícones e cores */
.selfie-section-find {
    text-align: left;
    max-width: 420px;
}

.selfie-section-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.selfie-section-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    color: #2b6cb0;
    border-radius: 14px;
}

.selfie-section-icon svg {
    width: 28px;
    height: 28px;
}

.selfie-section-find .selfie-title {
    margin-bottom: 0.25rem;
}

.selfie-section-find .selfie-desc {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.event-selfie-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
}

.selfie-alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.selfie-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #2b6cb0 0%, #2c5282 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.35);
}

.selfie-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(43, 108, 176, 0.4);
}

.selfie-btn-primary svg {
    width: 20px;
    height: 20px;
}

.selfie-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 1rem;
    margin-bottom: 0.5rem;
    background: #f7fafc;
    color: #4a5568;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.selfie-btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.selfie-btn-secondary svg {
    width: 18px;
    height: 18px;
    color: #718096;
}

.selfie-whatsapp-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.selfie-whatsapp-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: #166534;
}

.selfie-whatsapp-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #22c55e;
}

.selfie-whatsapp-text {
    flex: 1;
}

.selfie-whatsapp-help {
    font-size: 0.8rem;
    color: #15803d;
    margin: 0;
}

.selfie-whatsapp-help a {
    color: #16a34a;
    font-weight: 600;
}

.selfie-title {
    font-size: 1.15rem;
    color: #1a202c;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.selfie-desc {
    font-size: 0.84rem;
    color: #4a5568;
    margin-bottom: 0.95rem;
    line-height: 1.5;
}

.selfie-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

.selfie-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 170px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.selfie-upload-area:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.selfie-upload-area.has-file {
    border-style: solid;
    border-color: #e2e8f0;
    background: #fff;
    padding: 0;
}

.selfie-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.75rem;
    text-align: center;
}

.selfie-upload-icon {
    color: #a0aec0;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.selfie-upload-area:hover .selfie-upload-icon {
    color: #4299e1;
}

.selfie-upload-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
}

.selfie-upload-subtext {
    font-size: 0.76rem;
    color: #718096;
}

.selfie-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.selfie-preview-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.selfie-preview-container[hidden] {
    display: none !important;
}

.selfie-preview-img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.selfie-change-btn {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.selfie-upload-area:hover .selfie-change-btn {
    background: rgba(0, 0, 0, 0.85);
}

.selfie-submit {
    margin-top: 0.2rem;
    width: 100%;
    padding: 0.7rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2b6cb0;
    border: none;
    box-shadow: 0 4px 6px rgba(43, 108, 176, 0.25);
}

.selfie-submit:hover {
    background-color: #2c5282;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(43, 108, 176, 0.3);
}

.selfie-status {
    width: 100%;
    padding: 0.55rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    text-align: center;
}

.selfie-status-loading {
    color: var(--color-primary);
    background: rgba(49, 130, 206, 0.08);
}

.selfie-status-success {
    color: #1d5f3a;
    background: rgba(233, 248, 238, 0.92);
}

.selfie-status-error {
    color: #8a1f2b;
    background: rgba(255, 235, 238, 0.92);
}

.event-selfie-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.event-selfie-alert {
    margin-bottom: 0.7rem;
}

.event-whatsapp-form {
    gap: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.7rem;
    margin-bottom: 0.8rem;
}

.event-whatsapp-check {
    margin-bottom: 0.2rem;
}

.event-whatsapp-label {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
}

.event-selfie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
}

.event-profile-selfie-inline {
    margin-right: 0.45rem;
    padding: 0.38rem 0.55rem;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #f8fafc;
    text-align: right;
    min-width: 170px;
}

.event-profile-selfie-label {
    display: block;
    font-size: 0.62rem;
    color: var(--color-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.event-profile-selfie-inline strong {
    display: block;
    font-size: 0.82rem;
    color: var(--color-primary);
    line-height: 1.25;
}

.event-profile-selfie-inline small {
    display: block;
    font-size: 0.7rem;
    color: var(--color-gray-600);
}

.profile-selfie-preview-wrap {
    margin-bottom: 0.6rem;
    border-radius: 10px;
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    padding: 0.45rem;
    display: flex;
    justify-content: center;
}

.profile-selfie-preview {
    width: min(100%, 240px);
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

.selfie-last-search {
    font-size: 0.82rem;
    color: var(--color-gray-600);
    margin-top: 0.6rem;
}

/* ============================================
   Gallery Grid
   ============================================ */

.gallery-section {
    margin-top: 0.5rem;
}

.gallery-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.gallery-tab {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(26, 54, 93, 0.2);
    border-radius: 20px;
    background: transparent;
    color: var(--color-gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-tab-active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-gray-600);
}

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

.gallery-item-wrap {
    position: relative;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--color-gray-100);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item-fav {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.gallery-item-fav:hover {
    color: #dc2626;
    transform: scale(1.05);
}

.gallery-item-fav.is-favorited {
    color: #dc2626;
}

.gallery-item-wrap:hover .gallery-item-fav {
    background: rgba(255, 255, 255, 0.95);
}

.gallery-item-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(26, 54, 93, 0.15);
}

.gallery-item.is-match {
    outline: 3px solid var(--color-primary-lighter);
    outline-offset: -3px;
}

.gallery-item-match {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--color-primary-lighter);
    color: var(--color-white);
    font-size: 0.65rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
}

.lightbox[hidden] {
    display: none !important;
}

.lightbox-img {
    max-width: min(92vw, 1200px);
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center center;
    transition: transform 140ms ease-out;
    will-change: transform;
    backface-visibility: hidden;
}

.lightbox-caption {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.2rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
}

.lightbox-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    text-align: center;
    font-family: var(--font-mono);
}

.lightbox-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
}

.lightbox-action-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s, border-color 0.2s;
}

.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-action-btn.is-favorited .lightbox-fav-icon {
    fill: currentColor;
}

.lightbox-removal-btn {
    font-size: 0.8rem;
}

.lightbox-removal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(90vw, 420px);
    padding: 0.85rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10010;
    font-size: 0.95rem;
    animation: feedback-toast-in 0.25s ease;
}

.feedback-toast[hidden] {
    display: none !important;
}

.feedback-toast.toast-success {
    background: #0d6832;
    color: #fff;
}

.feedback-toast.toast-error {
    background: #b91c1c;
    color: #fff;
}

@keyframes feedback-toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ffffff;
}

.lightbox-close {
    top: 1rem;
    right: 1.2rem;
    font-size: 2.5rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

@media (prefers-reduced-motion: reduce) {
    .lightbox-img {
        transition: none !important;
        transform: none !important;
    }
}

/* ============================================
   Painel Admin
   Font: var(--font-sans) (system)
   ============================================ */

.admin-page {
    font-family: var(--font-sans);
    width: 100%;
    min-height: 100vh;
    background: #f5f5f8;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-page *,
.admin-page *::before,
.admin-page *::after {
    font-family: inherit;
}

.admin-page h1,
.admin-page h2,
.admin-page h3 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-medium);
    line-height: 1.3;
}

.admin-page code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: #f0f0f4;
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

/* --- Header do painel --- */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e8e8ef;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.admin-logo {
    width: 130px;
    max-width: 30vw;
}

.admin-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0;
}

.admin-subtitle {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 400;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* --- Conteúdo principal (dentro do <main>) --- */

.admin-page > *:not(.admin-header) {
    margin-left: 2rem;
    margin-right: 2rem;
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 1rem;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 12px;
    padding: 1rem 0.75rem;
}

.admin-sidebar-title {
    font-size: 0.86rem;
    color: #6b7280;
    font-weight: 600;
    margin: 0 0 0.65rem;
    padding: 0 0.45rem 0.55rem;
    border-bottom: 1px solid #f0f0f4;
}

.admin-sidebar-nav {
    display: grid;
    gap: 0.2rem;
}

.admin-nav-link {
    display: block;
    font-size: 0.88rem;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.55rem 0.6rem;
    border: 1px solid transparent;
}

.admin-nav-link:hover {
    background: #f9fafb;
    border-color: #ececf2;
    color: #111827;
}

.admin-nav-link.is-active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #312e81;
    font-weight: 600;
}

.admin-content {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

/* --- Grid de layout --- */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

/* --- Card --- */

.admin-card {
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 12px;
    padding: 1.5rem;
}

.admin-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f0f0f4;
}

.admin-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-card-header-row h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

/* --- Métricas (estilo Hostinger: linhas label-valor) --- */

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 1rem;
    border: 1px solid #e8e8ef;
    border-radius: 10px;
    overflow: hidden;
}

.admin-metrics-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-metric {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f4;
    border-right: 1px solid #f0f0f4;
    background: #fff;
}

.admin-metric:last-child,
.admin-metrics-wide .admin-metric:nth-child(4n),
.admin-metrics:not(.admin-metrics-wide) .admin-metric:nth-child(2n) {
    border-right: none;
}

.admin-metric-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.2rem;
    letter-spacing: 0;
    text-transform: none;
}

.admin-metric strong {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Caminho FTP: celula com truncar + botao Ver (mobile) */
.upload-path-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.upload-path-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.85em;
}
.upload-path-view {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: var(--bg-page, #f5f5f9);
    border: 1px solid var(--border, #e0e0e8);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary, #555);
}
.upload-path-view:hover {
    background: var(--border, #e0e0e8);
    color: var(--text-dark, #1a1a1a);
}
.upload-path-paragraph .upload-path-cell {
    display: inline-flex;
    max-width: 100%;
    color: #1a1a2e;
}

/* --- Formulários inline e ações --- */

.admin-inline-form {
    display: inline-flex;
    margin-top: 0;
}

.admin-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 0.25rem;
}

.admin-action-bar .admin-inline-form {
    margin-top: 0;
}

/* --- Botões do painel --- */

.admin-page .landing-enter {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    margin-top: 0;
    opacity: 1;
    animation: none;
}

.admin-page .gallery-tab {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.admin-page .gallery-tab:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.admin-btn-process {
    gap: 0.4rem;
    background-color: #1a1a2e;
}

.admin-btn-process:hover {
    background-color: #2d2d4e;
}

.admin-btn-process:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.admin-btn-process:disabled:hover {
    transform: none;
    box-shadow: none;
    background-color: #1a1a2e;
}

.admin-btn-warn {
    background-color: #d97706;
}

.admin-btn-warn:hover {
    background-color: #b45309;
}

.admin-btn-success {
    background-color: #059669;
}

.admin-btn-success:hover {
    background-color: #047857;
}

.admin-btn-small {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.admin-removal-actions-cell {
    white-space: nowrap;
}

.admin-removal-actions-cell .admin-removal-form {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.admin-removal-actions-cell .admin-removal-form:last-child {
    margin-right: 0;
}

/* --- Feedback / Alertas --- */

.admin-feedback {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.admin-feedback-loading {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.admin-feedback-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.admin-feedback-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.admin-feedback-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.admin-page .alert {
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- Títulos de seção --- */

.admin-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 1.25rem;
    margin-bottom: 0.6rem;
}

/* --- Upload area --- */

.admin-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2.5rem 1rem;
    text-align: center;
    transition: all 0.25s ease;
    margin-bottom: 1rem;
    background: #fafafa;
}

.admin-upload-area:hover,
.admin-upload-dragover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.admin-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.88rem;
}

.admin-upload-label svg {
    color: #6366f1;
}

.admin-progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.admin-progress-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.admin-progress-fill-file {
    background: #10b981;
}

/* --- Upload sequencial: status por arquivo --- */

.upload-global-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.upload-current-name {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0.5rem 0 0.2rem;
}

.upload-file-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e8e8ef;
    border-radius: 10px;
}

.upload-file-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    border-bottom: 1px solid #f0f0f4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-file-item:last-child {
    border-bottom: none;
}

.upload-file-sending {
    color: #1e40af;
    background: #eff6ff;
}

.upload-file-sending::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid #3b82f6;
    border-top-color: transparent;
    border-radius: 50%;
    animation: uploadSpin 0.6s linear infinite;
    flex-shrink: 0;
}

.upload-file-ok {
    color: #065f46;
    background: #ecfdf5;
}

.upload-file-ok::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
}

.upload-file-error {
    color: #991b1b;
    background: #fef2f2;
}

.upload-file-error::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    flex-shrink: 0;
}

.upload-file-skipped {
    color: #92400e;
    background: #fffbeb;
}

.upload-file-skipped::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #f59e0b;
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes uploadSpin {
    to { transform: rotate(360deg); }
}

/* --- Detalhes da fila (por evento) --- */

.admin-queue-details {
    border: 1px solid #e8e8ef;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    background: #fff;
}

.admin-queue-details summary {
    cursor: pointer;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #1a1a2e;
    list-style: none;
}

.admin-queue-details summary::-webkit-details-marker {
    display: none;
}

.admin-queue-details summary::before {
    content: ">";
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: 700;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.admin-queue-details[open] summary::before {
    transform: rotate(90deg);
}

.admin-queue-details summary:hover {
    background: #f9fafb;
}

.admin-queue-details[open] summary {
    border-bottom: 1px solid #f0f0f4;
}

.admin-queue-details .admin-table-wrap {
    padding: 0;
}

/* --- Ações nos eventos --- */

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-actions-dropdown {
    position: relative;
}

.admin-actions-dropdown summary {
    list-style: none;
    cursor: pointer;
}

.admin-actions-dropdown summary::-webkit-details-marker {
    display: none;
}

.admin-actions-menu {
    position: fixed;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    padding: 0.35rem;
    z-index: 1100;
    display: grid;
    gap: 0.2rem;
}

.admin-actions-menu-form {
    margin: 0;
}

.admin-actions-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    font-size: 0.83rem;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
}

.admin-actions-menu-item:hover {
    background: #f9fafb;
    color: #111827;
}

.admin-actions-menu-item-danger {
    color: #b91c1c;
}

.admin-actions-menu-item-danger:hover {
    background: #fef2f2;
    color: #991b1b;
}

/* --- Formulário de adicionar usuário --- */

.admin-user-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.admin-user-form-create {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form-field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.admin-form-action {
    align-self: end;
}

.admin-form-action .auth-submit {
    margin-top: 0;
    width: 100%;
}

.admin-page .form-input {
    font-family: var(--font-sans);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    background: #fff;
    color: #1a1a2e;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-page .form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-page .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
}

/* --- Tabela --- */

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    border-bottom: 1px solid #f0f0f4;
    padding: 0.7rem 0.75rem;
    vertical-align: middle;
    font-size: 0.85rem;
    color: #374151;
}

.admin-table th {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: 0;
    background: #fafafa;
    border-bottom: 1px solid #e8e8ef;
}

.admin-table tr:hover td {
    background: #f9fafb;
}

.admin-event-name-link {
    color: #312e81;
    text-decoration: none;
    font-weight: 500;
}
.admin-event-name-link:hover {
    text-decoration: underline;
    color: #4338ca;
}

/* --- Danger tab --- */

.gallery-tab-danger {
    background: #fff;
    border-color: #fca5a5;
    color: #dc2626;
}

.gallery-tab-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

/* --- Log viewer --- */

.admin-log {
    white-space: pre-wrap;
    font-family: var(--font-mono);
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 10px;
    padding: 1rem;
    max-height: 280px;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.65;
}

/* --- Auth help no painel --- */

.admin-page .auth-help {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 0.75rem;
}

/* --- Modal admin --- */

.admin-modal[hidden] {
    display: none !important;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.admin-modal-dialog {
    position: relative;
    width: min(560px, 94vw);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.22);
    z-index: 1;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #1a1a2e;
}

.admin-modal-close {
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* ============================================
   Utilitários
   ============================================ */

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-gray-600); }
.text-success { color: #0f766e; }
.text-danger { color: #b91c1c; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ============================================
   Responsivo
   ============================================ */

@media (max-width: 1024px) {
    .admin-user-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-user-form-create {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metrics-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .landing-logo {
        width: 348px;
    }

    .landing-tagline {
        font-size: 0.9rem;
        letter-spacing: 0.25em;
    }

    .landing-content {
        width: min(92vw, 440px);
        gap: 1.35rem;
    }

    .landing-event-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-event-enter {
        align-self: flex-end;
    }

    .landing-user-menu {
        top: 0.65rem;
        right: 0.65rem;
        left: auto;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

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

    .gallery-header-inner {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .gallery-user {
        display: none;
    }

    .gallery-header-logo {
        width: 80px;
    }

    .event-shell {
        flex-direction: column;
        padding: 0.75rem;
    }

    .event-sidebar {
        width: 100%;
    }

    .event-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .event-nav-link {
        padding: 0.6rem 0.75rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-metrics {
        grid-template-columns: 1fr;
    }

    .admin-metrics-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-user-form,
    .admin-user-form-create {
        grid-template-columns: 1fr;
    }

    .admin-form-action {
        align-self: auto;
    }

    .admin-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-header {
        padding: 0.85rem 1rem;
    }

    .admin-logo {
        width: 100px;
    }

    .admin-title {
        font-size: 1rem;
    }

    .admin-subtitle {
        display: none;
    }

    .admin-page > *:not(.admin-header) {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }

    .admin-card {
        padding: 1rem;
    }

    .admin-card-header-row {
        flex-wrap: wrap;
    }

    .admin-table {
        min-width: 600px;
    }

    .admin-table-events {
        min-width: 0;
        width: 100%;
    }

    .admin-table-events thead {
        display: none;
    }

    .admin-table-events tbody,
    .admin-table-events tr,
    .admin-table-events td {
        display: block;
        width: 100%;
    }

    .admin-table-events tr {
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 0.65rem;
        margin-bottom: 0.7rem;
        background: #fff;
    }

    .admin-table-events td {
        border: 0 !important;
        padding: 0.35rem 0;
    }

    .admin-table-events td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.14rem;
    }

    .admin-table-events td[data-label="Acoes"] {
        padding-top: 0.55rem;
    }

    .admin-table-events td[data-label="Acoes"]::before {
        margin-bottom: 0.35rem;
    }

    .admin-table-events .admin-actions-dropdown {
        width: 100%;
    }

    .admin-table-events .admin-actions-dropdown > summary {
        width: 100%;
        justify-content: center;
    }

    .admin-table-removals {
        min-width: 0;
        width: 100%;
    }

    .admin-table-removals thead {
        display: none;
    }

    .admin-table-removals tbody,
    .admin-table-removals tr,
    .admin-table-removals td {
        display: block;
        width: 100%;
    }

    .admin-table-removals tr {
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 0.65rem;
        margin-bottom: 0.7rem;
        background: #fff;
    }

    .admin-table-removals td {
        border: 0 !important;
        padding: 0.35rem 0;
    }

    .admin-table-removals td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.14rem;
    }

    .admin-table-removals .admin-removal-actions-cell {
        white-space: normal;
        padding-top: 0.5rem;
    }

    .admin-table-removals .admin-removal-actions-cell .admin-removal-form {
        display: inline-block;
        margin-right: 0.5rem;
    }

    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2.2rem;
        min-width: 44px;
        min-height: 44px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2.5rem;
        min-width: 44px;
        min-height: 44px;
    }

    .lightbox-prev {
        left: 0.25rem;
    }

    .lightbox-next {
        right: 0.25rem;
    }

    .lightbox-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }

    .lightbox-action-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 0.9rem;
    }

    .admin-actions-menu {
        min-width: min(220px, calc(100vw - 16px));
    }

    .admin-modal-dialog {
        padding: 1rem 0.85rem;
    }

    .admin-modal-actions {
        flex-direction: column;
    }

    .admin-modal-actions .gallery-tab,
    .admin-modal-actions .landing-enter {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}

/* Rolagem e container da página de auth no mobile */
@media (max-width: 768px) {
    .auth-page {
        align-items: start;
        justify-items: center;
        padding: 1rem 0.75rem 2rem;
    }
}

@media (max-width: 480px) {
    .landing-logo {
        width: 290px;
    }

    .landing-tagline {
        font-size: 0.8rem;
    }

    .auth-card,
    .event-card {
        width: 94vw;
        padding: 1rem 0.9rem;
    }

    .profile-card {
        width: min(94vw, 100%);
        padding: 1rem 0.85rem;
    }

    .auth-title {
        font-size: 1.35rem;
    }

    .profile-card .auth-logo {
        max-width: min(100%, 200px);
    }

    .profile-card .auth-form {
        gap: 0.75rem;
    }

    .profile-card .form-label {
        font-size: 0.8rem;
    }

    .auth-submit,
    .auth-form .gallery-tab {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .auth-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0.5rem 0.75rem;
        margin-top: 0.25rem;
    }

    .profile-selfie-preview-wrap {
        max-width: 100%;
    }

    .profile-selfie-preview {
        max-width: 100%;
    }

    .event-whatsapp-label {
        word-wrap: break-word;
        overflow-wrap: break-word;
        gap: 0.5rem;
        align-items: center;
    }

    .event-whatsapp-label input[type="checkbox"] {
        flex-shrink: 0;
        min-width: 20px;
        min-height: 20px;
    }

    .profile-divider {
        margin: 0.2rem 0;
    }

    .auth-page .alert {
        font-size: 0.88rem;
        padding: 0.6rem 0.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.3rem;
    }

    .gallery-header-logo {
        width: 64px;
    }

    .gallery-profile-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .event-shell {
        padding: 0.5rem;
    }

    .event-sidebar {
        padding: 0.6rem 0.5rem;
    }

    .event-sidebar-title {
        font-size: 0.82rem;
        padding-bottom: 0.35rem;
        margin-bottom: 0.5rem;
    }

    .selfie-section {
        padding: 0.85rem;
    }

    .event-selfie-summary {
        grid-template-columns: 1fr;
    }

    .event-profile-selfie-inline {
        min-width: 0;
        margin-right: 0;
        margin-bottom: 0.35rem;
        text-align: center;
        width: 100%;
    }

    .event-selfie-actions .gallery-tab,
    .event-selfie-actions .landing-enter,
    .event-selfie-actions .selfie-btn-primary,
    .event-selfie-actions .selfie-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .event-photo-count-card {
        padding: 0.85rem 1rem;
        gap: 0.85rem;
    }

    .event-photo-count-number {
        font-size: 1.5rem;
    }

    .selfie-title {
        font-size: 1rem;
    }

    .selfie-desc {
        font-size: 0.82rem;
    }

    .gallery-item-fav {
        width: 32px;
        height: 32px;
    }

    .gallery-item-checkbox {
        width: 28px;
        height: 28px;
    }

    .lightbox-caption {
        font-size: 0.75rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }

    .lightbox-actions {
        padding: 0 0.5rem;
    }

    .admin-header {
        padding: 0.6rem 0.75rem;
    }

    .admin-logo {
        width: 80px;
    }

    .admin-page > *:not(.admin-header) {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    .admin-card {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .admin-card h2 {
        font-size: 0.95rem;
    }

    .admin-nav-link {
        font-size: 0.82rem;
        padding: 0.5rem;
    }

    .admin-sidebar {
        padding: 0.65rem 0.5rem;
    }

    .admin-table {
        min-width: 500px;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.78rem;
    }

    .admin-actions-menu {
        min-width: min(200px, calc(100vw - 16px));
    }

    .admin-actions-menu-item {
        padding: 0.6rem 0.65rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .admin-modal-dialog {
        padding: 0.85rem 0.7rem;
        border-radius: 10px;
    }

    .gallery-tab {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    .landing-enter {
        min-height: 44px;
    }

    .form-input {
        min-height: 44px;
        font-size: 1rem;
    }
}

/* ============================================
   Responsivo - Painel Admin
   ============================================ */
@media (max-width: 1024px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        top: 0;
    }

    .admin-metrics-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-header-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .admin-page > *:not(.admin-header) {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .admin-card {
        padding: 1rem;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-metrics,
    .admin-metrics-wide {
        grid-template-columns: 1fr;
    }

    .admin-metric {
        border-right: none;
    }

    .upload-path-text {
        max-width: 50vw;
    }
    .upload-path-paragraph .upload-path-cell {
        display: flex;
        width: 100%;
        margin-top: 0.25rem;
    }
    .upload-path-paragraph .upload-path-text {
        max-width: calc(100% - 3rem);
    }

    .admin-card-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table:not(.admin-table-events):not(.admin-table-removals) {
        min-width: 700px;
    }

    .admin-table-events,
    .admin-table-removals {
        min-width: 0 !important;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-logo {
        width: 110px;
    }

    .admin-title {
        font-size: 1.1rem;
    }

    .admin-subtitle {
        font-size: 0.75rem;
    }

    .admin-nav-link {
        font-size: 0.85rem;
    }
}
