﻿/* ===== BASE ===== */

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f4f6;
    color: #111827;
}

/* Layout para app autenticado */
.layout-app {
    background-color: #e5e7eb;
}

/* Layout para tela de login */
.layout-auth {
    background: radial-gradient(circle at top, #e0f2fe 0, #eff6ff 40%, #f9fafb 100%);
}

/* ===== AUTH (LOGIN LEGADO) ===== */
/*
   Estas classes ficam apenas para telas antigas.
   O novo Login.cshtml usa classes .login-* e controla o próprio layout.
*/

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: none;
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

    .auth-brand .logo {
        width: 36px;
        height: 36px;
        border-radius: 1rem;
        background: linear-gradient(135deg, #2563eb, #22c55e);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: #ffffff;
        font-size: 1rem;
    }

    .auth-brand .name {
        font-weight: 600;
        font-size: 1rem;
    }

    .auth-brand .subtitle {
        font-size: .8rem;
        color: #6b7280;
    }

.auth-footer {
    text-align: center;
}
/* ===== LAYOUT APP (AUTENTICADO) ===== */

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-bottom: 1px solid #e5e7eb;
}

    .sidebar-brand .logo {
        width: 32px;
        height: 32px;
        border-radius: .9rem;
        background: linear-gradient(135deg, #2563eb, #22c55e);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: #ffffff;
        font-size: .95rem;
    }

.sidebar-brand-title {
    display: flex;
    flex-direction: column;
}

    .sidebar-brand-title .name {
        font-size: .95rem;
        font-weight: 600;
        color: #111827;
    }

    .sidebar-brand-title .subtitle {
        font-size: .75rem;
        color: #9ca3af;
    }

/* MENU */

.sidebar-menu {
    flex: 1;
    padding: .75rem .75rem 1rem;
}

.sidebar-section-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #9ca3af;
    padding: .35rem .5rem;
    margin-top: .25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: .65rem;
    text-decoration: none;
    color: #4b5563;
    font-size: .88rem;
    margin-bottom: .15rem;
    transition: background-color .15s ease, color .15s ease, transform .08s ease;
}

    .sidebar-menu a i {
        width: 1.2rem;
        text-align: center;
        font-size: 1rem;
    }

    .sidebar-menu a:hover {
        background: #e5f0ff;
        color: #1d4ed8;
        transform: translateX(1px);
    }

    .sidebar-menu a.active {
        background: #2563eb;
        color: #ffffff;
    }

.sidebar-footer {
    padding: .75rem 1.25rem 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: .75rem;
    color: #6b7280;
}

/* MAIN / TOPBAR */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
}

.topbar {
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem 0 1.15rem;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.topbar .page-title {
    font-weight: 600;
    font-size: .95rem;
    color: #111827;
}

.topbar .page-subtitle {
    font-size: .78rem;
    color: #6b7280;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* USER CHIP */

.topbar-user {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .6rem;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: .8rem;
    color: #374151;
}

.topbar-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #22c55e);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 700;
    color: #ffffff;
}

.topbar-user-name {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CONTENT */

.content {
    padding: 1.3rem 1.5rem 1.8rem;
}

/* CARDS */

.card,
.card-dashboard {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.card-header {
    background-color: #ffffff;
    border-bottom-color: #e5e7eb;
    font-size: .9rem;
    font-weight: 500;
    color: #111827;
}

.card-dashboard .title {
    font-size: .8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .25rem;
}

.card-dashboard .value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #111827;
}

/* TABLES */

.table {
    font-size: .84rem;
    color: #111827;
}

    .table thead th {
        font-size: .75rem;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: #6b7280;
        border-bottom-color: #e5e7eb;
    }

    .table td {
        border-top-color: #e5e7eb;
    }

.text-monospace {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ALERTAS */

.alert {
    border-radius: .75rem;
    font-size: .82rem;
}

/* RESPONSIVO */

@media (max-width: 992px) {
    .sidebar {
        display: none;
    }

    .wrapper {
        flex-direction: column;
    }

    .content {
        padding: 1rem;
    }
}


/* ===== EXTRAS (LAYOUT REFATORADO) ===== */
.offcanvas .sidebar-menu a {
    margin-bottom: .1rem;
}

.offcanvas .sidebar-section-title {
    margin-top: .5rem;
}

@media (max-width: 992px) {
    /* não esconder o wrapper inteiro, apenas reduz padding do conteúdo */
    .content {
        padding: 1rem;
    }
}
