@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --asc-primary: #0D1B2A;
    --asc-secondary: #0077B6;
    --asc-accent: #00B4D8;
    --asc-cyan: #48CAE4;
    --asc-bg: #F0F4F8;
    --asc-sidebar-width: 260px;
    --asc-header-height: 64px;
    --asc-radius: 12px;
    --asc-shadow: 0 1px 3px rgba(13, 27, 42, 0.06), 0 4px 12px rgba(13, 27, 42, 0.04);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--asc-bg);
    color: #1e293b;
    margin: 0;
}

/* ===== AUTH ===== */
.asc-auth-body { min-height: 100vh; }

.asc-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.asc-auth-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0B111D 0%, #0D1B2A 40%, #1B2838 100%);
    z-index: 0;
}

.asc-auth-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 180, 216, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 119, 182, 0.06) 0%, transparent 40%);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300B4D8' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Login — split desktop / overlay mobile */
.asc-auth-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
    overflow: hidden;
}

.asc-auth-login-visual {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background: #0b111d;
    overflow: hidden;
}

.asc-auth-login-visual .asc-auth-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.asc-auth-login-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 70%, rgba(11, 17, 29, 0.15) 100%);
    pointer-events: none;
}

.asc-auth-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 100%);
    box-shadow: -12px 0 40px rgba(13, 27, 42, 0.08);
}

.asc-auth-login-panel .asc-auth-card-glass {
    width: 100%;
    max-width: 400px;
}

/* Mobile — form centralizado sobre a imagem */
@media (max-width: 991.98px) {
    .asc-auth-login-page {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 1.25rem;
        grid-template-columns: 1fr;
    }

    .asc-auth-login-visual {
        position: absolute;
        inset: 0;
        min-height: auto;
    }

    .asc-auth-login-visual .asc-auth-bg-image {
        object-position: center 42%;
    }

    .asc-auth-login-visual::after {
        background:
            linear-gradient(135deg, rgba(11, 17, 29, 0.35) 0%, rgba(13, 27, 42, 0.2) 50%, rgba(0, 119, 182, 0.15) 100%),
            radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.25) 100%);
    }

    .asc-auth-login-panel {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 420px;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }
}

/* Card glass claro — contraste e legibilidade */
.asc-auth-login-page .asc-auth-card-glass {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.22),
        0 8px 24px rgba(13, 27, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: #1e293b;
}

.asc-auth-login-page .asc-auth-card-glass h3 {
    color: var(--asc-primary);
    font-weight: 700;
}

.asc-auth-login-page .asc-auth-card-glass .text-muted {
    color: #64748b !important;
}

.asc-auth-login-page .asc-auth-card-glass .form-label {
    color: #334155;
    font-weight: 600;
    font-size: 0.875rem;
}

.asc-auth-login-page .asc-auth-card-glass .form-control {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

.asc-auth-login-page .asc-auth-card-glass .form-control::placeholder {
    color: #94a3b8;
}

.asc-auth-login-page .asc-auth-card-glass .form-control:focus {
    background: #fff;
    border-color: var(--asc-accent);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.25);
    color: #0f172a;
}

.asc-auth-login-page .asc-auth-card-glass .form-check-label {
    color: #475569;
}

.asc-auth-login-page .asc-auth-card-glass .form-check-input {
    background-color: #fff;
    border-color: #94a3b8;
}

.asc-auth-login-page .asc-auth-card-glass .form-check-input:checked {
    background-color: var(--asc-secondary);
    border-color: var(--asc-secondary);
}

.asc-auth-login-page .asc-auth-card-glass code {
    color: var(--asc-secondary);
    background: #e2e8f0;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.85em;
}

.asc-auth-login-page .asc-auth-card-glass .asc-link {
    color: var(--asc-secondary);
    font-weight: 500;
}

.asc-auth-login-page .asc-auth-card-glass .asc-link:hover {
    color: #005f92;
}

.asc-auth-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 4rem;
    max-width: 960px;
    width: 100%;
    padding: 2rem;
    align-items: center;
}

.asc-auth-container-sm { grid-template-columns: 1fr; max-width: 440px; }

.asc-auth-brand { color: #fff; }

.asc-auth-tagline {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.asc-auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.asc-logo-icon-lg {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--asc-secondary), var(--asc-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
}

.asc-auth-headline {
    color: var(--asc-accent);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.asc-auth-desc { opacity: 0.85; line-height: 1.6; margin-bottom: 0.5rem; }
.asc-auth-desc-sm { opacity: 0.5; font-size: 0.875rem; }

.asc-auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.asc-link { color: var(--asc-secondary); text-decoration: none; }
.asc-link:hover { color: var(--asc-accent); }

.asc-btn-gradient {
    background: linear-gradient(135deg, var(--asc-secondary), var(--asc-accent)) !important;
    border: none !important;
    font-weight: 600;
}

.asc-btn-gradient:hover {
    background: linear-gradient(135deg, #005f92, #0096c7) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

/* ===== APP LAYOUT ===== */
.asc-app { display: flex; min-height: 100vh; }

.asc-sidebar {
    width: var(--asc-sidebar-width);
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.3s;
}

.asc-sidebar-brand { padding: 1.25rem; border-bottom: 1px solid #f1f5f9; }

.asc-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--asc-primary);
}

.asc-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--asc-secondary), var(--asc-accent));
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.asc-grupo-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 10px;
}

.asc-grupo-logo, .asc-grupo-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.asc-grupo-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.asc-grupo-info small { display: block; font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.asc-grupo-info strong { font-size: 13px; color: var(--asc-primary); }

.asc-sidebar-nav { flex: 1; padding: 0.75rem; overflow-y: auto; }

.asc-nav-section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 0.85rem 0.75rem 0.35rem;
    margin-top: 0.25rem;
}

.asc-nav-section:first-child {
    margin-top: 0;
    padding-top: 0.25rem;
}

.asc-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 2px;
}

.asc-nav-item:hover { background: #f1f5f9; color: var(--asc-primary); }
.asc-nav-item.active {
    background: linear-gradient(135deg, var(--asc-secondary), var(--asc-accent));
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.25);
}

.asc-nav-item i { font-size: 1.1rem; width: 20px; text-align: center; }
.asc-sidebar-divider { margin: 0.5rem 1rem; border-color: #f1f5f9; }
.asc-sidebar-footer { padding: 0.75rem; border-top: 1px solid #f1f5f9; }

.asc-main {
    flex: 1;
    margin-left: var(--asc-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.asc-header {
    height: var(--asc-header-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.asc-header-left, .asc-header-right { display: flex; align-items: center; gap: 0.75rem; }
.asc-page-title { font-size: 1.1rem; font-weight: 600; margin: 0; color: var(--asc-primary); }

.asc-search {
    position: relative;
    display: flex;
    align-items: center;
}

.asc-search i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    z-index: 1;
}

.asc-search input {
    padding-left: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.875rem;
    min-width: 280px;
}

.asc-search input:focus { background: #fff; border-color: var(--asc-accent); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1); }

.asc-notify-btn { color: #64748b; text-decoration: none; }
.asc-notify-btn.dropdown-toggle::after { display: none; }
.asc-notify-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}
.asc-notify-count {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 999px;
    border: 2px solid #fff;
}
.asc-notify-menu {
    width: min(360px, 92vw);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.asc-notify-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}
.asc-notify-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    color: #64748b;
    font-size: 0.875rem;
}
.asc-notify-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.asc-notify-item:hover { background: #f8fafc; color: inherit; }
.asc-notify-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.asc-notify-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.asc-notify-item-body strong {
    font-size: 0.875rem;
    color: #0f172a;
}
.asc-notify-item-body small {
    color: #64748b;
    line-height: 1.35;
}
.asc-notify-menu-footer {
    padding: 0.65rem 1rem;
    text-align: center;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
}

.asc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--asc-secondary), var(--asc-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
}

.asc-avatar img { width: 100%; height: 100%; object-fit: cover; }

.asc-content { padding: 1.5rem; flex: 1; }

/* ===== DASHBOARD ===== */
.asc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.asc-title { font-size: 1.5rem; font-weight: 700; color: var(--asc-primary); margin: 0; }
.asc-subtitle { color: #64748b; margin: 0; font-size: 0.875rem; }

.asc-period-toggle .btn { font-size: 0.8rem; padding: 0.35rem 0.85rem; }

.asc-intel-tabs .btn.active {
    background: var(--asc-secondary, #00B4D8);
    border-color: var(--asc-secondary, #00B4D8);
    color: #fff;
}

.asc-intel-nav .form-select { min-width: 5rem; }

.asc-kpi-card {
    background: #fff;
    border-radius: var(--asc-radius);
    padding: 1.25rem;
    box-shadow: var(--asc-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.15s;
}

.asc-kpi-card:hover { transform: translateY(-2px); }

.asc-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.asc-kpi-label { display: block; font-size: 0.8rem; color: #64748b; }
.asc-kpi-value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--asc-primary); line-height: 1.2; }
.asc-kpi-change { font-size: 0.75rem; font-weight: 600; }

.asc-card {
    background: #fff;
    border-radius: var(--asc-radius);
    box-shadow: var(--asc-shadow);
    overflow: hidden;
}

.asc-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.asc-card-header h5 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--asc-primary); }
.asc-card-body { padding: 1.25rem; }
.asc-card-footer { padding: 0.75rem 1.25rem; border-top: 1px solid #f1f5f9; background: #fafbfc; }

.asc-alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.asc-alert-item:last-child { border-bottom: none; }

.asc-alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== TABLES ===== */
.asc-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    background: #fafbfc;
}

.asc-table tbody td { padding: 0.85rem 1.25rem; vertical-align: middle; font-size: 0.875rem; }

.asc-table-thumb, .asc-table-thumb-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

/* ===== PLACEHOLDER ===== */
.asc-placeholder-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #94a3b8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .asc-sidebar { transform: translateX(-100%); }
    .asc-sidebar.open { transform: translateX(0); }
    .asc-main { margin-left: 0; }
    .asc-auth-container { grid-template-columns: 1fr; max-width: 440px; }
    .asc-auth-brand { display: none; }
}

@media (max-width: 576px) {
    .asc-search input { min-width: 160px; }
    .asc-kpi-value { font-size: 1.35rem; }
}
