/* ============================================
   HEADER ADMIN - AJUSTE DE ALTURA E ALINHAMENTO
   ============================================ */

#adminContent .header {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    height: 70px;
    display: flex;
    align-items: center;
}

#adminContent .header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#adminContent .logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

#adminContent .logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

#adminContent .site-title {
    font-size: 1.2rem;
    font-family: var(--font-title);
    margin: 0;
    color: #fff;
}

/* ============================================
   CONTROLES SUPERIORES (MASTER/LOGOUT)
   ============================================ */

.a11y-controls-admin {
    display: flex;
    align-items: center;
    gap: 15px;
}

#userBadge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-logout:hover {
    background: #dc3545;
    border-color: #dc3545;
}

/* ============================================
   LAYOUT DO PAINEL
   ============================================ */

.admin-sections-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 30px auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--bg-alt);
    padding-bottom: 0.8rem;
}

.admin-title {
    font-family: var(--font-title);
    color: var(--primary-color);
    font-size: 1.25rem;
    margin: 0;
}

/* ============================================
   FORMULÁRIOS E COMPONENTES
   ============================================ */

.form-grid {
    display: grid;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-control {
    padding: 0.7rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: var(--font-body);
    transition: var(--transition);
    font-size: 0.9rem;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-add {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    width: 100%;
    margin: 0 auto;
}

.btn-add:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ============================================
   LOGIN OVERLAY
   ============================================ */

#loginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    color: #333;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.login-box h2 {
    color: var(--primary-color);
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.5rem;
}

.login-box p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.login-box .form-control {
    max-width: 300px;
    text-align: center;
}

.login-box .btn-add {
    max-width: 300px;
}

.login-box hr {
    width: 100%;
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #eee;
}

.login-box a {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

/* ============================================
   ESTILOS DE SEGURANÇA E ACESSIBILIDADE
   ============================================ */

#securitySection {
    margin-top: 2rem;
    background: #fff9c4;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #fbc02d;
}

/* Responsividade Admin */
@media (max-width: 768px) {
    #adminContent .site-title { display: none; }
    .admin-sections-card { padding: 1.2rem; margin: 15px; }
}

/* ============================================
   AJUSTES ADICIONAIS
   ============================================ */

.item-row {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background: #4A90E2;
    color: white;
    padding: 6px;
    border-radius: 4px;
    display: flex;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    padding: 6px;
    border-radius: 4px;
    display: flex;
}

.preview-img {
    max-width: 80px;
    max-height: 80px;
    margin-top: 10px;
    display: none;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.item-icon-lucide {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.admin-quick-nav {
    position: sticky;
    top: 70px;
    z-index: 900;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-quick-nav {
    display: flex;
    gap: 10px;
    padding: 10px 20px;
    overflow-x: auto;
}

.admin-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.8rem;
    white-space: nowrap;
}

.admin-quick-link:hover {
    background: rgba(0, 80, 157, 0.08);
    border-color: rgba(0, 80, 157, 0.18);
}

.admin-section {
    scroll-margin-top: 120px;
}

.edit-banner {
    position: sticky;
    top: 120px;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 153, 0, 0.12);
    margin-bottom: 16px;
}

.edit-banner__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.edit-pill {
    background: var(--accent-color);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.edit-banner__text {
    color: var(--primary-color);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-banner__btn {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    font-weight: 900;
}

.edit-banner__btn:hover {
    background: rgba(255, 255, 255, 1);
}

.toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}

.toast {
    background: rgba(0, 51, 102, 0.95);
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    max-width: 340px;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast--success {
    background: rgba(0, 123, 69, 0.95);
}

.toast--error {
    background: rgba(220, 53, 69, 0.95);
}

.toast--hide {
    opacity: 0;
    transform: translateY(6px);
}
