@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.08);
    --nav-dark: #071b3d;
    --nav-dark-2: #0b2553;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --sidebar-width: 280px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, .h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

h2, .h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

h3, .h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h4, .h4,
h5, .h5,
h6, .h6 {
    color: var(--text-primary);
    font-weight: 600;
}

p, li, .form-text, .small, small {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
}

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

/* Bootstrap overrides */
.navbar,
.navbar-main {
    background: linear-gradient(180deg, var(--nav-dark) 0%, var(--nav-dark-2) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(7, 27, 61, 0.14);
}

.navbar-brand,
.navbar .nav-link,
.navbar .dropdown-item {
    color: #dbeafe;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active,
.navbar .dropdown-item:hover,
.navbar .dropdown-item.active {
    color: #ffffff;
}

.navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar .navbar-brand img {
    max-height: 42px;
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.8rem 1rem;
    min-height: 48px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-secondary {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--border-color);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background: #eff6ff !important;
    color: var(--primary-hover) !important;
    border-color: #bfdbfe !important;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.btn-danger,
.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #ffffff !important;
}

.btn-outline-secondary {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: #ffffff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background: var(--bg-surface-alt) !important;
    color: var(--text-primary) !important;
    border-color: #cbd5e1 !important;
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-primary);
    padding: 0.8rem 0.95rem;
    box-shadow: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.input-group-text {
    min-height: 48px;
    border-radius: 12px;
    border-color: var(--border-color);
    background: #ffffff;
    color: #94a3b8;
}

.form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    border-color: #cbd5e1;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.alert {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.1rem;
}

.alert-success {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.22);
    color: #166534;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.22);
    color: #92400e;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.22);
    color: #991b1b;
}

.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.45em 0.75em;
    letter-spacing: 0.01em;
}

.badge.bg-success {
    background: rgba(22, 163, 74, 0.12) !important;
    color: var(--success) !important;
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #b45309 !important;
}

.badge.bg-danger {
    background: rgba(220, 38, 38, 0.12) !important;
    color: var(--danger) !important;
}

.badge.bg-secondary {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

.badge.bg-primary {
    background: rgba(37, 99, 235, 0.12) !important;
    color: var(--primary) !important;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #d6dfeb;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.table {
    color: var(--text-primary);
    margin-bottom: 0;
    border-color: var(--border-color);
}

.table > :not(caption) > * > * {
    padding: 0.9rem 1rem;
    border-bottom-color: var(--border-color);
    vertical-align: middle;
}

.table thead th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr {
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #fbfdff;
    color: var(--text-primary);
}

.table-responsive {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: auto;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.table-responsive .table {
    margin-bottom: 0;
}

.table-sm > :not(caption) > * > * {
    padding: 0.55rem 0.75rem;
}

/* KPI / dashboard cards */
.stat-card {
    position: relative;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: auto -24px -24px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0));
    pointer-events: none;
}

.stat-card.primary {
    border-left: 4px solid var(--primary);
}

.stat-card.success {
    border-left: 4px solid var(--success);
}

.stat-card.warning {
    border-left: 4px solid var(--warning);
}

.stat-card.danger {
    border-left: 4px solid var(--danger);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.25rem;
}

.stat-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 0.85rem;
}

.stat-value {
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-top: 0.35rem;
}

.stat-meta {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Sidebar and main layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 88px 14px 16px;
    background: linear-gradient(180deg, var(--nav-dark) 0%, #081f45 52%, #0a2a59 100%);
    color: #dbeafe;
    border-right: 1px solid rgba(226, 232, 240, 0.08);
    box-shadow: 12px 0 40px rgba(7, 27, 61, 0.18);
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.35rem;
    color: #cbd5e1;
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-link i {
    width: 1.15rem;
    text-align: center;
    opacity: 0.95;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-link.sidebar-sub {
    padding-left: 1.3rem;
    margin-left: 0.45rem;
    margin-right: 0.45rem;
    font-size: 0.95rem;
}

.sidebar-link.sidebar-sub.active {
    padding-left: 1.3rem;
}

.sidebar-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 32px 40px 40px;
    background: var(--bg-page);
}

.main-content > .container-fluid,
.main-content > .container {
    padding-left: 0;
    padding-right: 0;
}

.main-content .page-title,
.main-content h1 {
    margin-bottom: 0.65rem;
}

.main-content .page-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Login / portal entry */
.portal-entry {
    min-height: calc(100vh - 80px);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
        linear-gradient(180deg, #fbfdff 0%, #f4f7fb 100%);
}

.portal-entry::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.02) 75%, rgba(255, 255, 255, 0.18)),
        linear-gradient(180deg, rgba(37, 99, 235, 0.03), rgba(37, 99, 235, 0.01));
    pointer-events: none;
}

.portal-panel {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 120px);
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(360px, 540px) minmax(180px, 1.1fr);
    gap: 2rem;
    align-items: center;
    padding: 1rem 1.25rem 0.75rem;
}

.portal-side {
    position: relative;
    height: calc(100vh - 220px);
    min-height: 620px;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #ffffff;
}

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

.portal-side::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 38%, rgba(15, 23, 42, 0.02));
    pointer-events: none;
}

.portal-center {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.portal-card {
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 1.75rem;
    box-shadow: var(--shadow-lg);
    padding: 2.25rem 2rem 1.75rem;
}

.portal-brand {
    max-height: 82px;
    object-fit: contain;
}

.portal-heading {
    color: #173b6d;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.portal-divider {
    width: 72px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d9bf0, var(--primary));
    margin: 0.75rem auto 1rem;
}

.portal-subtitle {
    color: var(--text-secondary);
}

.portal-form .form-control {
    border-radius: 0.95rem;
    padding: 0.8rem 0.95rem;
}

.portal-form .btn {
    border-radius: 0.95rem;
    padding: 0.78rem 1rem;
    font-weight: 600;
}

.portal-icon-input .input-group-text {
    background: #ffffff;
    border-right: 0;
    color: #7b8794;
    border-radius: 0.95rem 0 0 0.95rem;
}

.portal-icon-input .form-control {
    border-left: 0;
}

.portal-language-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    flex-wrap: wrap;
}

.portal-language-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    background: rgba(255, 255, 255, 0.82);
    color: #173b6d;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.portal-language-option:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.08);
}

.portal-language-option.active {
    background: linear-gradient(135deg, var(--primary), #1d9bf0);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.portal-language-option .flag {
    font-size: 1.15rem;
    line-height: 1;
}

.portal-feature-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.portal-feature {
    text-align: center;
    color: #173b6d;
}

.portal-feature i {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.portal-feature strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
}

.portal-feature span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

/* Login page helpers */
.portal-entry .btn-outline-primary {
    background: #ffffff;
}

.portal-entry .form-text {
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    --bs-pagination-border-color: var(--border-color);
    --bs-pagination-color: var(--text-primary);
    --bs-pagination-hover-color: var(--primary);
    --bs-pagination-hover-bg: #eff6ff;
    --bs-pagination-hover-border-color: #bfdbfe;
    --bs-pagination-active-bg: var(--primary);
    --bs-pagination-active-border-color: var(--primary);
    gap: 0.25rem;
}

.page-link {
    border-radius: 10px !important;
    box-shadow: none !important;
}

/* Utility adjustments */
.text-muted,
.text-secondary {
    color: var(--text-secondary) !important;
}

.border,
.border-top,
.border-end,
.border-bottom,
.border-start {
    border-color: var(--border-color) !important;
}

.bg-light {
    background-color: var(--bg-surface-alt) !important;
}

.container,
.container-fluid {
    max-width: 1600px;
}

.container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Responsive */
@media (max-width: 1399.98px) {
    .main-content {
        padding: 28px 28px 36px;
    }
}

@media (max-width: 1199.98px) {
    .portal-panel {
        grid-template-columns: minmax(120px, 1fr) minmax(320px, 500px) minmax(120px, 1fr);
    }

    .sidebar {
        width: 260px;
    }

    .main-content {
        margin-left: 260px;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        min-height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
        border-right: none;
        border-bottom: 1px solid rgba(226, 232, 240, 0.12);
    }

    .main-content {
        margin-left: 0;
        padding: 22px 18px 28px;
        padding-top: 22px;
    }

    .portal-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-top: 0.5rem;
    }

    .portal-side {
        display: none;
    }

    .portal-card {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .card-body {
        padding: 18px;
    }

    .stat-card {
        padding: 18px;
    }

    .portal-feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 575.98px) {
    h1, .h1 {
        font-size: 32px;
    }

    h2, .h2 {
        font-size: 24px;
    }

    .btn {
        min-height: 46px;
        padding: 0.72rem 0.95rem;
    }

    .portal-card {
        padding: 1.5rem 1rem 1.25rem;
        border-radius: 1.35rem;
    }

    .portal-language-switch {
        gap: 0.5rem;
    }
}
/* Dashboard tuning for cliente portal */
.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    padding: 3rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-sm);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.08) 0%, rgba(248, 250, 252, 0.72) 58%, rgba(248, 250, 252, 0.94) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.0) 42%, rgba(15, 23, 42, 0.02) 100%);
    pointer-events: none;
}

.dashboard-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    min-height: 260px;
}

.dashboard-hero h1 {
    margin-bottom: 0.65rem;
    color: #12325f;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dashboard-hero__subtitle {
    font-size: 1.05rem;
    color: #5b6b85;
    max-width: 42rem;
}

.dashboard-hero__meta {
    font-size: 0.95rem;
    color: #718096;
}

.dashboard-hero__badge {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    min-width: 180px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.dashboard-hero__badge-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.dashboard-kpis .dashboard-kpi-card {
    border-left: 0;
}

.dashboard-kpi-card .card-body {
    padding: 22px 24px;
}

.dashboard-kpi-card__icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.35rem;
    color: #ffffff;
    flex: 0 0 auto;
}

.dashboard-kpi-card__meta {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dashboard-kpi-card.kpi-blue .dashboard-kpi-card__icon {
    background: linear-gradient(180deg, #2f6fed 0%, #1d4ed8 100%);
}

.dashboard-kpi-card.kpi-green .dashboard-kpi-card__icon {
    background: linear-gradient(180deg, #19a55a 0%, #12824a 100%);
}

.dashboard-kpi-card.kpi-warning .dashboard-kpi-card__icon {
    background: linear-gradient(180deg, #f7b236 0%, #f59e0b 100%);
}

.dashboard-kpi-card.kpi-orange .dashboard-kpi-card__icon {
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
}

.dashboard-status-panel {
    border-radius: 20px;
}

.dashboard-status-panel .card-body {
    padding: 1.5rem 1.5rem 1.25rem;
}

.dashboard-status-panel__inner {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
}

.dashboard-status-panel__visual {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.05) 45%, rgba(255, 255, 255, 0.85) 100%);
    color: var(--success);
    font-size: 3rem;
}

.dashboard-status-panel__visual--ok {
    color: var(--success);
}

.dashboard-status-panel__content p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.dashboard-status-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.dashboard-status-metrics > div {
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.dashboard-status-metrics > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.dashboard-status-metrics span {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.dashboard-status-metrics strong {
    display: block;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.dashboard-table-wrap {
    border-top: 1px solid var(--border-color);
}

.dashboard-table {
    width: 100%;
}

.dashboard-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.dashboard-table tbody tr:hover {
    background: #f8fbff;
}

.dashboard-panel {
    border-radius: 20px;
}

.dashboard-panel__header {
    padding: 0.9rem 1.25rem;
}

.dashboard-panel__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.1rem;
}

.dashboard-subsection + .dashboard-subsection {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.dashboard-subsection__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.55rem;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dashboard-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
}

.dashboard-list__item--link {
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-list__item--link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: #cfd8e3;
    color: inherit;
}

.dashboard-list--stacked .dashboard-list__item {
    margin-bottom: 0.55rem;
}

.dashboard-page .empty-state {
    padding: 2.25rem 1rem;
    border: 1px dashed #d7e0ea;
    border-radius: 16px;
    background: #fbfdff;
}

.dashboard-page .empty-state i {
    color: var(--primary);
}

.dashboard-page .btn-outline-danger {
    background: #ffffff;
    border-color: rgba(220, 38, 38, 0.18);
}

@media (max-width: 1199.98px) {
    .dashboard-hero {
        min-height: 280px;
        padding: 2rem;
    }

    .dashboard-hero__content {
        min-height: 220px;
    }

    .dashboard-status-panel__inner {
        grid-template-columns: 1fr;
    }

    .dashboard-status-panel__visual {
        width: 92px;
        height: 92px;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        min-height: auto;
        padding: 1.35rem;
        border-radius: 20px;
    }

    .dashboard-hero__content {
        min-height: auto;
        flex-direction: column;
    }

    .dashboard-hero__badge {
        width: 100%;
    }

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

    .dashboard-status-metrics > div {
        padding-left: 0;
        border-left: 0;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
    }

    .dashboard-status-metrics > div:first-child {
        padding-top: 0;
        border-top: 0;
    }
}

/* Final dashboard polish */
.sidebar {
    background: linear-gradient(180deg, #041b4d 0%, #07275f 100%) !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-link {
    border-left: 4px solid transparent;
    border-radius: 14px;
    margin: 0.25rem 0.75rem;
    padding: 0.8rem 1rem 0.8rem 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%);
    border-left-color: #38bdf8;
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-link.sidebar-sub {
    margin-left: 0.75rem;
    padding-left: 1.6rem;
    color: rgba(219, 234, 254, 0.88);
}

.sidebar-link.sidebar-sub.active {
    padding-left: 1.6rem;
}

.sidebar-link i {
    width: 20px;
    margin-right: 0.65rem;
    font-size: 1rem;
}

.dashboard-hero {
    height: 220px;
    min-height: 220px;
    padding: 1.8rem 2rem;
}

.dashboard-hero::before {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.04) 0%, rgba(248, 250, 252, 0.45) 58%, rgba(248, 250, 252, 0.72) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 0%, rgba(15, 23, 42, 0.0) 42%, rgba(15, 23, 42, 0.01) 100%);
}

.dashboard-hero__content {
    min-height: 100%;
    align-items: center;
}

.dashboard-hero h1 {
    font-size: 2.25rem;
}

.dashboard-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dashboard-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.dashboard-mini-badge i {
    color: var(--primary);
}

.dashboard-mini-badge.is-success i {
    color: var(--success);
}

.dashboard-mini-badge.is-warning i {
    color: var(--warning);
}

.dashboard-kpi-card {
    border-radius: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.dashboard-kpi-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
}

.dashboard-kpi-card.kpi-green .dashboard-kpi-card__icon {
    background: linear-gradient(135deg, #16a34a 0%, #12824a 100%);
}

.dashboard-kpi-card.kpi-warning .dashboard-kpi-card__icon {
    background: linear-gradient(135deg, #f59e0b 0%, #f08a00 100%);
}

.dashboard-kpi-card.kpi-orange .dashboard-kpi-card__icon {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

.dashboard-kpi-card .stat-value {
    font-size: 2.2rem;
}

.dashboard-status-panel {
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dashboard-status-panel .card-body {
    padding: 1.25rem 1.5rem;
}

.dashboard-status-panel__inner {
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 1.1rem;
}

.dashboard-status-panel__visual {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    font-size: 2.25rem;
}

.dashboard-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.dashboard-status-chips .dashboard-mini-badge {
    background: #ffffff;
}

.dashboard-status-chips .dashboard-mini-badge.is-success {
    border-color: rgba(22, 163, 74, 0.18);
}

.dashboard-status-chips .dashboard-mini-badge.is-warning {
    border-color: rgba(245, 158, 11, 0.22);
}

.dashboard-table-wrap {
    max-height: 320px;
    overflow: auto;
}

.dashboard-invoice-cards {
    display: grid;
    gap: 0.85rem;
}

.dashboard-invoice-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 1.25rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-invoice-card.is-overdue {
    border-color: rgba(220, 38, 38, 0.18);
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.dashboard-invoice-card.is-due-today {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.dashboard-invoice-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.dashboard-invoice-card__doc {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-invoice-card__dates {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.9rem;
}

.dashboard-invoice-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.dashboard-invoice-card__value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-invoice-card__meta {
    font-size: 0.9rem;
    color: #64748b;
}

.dashboard-invoice-card__action {
    justify-self: end;
}

@media (max-width: 767.98px) {
    .dashboard-invoice-card {
        grid-template-columns: 1fr;
    }

    .dashboard-invoice-card__action {
        justify-self: start;
    }
}

.dashboard-panel .card-header {
    background: #ffffff;
}

@media (max-width: 1199.98px) {
    .dashboard-hero {
        height: auto;
        min-height: 190px;
    }

    .dashboard-hero__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-status-panel__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        padding: 1.2rem 1.1rem;
        min-height: 180px;
    }

    .dashboard-hero h1 {
        font-size: 1.8rem;
    }

    .dashboard-status-chips,
    .dashboard-hero__badges {
        gap: 0.4rem;
    }

    .dashboard-table-wrap {
        max-height: none;
    }
}

/* Final tuning */
.dashboard-hero__title {
    font-size: 2rem;
    line-height: 1.08;
}

.dashboard-hero__brandline {
    margin-top: 0.4rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #415a7d;
}

.dashboard-hero {
    background-position: center 18%;
}

.dashboard-hero::before {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.02) 0%, rgba(248, 250, 252, 0.28) 50%, rgba(248, 250, 252, 0.55) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.02) 0%, rgba(15, 23, 42, 0.0) 42%, rgba(15, 23, 42, 0.01) 100%);
}

.dashboard-hero__badge {
    min-width: 160px;
    padding: 0.85rem 1rem;
}

.dashboard-hero__badge strong {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.05rem;
}

.dashboard-kpi-card {
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.dashboard-kpi-card::before,
.dashboard-kpi-card::after {
    content: none !important;
}

.dashboard-kpi-card .card-body {
    padding: 1.2rem 1.25rem;
}

.dashboard-kpi-card .stat-label {
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
}

.dashboard-kpi-card .stat-value {
    font-size: 2rem;
}

.dashboard-kpi-card .dashboard-kpi-card__icon {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.dashboard-status-panel {
    border-radius: 24px;
}

.dashboard-status-panel .card-body {
    padding: 1rem 1.25rem;
}

.dashboard-status-panel__inner {
    grid-template-columns: 68px minmax(0, 1fr) auto;
    gap: 0.95rem;
}

.dashboard-status-panel__visual {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    font-size: 1.8rem;
}

.dashboard-status-panel__content h3 {
    margin-bottom: 0.35rem !important;
    font-size: 1.15rem;
}

.dashboard-status-panel__content p {
    margin-bottom: 0.35rem !important;
}

.dashboard-status-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.dashboard-status-metrics > div {
    padding-left: 0.75rem;
}

.dashboard-status-chips {
    gap: 0.4rem;
}

.dashboard-status-chips .dashboard-mini-badge {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
}

.dashboard-mini-badge {
    border-radius: 999px;
}

.dashboard-mini-badge i {
    font-size: 0.95rem;
}

.dashboard-page .btn-primary {
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.dashboard-page .btn-primary:hover {
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

@media (max-width: 991.98px) {
    .dashboard-hero__title {
        font-size: 1.75rem;
    }

    .dashboard-status-panel__inner {
        grid-template-columns: 1fr;
    }

    .dashboard-status-panel__visual {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero__title {
        font-size: 1.55rem;
    }

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

    .dashboard-status-metrics > div {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 0.6rem;
    }

    .dashboard-status-metrics > div:first-child {
        border-top: 0;
        padding-top: 0;
    }
}

/* Client portal refinements requested */
.dashboard-hero {
    height: 80px;
    min-height: 80px;
    max-height: 80px;
    padding: 0.75rem;
    background-color: #0b1f4d;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 28px rgba(7, 27, 61, 0.16);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.dashboard-hero::before {
    content: none;
}

.dashboard-hero__content {
    min-height: 100%;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1rem;
}

.dashboard-hero__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #0f172a;
}

.dashboard-hero__panel {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-height: 100%;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.dashboard-hero__title {
    margin-bottom: 0.1rem !important;
    font-size: 1.45rem;
    color: #0f172a;
    line-height: 1.1;
    text-shadow: none;
}

.dashboard-hero__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.dashboard-hero__meta,
.dashboard-hero__meta-sep {
    color: #475569;
    font-size: 0.82rem;
}

.dashboard-hero__brandline {
    color: #334155;
    font-size: 0.86rem;
    font-weight: 600;
}

.dashboard-hero__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 31, 77, 0.18) 0%, rgba(11, 31, 77, 0.10) 35%, rgba(11, 31, 77, 0.03) 58%, rgba(11, 31, 77, 0.00) 100%),
        linear-gradient(180deg, rgba(11, 31, 77, 0.04) 0%, rgba(11, 31, 77, 0.10) 100%),
        url('../img/fundo_cliente.webp');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

.dashboard-suspension-alert {
    border-radius: 20px;
    border: 1px solid rgba(220, 38, 38, 0.22);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.08);
}

.dashboard-alert-card {
    border-radius: 20px;
    border: 1px solid rgba(220, 38, 38, 0.18);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.08);
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.dashboard-alert-card__eyebrow {
    color: #991b1b;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.dashboard-alert-card__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #7f1d1d;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
}

.dashboard-alert-card__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
}

.dashboard-alert-card__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(220, 38, 38, 0.12);
    color: #7f1d1d;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.04);
}

.dashboard-alert-card__count {
    font-weight: 800;
}

.dashboard-alert-card__label {
    font-size: 0.95rem;
}

.dashboard-alert-card__action .btn-danger {
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
    white-space: nowrap;
}

.dashboard-suspension-alert__content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-suspension-alert__icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.dashboard-suspension-alert__copy {
    flex: 1 1 auto;
}

.dashboard-suspension-alert__action {
    flex: 0 0 auto;
}

.dashboard-suspension-alert .dashboard-mini-badge.is-danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(255, 255, 255, 0.88);
    color: #991b1b;
}

.dashboard-suspension-alert .btn-danger {
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

.dashboard-kpi-card {
    border-radius: 24px;
    border-left: 0;
    overflow: hidden;
}

.dashboard-kpi-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.dashboard-kpi-card .stat-label {
    color: #64748b;
}

.dashboard-kpi-card__meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.dashboard-kpi-card.kpi-blue .dashboard-kpi-card__icon {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.dashboard-kpi-card.kpi-green .dashboard-kpi-card__icon {
    background: linear-gradient(135deg, #16a34a 0%, #12824a 100%);
}

.dashboard-kpi-card.kpi-warning .dashboard-kpi-card__icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.dashboard-kpi-card.kpi-alert .dashboard-kpi-card__icon {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.dashboard-kpi-card .stat-value {
    font-size: 2.15rem;
}

.dashboard-list__item--action {
    align-items: center;
}

.dashboard-list__item--action .btn {
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    border-radius: 14px;
}

.dashboard-list__item--link {
    pointer-events: auto;
}

.dashboard-status-panel {
    border-radius: 24px;
}

.dashboard-status-panel__content h3 {
    font-size: 1.1rem;
}

.dashboard-status-panel__visual {
    width: 72px;
    height: 72px;
    font-size: 1.9rem;
}

.dashboard-status-chips {
    margin-top: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sidebar-brand {
    padding: 0.8rem 1rem 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.2rem;
}

.sidebar-brand__link {
    display: block;
}

.sidebar-brand__link img {
    display: block;
    max-width: 251px;
    width: 100%;
    height: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.35rem 1rem 0.6rem;
    margin-bottom: 0.1rem;
}

.sidebar-user__name {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.05;
    font-size: 1.08rem;
}

.sidebar-user__name-link {
    display: inline-block;
    text-decoration: none;
}

.sidebar-user__name-link:hover .sidebar-user__name {
    color: #dbeafe;
}

.sidebar-user__role {
    font-size: 0.8rem;
    color: rgba(219, 234, 254, 0.8);
}

.sidebar-user__eyebrow {
    color: rgba(219, 234, 254, 0.72);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: 0.15rem;
}

.sidebar-badge {
    margin-left: auto;
    min-width: 1.7rem;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

.sidebar-link.active .sidebar-badge,
.sidebar-link:hover .sidebar-badge {
    background: rgba(255, 255, 255, 0.22);
}

.sidebar-footer {
    margin: 1rem 0.75rem 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.5rem;
}

.sidebar-action {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem 0.95rem;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.sidebar-action i {
    font-size: 1rem;
}

.sidebar-action--admin {
    background: rgba(245, 158, 11, 0.12);
    color: #fff7ed;
}

.sidebar-action--profile {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-action--logout {
    background: rgba(220, 38, 38, 0.12);
    color: #fee2e2;
}

.sidebar-language-switch {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.sidebar-language-switch__button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(147, 197, 253, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(219, 234, 254, 0.82);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-language-switch__button:hover,
.sidebar-language-switch__button:focus-visible {
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(37, 99, 235, 0.22);
}

.sidebar-language-switch__button.is-active {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.2);
}

.sidebar-action:hover {
    transform: translateX(2px);
    color: #ffffff;
}

@media (max-width: 991.98px) {
    .dashboard-hero {
        height: auto;
        min-height: 110px;
        max-height: none;
    }

    .dashboard-hero__content {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-hero__panel {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-suspension-alert__content {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-suspension-alert__action {
        width: 100%;
    }

    .dashboard-suspension-alert__action .btn {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero__title {
        font-size: 1.25rem;
    }

    .dashboard-kpi-card .stat-value {
        font-size: 1.9rem;
    }

    .dashboard-status-panel__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .sidebar-brand__link img {
        max-width: 150px;
    }

    .sidebar-user {
        padding-bottom: 0.5rem;
    }

    .sidebar-footer {
        margin-bottom: 0.75rem;
    }
}

/* Shared portal pages: invoices and orders */
.portal-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 1rem 1.25rem;
    min-height: 92px;
    background: linear-gradient(135deg, #0a1628 0%, #13233d 100%);
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(7, 27, 61, 0.16);
}

.portal-page-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.portal-page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(219, 234, 254, 0.82);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-page-hero__title {
    margin: 0;
    color: #ffffff;
    font-size: 1.7rem;
    line-height: 1.1;
}

.portal-page-hero__meta {
    margin-top: 0.25rem;
    color: rgba(219, 234, 254, 0.82);
    font-size: 0.9rem;
}

.portal-page-hero__action .btn {
    border-radius: 16px;
    min-height: 42px;
}

.portal-page-hero--invoices {
    background:
        linear-gradient(135deg, rgba(10, 22, 40, 0.95) 0%, rgba(19, 35, 61, 0.96) 100%);
}

.portal-page-hero--orders {
    background:
        linear-gradient(135deg, rgba(10, 22, 40, 0.95) 0%, rgba(7, 39, 95, 0.96) 100%);
}

.portal-summary-card,
.portal-filters-card,
.portal-table-card {
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.portal-summary-card .card-body {
    padding: 0.85rem 1rem;
}

.portal-summary-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
}

.portal-summary-card__value {
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 700;
    color: var(--text-primary);
}

.portal-summary-card__meta {
    margin-top: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.portal-summary-card--danger .card-body {
    border-top: 3px solid rgba(220, 38, 38, 0.2);
}

.portal-summary-card--success .card-body {
    border-top: 3px solid rgba(22, 163, 74, 0.2);
}

.portal-summary-card--info .card-body {
    border-top: 3px solid rgba(37, 99, 235, 0.2);
}

.portal-summary-card--warning .card-body {
    border-top: 3px solid rgba(245, 158, 11, 0.24);
}

.portal-summary-card--primary .card-body {
    border-top: 3px solid rgba(37, 99, 235, 0.24);
}

.portal-filters-card .card-body {
    padding: 1.15rem 1.2rem;
}

.portal-table-wrap {
    border-top: 1px solid var(--border-color);
}

.portal-table {
    width: 100%;
    margin-bottom: 0;
}

.portal-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.portal-table tbody tr:hover {
    background: #f8fbff;
}

.portal-table .btn-sm {
    min-height: 40px;
    padding: 0.42rem 0.8rem;
    border-radius: 14px;
}

.portal-alert-compact {
    border-radius: 18px;
}

@media (max-width: 991.98px) {
    .portal-page-hero__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-page-hero__action {
        width: 100%;
    }

    .portal-page-hero__action .btn {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .portal-page-hero__title {
        font-size: 1.35rem;
    }

    .portal-summary-card__value {
        font-size: 1.6rem;
    }

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

/* Services page */
.portal-page-hero--services {
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.94) 0%, rgba(19, 35, 61, 0.96) 100%);
}

.portal-service-card {
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.portal-service-card .card-header {
    background: #ffffff;
    padding: 0.85rem 1rem;
}

.portal-service-card__icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    flex: 0 0 auto;
}

.portal-service-card__icon--blue {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.portal-service-card__icon--green {
    background: linear-gradient(135deg, #16a34a 0%, #12824a 100%);
}

.portal-service-card__icon--amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.portal-empty-state {
    padding: 2rem 1.25rem;
    text-align: center;
}

.portal-empty-state__icon {
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    margin-bottom: 0.85rem;
    color: #ffffff;
    font-size: 1.6rem;
}

.portal-empty-state__icon--blue {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.portal-empty-state__icon--green {
    background: linear-gradient(135deg, #16a34a 0%, #12824a 100%);
}

.portal-empty-state h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.portal-empty-state p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.portal-service-card .portal-table thead th {
    background: #f8fafc;
}

.portal-service-card .btn-sm {
    min-height: 40px;
    padding: 0.42rem 0.8rem;
    border-radius: 14px;
}

.portal-service-row__primary {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.portal-service-row__title {
    line-height: 1.2;
    color: var(--primary);
    word-break: break-word;
}

.portal-service-row__badge {
    width: fit-content;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}

.portal-service-row__meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.portal-service-row__date {
    font-weight: 600;
    color: var(--text-primary);
}

.portal-service-row__renewal {
    width: fit-content;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

.portal-service-row__renewal.is-success {
    background: rgba(22, 163, 74, 0.12);
    color: var(--text-primary);
}

.portal-service-row__renewal.is-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.portal-service-row__renewal.is-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.portal-service-row__renewal.is-muted {
    background: #e2e8f0;
    color: #475569;
}

.portal-renewal-cell.is-success {
    color: var(--text-primary);
}

.portal-renewal-cell.is-warning {
    color: #b45309;
}

.portal-renewal-cell.is-danger {
    color: var(--danger);
}

@media (max-width: 991.98px) {
    .portal-service-card .portal-table thead {
        display: none;
    }

    .portal-service-card .portal-table,
    .portal-service-card .portal-table tbody,
    .portal-service-card .portal-table tr,
    .portal-service-card .portal-table td {
        display: block;
        width: 100%;
    }

    .portal-service-card .portal-table tr {
        padding: 1rem 1rem 1.05rem;
        margin: 0.7rem 0.9rem;
        border: 1px solid var(--border-color);
        border-radius: 18px;
        box-shadow: var(--shadow-sm);
        background: #ffffff;
    }

    .portal-service-card .portal-table td {
        border: 0;
        padding: 0;
    }

    .portal-service-card .portal-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.35rem;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .portal-service-card .portal-table td[data-status]::after {
        content: attr(data-status);
        display: inline-flex;
        width: fit-content;
        margin-top: 0.35rem;
        padding: 0.28rem 0.58rem;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.01em;
    }

    .portal-service-card .portal-table td[data-status="Active"]::after {
        background: rgba(22, 163, 74, 0.12);
        color: var(--success);
    }

    .portal-service-card .portal-table td[data-status="Suspended"]::after {
        background: rgba(220, 38, 38, 0.12);
        color: var(--danger);
    }

    .portal-service-card .portal-table td[data-status="Pending"]::after {
        background: #e2e8f0;
        color: #475569;
    }

    .portal-service-card .portal-table td[data-label="Estado"] {
        display: none;
    }

    .portal-service-card .portal-table td[data-label="Domínio"]::before,
    .portal-service-card .portal-table td[data-label="Serviço"]::before {
        margin-bottom: 0.45rem;
    }

    .portal-service-card .portal-table td[data-label="Domínio"] .portal-service-row__title,
    .portal-service-card .portal-table td[data-label="Serviço"] .portal-service-row__title {
        font-size: 1rem;
    }

    .portal-service-card .portal-table td[data-label="Domínio"] .portal-service-row__badge,
    .portal-service-card .portal-table td[data-label="Serviço"] .portal-service-row__badge {
        margin-top: 0.1rem;
    }

    #dominios .portal-table tr,
    #alojamentos .portal-table tr {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        border-bottom: 1px solid var(--border-color);
    }

    #dominios .portal-table td[data-label="Expira"] {
        order: 2;
    }

    #dominios .portal-table td[data-label="Domínio"] {
        order: 1;
    }

    #alojamentos .portal-table td[data-label="Serviço"] {
        order: 1;
    }

    #alojamentos .portal-table td[data-label="Valor"] {
        order: 2;
    }

    #alojamentos .portal-table td[data-label="Renovação"] {
        order: 3;
    }

    #alojamentos .portal-table td[data-label="Servidor"] {
        order: 4;
    }

    #alojamentos .portal-table td[data-label="Servidor"]::before {
        display: none;
    }

    #dominios .portal-table td[data-label="Estado"],
    #alojamentos .portal-table td[data-label="Estado"] {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .portal-page-hero__action {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Final simplified portal layout */
.sidebar {
    width: 320px;
}

.main-content {
    margin-left: 320px;
}

.sidebar-brand {
    padding: 0.9rem 1rem 0.2rem;
    margin-bottom: 0.15rem;
}

.sidebar-user {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 1.15rem 1.15rem 1rem;
    margin: 0.7rem 0.75rem 1.15rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(7, 27, 61, 0.72), rgba(5, 19, 44, 0.88));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-user__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
}

.sidebar-user__avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    background: linear-gradient(135deg, #1d4ed8 0%, #38bdf8 100%);
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sidebar-user__eyebrow {
    display: none;
}

.sidebar-user__name {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.18;
    font-size: 1.12rem;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-user__role {
    font-size: 0.8rem;
    color: rgba(219, 234, 254, 0.8);
}

.sidebar-user__since {
    color: rgba(219, 234, 254, 0.72);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.1;
}

.dashboard-hero {
    position: relative;
    min-height: 260px;
    height: 260px;
    max-height: 260px;
    padding: 0;
    background-color: #0b1f4d;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 22px;
    box-shadow: none;
    overflow: hidden;
}

.dashboard-hero::before,
.dashboard-hero::after {
    content: none !important;
    display: none !important;
}

.dashboard-hero__content,
.dashboard-hero__panel,
.dashboard-hero__copy,
.dashboard-hero__chips,
.dashboard-hero__meta-row,
.dashboard-hero__brandline,
.dashboard-hero__title,
.dashboard-hero__badge {
    display: none !important;
}

@media (max-width: 991.98px) {
    .dashboard-hero {
        min-height: 220px;
        height: 220px;
        max-height: 220px;
    }

    .sidebar-user {
        padding: 1rem 1rem 0.95rem;
        margin: 0.55rem 0.55rem 0.95rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        min-height: 180px;
        height: 180px;
        max-height: 180px;
        border-radius: 18px;
    }

    .sidebar-brand__link img {
        max-width: 150px;
    }
}

.dashboard-status-panel .card-body {
    padding: 1rem 1.25rem 0.75rem;
}

.dashboard-status-panel__inner {
    grid-template-columns: 1fr;
    gap: 0.35rem;
}

.dashboard-status-panel__content {
    min-width: 0;
}

.dashboard-status-panel__content h3 {
    margin-bottom: 0 !important;
    font-size: 1.4rem;
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.dashboard-status-panel__content p {
    margin-bottom: 0.25rem !important;
}

.dashboard-invoice-cards {
    margin-top: 0.5rem;
}

.dashboard-status-panel--compact .card-body {
    padding-bottom: 0.5rem;
}

.dashboard-status-panel--compact .dashboard-invoice-cards {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0 1rem 1rem;
}

.dashboard-status-panel--compact .dashboard-invoice-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem 0.95rem;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
}

.dashboard-status-panel--compact .dashboard-invoice-card__main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.dashboard-status-panel--compact .dashboard-invoice-card__side {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    justify-self: end;
    flex-wrap: nowrap;
}

.dashboard-status-panel--compact .dashboard-invoice-card__value {
    font-size: 1rem;
    white-space: nowrap;
}

.dashboard-status-panel--compact .dashboard-invoice-card .btn {
    white-space: nowrap;
}

.dashboard-status-panel--compact .dashboard-invoice-card .badge {
    width: fit-content;
}

@media (max-width: 767.98px) {
    .dashboard-status-panel--compact .dashboard-invoice-cards {
        padding-inline: 0.75rem;
        gap: 0.5rem;
    }

    .dashboard-status-panel--compact .dashboard-invoice-card {
        grid-template-columns: 1fr;
    }

    .dashboard-status-panel--compact .dashboard-invoice-card__side {
        justify-self: start;
        width: 100%;
        justify-content: space-between;
    }
}
