/* Painel administrativo InfoSistema */
:root {
    --admin-sidebar: #0f2744;
    --admin-sidebar-hover: #1a365d;
    --admin-accent: #0ea5e9;
    --admin-brand-info: #0f2744;
    --admin-brand-sistema: #0ea5e9;
    --admin-brand-sistema-light: #7ec8e3;
}

.admin-body {
    margin: 0;
    background: #f1f5f9;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Marca InfoSistema */
.admin-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.admin-brand__logo {
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.22));
}

.admin-brand__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.admin-brand__nome {
    font-weight: 900;
    font-style: italic;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.admin-brand__info {
    color: var(--admin-brand-info);
}

.admin-brand__sistema {
    color: var(--admin-brand-sistema);
}

.admin-brand__titulo {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    background: #f8fafc;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.admin-brand--login {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-brand--sidebar {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.7rem;
    width: 100%;
}

.admin-brand--sidebar .admin-brand__text {
    align-items: flex-start;
    margin-top: 0;
    gap: 0.2rem;
    min-width: 0;
}

.admin-brand--sidebar .admin-brand__nome {
    font-size: 0.95rem;
}

.admin-brand--sidebar .admin-brand__info {
    color: #fff;
}

.admin-brand--sidebar .admin-brand__sistema {
    color: var(--admin-brand-sistema-light);
}

.admin-brand--sidebar .admin-brand__titulo {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.55rem;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-wrap {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.admin-sidebar__brand {
    padding: 1.15rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar__brand-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.admin-sidebar__brand-link:hover {
    background: var(--admin-sidebar-hover);
    color: inherit;
}

.admin-sidebar__nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.25rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.admin-sidebar__link:hover {
    background: var(--admin-sidebar-hover);
    color: #fff;
}

.admin-sidebar__link.active {
    background: var(--admin-accent);
    color: #fff;
    font-weight: 600;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.admin-topbar__heading {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.admin-topbar__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #0f2744;
}

.admin-topbar__sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.admin-topbar__sub::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--admin-accent);
    margin-right: 0.35rem;
    vertical-align: middle;
}

/* Avatar e perfil */
.admin-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--admin-accent), #6366f1);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(15, 39, 68, 0.15);
}

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

.admin-avatar--sm {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
}

.admin-avatar--md {
    width: 44px;
    height: 44px;
    font-size: 0.82rem;
}

.admin-avatar--xl {
    width: 88px;
    height: 88px;
    font-size: 1.35rem;
    border-width: 3px;
}

.admin-profile {
    position: relative;
}

.admin-profile__toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.55rem 0.35rem 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #0f2744;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-profile__toggle:hover,
.admin-profile__toggle.show {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 39, 68, 0.08);
}

.admin-profile__toggle::after {
    margin-left: 0.15rem;
}

.admin-profile__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    text-align: left;
}

.admin-profile__name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f2744;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-profile__role {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-profile__menu {
    min-width: 260px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.35rem;
    margin-top: 0.5rem !important;
}

.admin-profile__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem 0.5rem;
}

.admin-profile__header-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.admin-profile__header-text strong {
    font-size: 0.9rem;
    color: #0f2744;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-profile__header-text span {
    font-size: 0.75rem;
    color: #64748b;
}

.admin-profile__menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-profile__menu .dropdown-item i {
    font-size: 1rem;
    opacity: 0.85;
}

.admin-profile__menu .dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #dc2626 !important;
}

.admin-perfil-preview {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.admin-perfil-preview__nome {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f2744;
}

/* Modais de mensagem */
.admin-alert-modal .modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 39, 68, 0.18);
    overflow: hidden;
}

.admin-alert-modal__content--success .modal-header {
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.admin-alert-modal__content--danger .modal-header {
    background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}

.admin-alert-modal__content--warning .modal-header {
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.admin-alert-modal__content--info .modal-header {
    background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.admin-alert-modal .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f2744;
    display: flex;
    align-items: center;
}

.admin-alert-modal .modal-body {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.55;
    padding-top: 0.75rem;
}

.admin-content {
    padding: 1.5rem;
    flex: 1;
}

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

.admin-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f2744;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    background-color: #0f2744;
    background-image:
        linear-gradient(145deg, rgba(15, 39, 68, 0.88) 0%, rgba(26, 54, 93, 0.82) 45%, rgba(14, 165, 233, 0.25) 100%),
        url('../img-site/admin-login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.admin-login::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(14, 165, 233, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 15%, rgba(126, 200, 227, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.admin-login__card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2.25rem 2rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.admin-login__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--admin-brand-info), var(--admin-accent), var(--admin-brand-sistema-light));
}

.admin-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.admin-stat__valor {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--admin-accent);
    word-break: break-word;
    line-height: 1.2;
}

.admin-stat__label {
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 767.98px) {
    .admin-wrap { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-sidebar__brand { padding: 1rem; }
    .admin-brand--sidebar .admin-brand__titulo { white-space: normal; }
    .admin-sidebar__nav { display: flex; flex-wrap: wrap; padding: 0.5rem; max-height: none; }
    .admin-sidebar__link { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
    .admin-topbar__sub { font-size: 0.7rem; }
    .admin-profile__info { display: none; }
    .admin-profile__toggle { padding: 0.25rem; border-radius: 50%; }
    .admin-profile__toggle::after { display: none; }
}
