﻿:root {
    --brand-950: #0d1e31;
    --brand-900: #122940;
    --brand-850: #173450;
    --brand-800: #1f4362;
    --brand-700: #2a5c7d;
    --accent-600: #1f8c7f;
    --accent-700: #197569;
    --bg: #f2f5f9;
    --surface: #ffffff;
    --surface-alt: #f7f9fc;
    --border: #d8e1ea;
    --text: #1c2c3a;
    --muted: #607287;
    --success: #1c875c;
    --warning: #a87a18;
    --danger: #b14444;
    --lucros-sticky-top: 72px;
    --shadow-soft: 0 10px 30px rgba(18, 41, 64, 0.08);
    --shadow-card: 0 4px 18px rgba(18, 41, 64, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 108px;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

.portal-content section[id] {
    scroll-margin-top: 108px;
}

@keyframes fade-up-soft {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--brand-900);
    letter-spacing: -0.01em;
    margin-bottom: 0;
}

p {
    color: inherit;
}

a {
    color: var(--brand-700);
}

.text-muted {
    color: var(--muted) !important;
}

.portal-shell {
    min-height: 100vh;
}

.portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    width: 286px;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--brand-900) 0%, #10283f 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: width 0.25s ease;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 26, 41, 0.45);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.sidebar-brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.15rem 1.15rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--surface);
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--accent-600), #2f9e93);
}

.brand-title {
    font-size: 0.95rem;
    color: #eef4fb;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 0.74rem;
    color: rgba(238, 244, 251, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-close {
    color: rgba(255, 255, 255, 0.75);
    margin-left: auto;
    font-size: 1rem;
}

.sidebar-section {
    padding: 1rem 0.85rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(16, 40, 63, 0.35), rgba(16, 40, 63, 0.92));
    position: sticky;
    bottom: 0;
}

.sidebar-settings-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-decoration: none;
    color: #f2f8ff;
    background: linear-gradient(135deg, rgba(31, 140, 127, 0.38), rgba(31, 140, 127, 0.17));
    border: 1px solid rgba(96, 225, 207, 0.42);
    border-radius: 12px;
    padding: 0.62rem 0.72rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.sidebar-settings-link:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(10, 25, 40, 0.3);
}

.sidebar-settings-link.active {
    background: linear-gradient(135deg, rgba(31, 140, 127, 0.52), rgba(31, 140, 127, 0.2));
}

.sidebar-version {
    margin-top: 0.55rem;
    color: rgba(232, 240, 249, 0.72);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-align: center;
}

.sidebar-section-title {
    margin: 0 0 0.65rem;
    padding: 0 0.65rem;
    color: rgba(230, 239, 248, 0.72);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.module-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0.5rem 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #eaf2fb;
    font-size: 0.82rem;
    font-weight: 700;
}

.sidebar-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.58rem 0.72rem;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(228, 238, 248, 0.85);
    transition: all 0.2s ease;
    font-size: 0.88rem;
    font-weight: 600;
}

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

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(31, 140, 127, 0.26), rgba(31, 140, 127, 0.12));
    color: #fff;
    border: 1px solid rgba(96, 225, 207, 0.32);
}

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

.sidebar-section-future {
    border-top: 1px dashed rgba(255, 255, 255, 0.16);
    margin-top: 0.6rem;
}

.future-module-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.future-module-list li {
    display: grid;
    grid-template-columns: 16px 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 0.45rem 0.58rem;
    border-radius: 10px;
    color: rgba(228, 238, 248, 0.85);
    font-size: 0.78rem;
}

.badge-soft {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.66rem;
    padding: 0.2rem 0.48rem;
    font-weight: 700;
}

.portal-main {
    margin-left: 286px;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(242, 245, 249, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.4rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-topbar {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--brand-850);
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.topbar-kicker {
    margin: 0;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--muted);
    font-weight: 700;
}

.topbar-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.module-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--brand-850);
    background: rgba(31, 140, 127, 0.12);
    font-weight: 700;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.58rem;
    padding: 0.34rem 0.52rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.user-avatar {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand-850);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.user-name {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.1;
    font-weight: 700;
}

.user-role {
    margin: 0;
    font-size: 0.68rem;
    color: var(--muted);
    line-height: 1.1;
}

.portal-content {
    position: relative;
    padding: 1.25rem 1.4rem 1.75rem;
}

.portal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 0%, rgba(31, 140, 127, 0.08) 0, transparent 36%),
        radial-gradient(circle at 88% 14%, rgba(42, 92, 125, 0.08) 0, transparent 30%);
}

.portal-content > * {
    animation: fade-up-soft 0.34s ease both;
}

.flash-stack {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.alert {
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.alert-info {
    border-color: rgba(42, 92, 125, 0.24);
    background: #eef4fa;
    color: var(--brand-850);
}

.alert-success {
    border-color: rgba(28, 135, 92, 0.26);
    background: #eaf8f1;
    color: #146a45;
}

.alert-warning {
    border-color: rgba(168, 122, 24, 0.34);
    background: #fff8ea;
    color: #876215;
}

.alert-danger {
    border-color: rgba(177, 68, 68, 0.32);
    background: #fdeeee;
    color: #912f2f;
}

.card {
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    background: var(--surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 24px rgba(18, 41, 64, 0.08);
}

.module-card .card-body {
    padding: 1.25rem;
}

.module-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
    display: grid;
    place-items: center;
    background: rgba(31, 67, 98, 0.1);
    color: var(--brand-850);
    font-size: 1.1rem;
}

.card-header {
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--brand-850);
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.card-stat {
    border: 1px solid rgba(31, 67, 98, 0.12);
    background: linear-gradient(165deg, #fff 0%, #f8fbff 100%);
}

.card-stat small {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.68rem;
}

.card-stat h4 {
    margin-top: 0.35rem;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--brand-900);
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 800;
    border-bottom-color: var(--border);
    background: #f6f9fd;
    vertical-align: middle;
}

.table td,
.table th {
    vertical-align: middle;
    border-color: var(--border);
}

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

.form-control,
.form-select {
    border-radius: 10px;
    border-color: #cdd8e4;
    padding-top: 0.56rem;
    padding-bottom: 0.56rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #7ba9c9;
    box-shadow: 0 0 0 0.2rem rgba(42, 92, 125, 0.18);
}

.btn {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-900);
    border-color: var(--brand-900);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-success,
.btn-outline-primary,
.btn-outline-danger {
    border-width: 1.5px;
}

.rcc-action-btn {
    width: 110px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    white-space: nowrap;
    font-size: 1rem;
    line-height: 1;
}

.rcc-filter-form .form-control,
.rcc-filter-form .form-select {
    min-height: 44px;
}

.rcc-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rcc-filter-actions .btn {
    min-width: 108px;
}


.rcc-table-btn {
    min-height: 34px;
    padding: 0.34rem 0.7rem;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.rcc-table-actions form {
    margin: 0;
}

.page-hero-rcc {
    margin-bottom: 1rem;
}

.card-stat--active {
    border-left: 4px solid #1f5b99;
}

.card-stat--open {
    border-left: 4px solid #f2b705;
}

.card-stat--completed {
    border-left: 4px solid #1f8c7f;
}

.card-stat--inactive {
    border-left: 4px solid #8a97a5;
}

.lucros-entry-table th,
.lucros-entry-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.lucros-table-responsive {
    overflow: visible;
}

.lucros-entry-table thead th {
    position: sticky;
    top: var(--lucros-sticky-top);
    z-index: 11;
    background: #edf3fa;
    color: #35577a;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    border-bottom: 2px solid #ccd9e6;
}

.lucros-entry-table tbody td {
    background: var(--surface);
}

.lucros-entry-table .form-control {
    min-width: 118px;
}

.lucros-entry-table td:first-child .form-control {
    min-width: 260px;
}

.lucros-entry-table td:nth-child(2) .form-control {
    min-width: 150px;
}

.lucros-entry-table td:nth-child(7) .form-control {
    min-width: 145px;
}

.lucros-entry-table .badge {
    font-size: 0.62rem;
    font-weight: 700;
}

.rcc-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.rcc-company-name {
    max-width: 360px;
    overflow-wrap: anywhere;
}

.rcc-record-row {
    transition: background-color 0.16s ease;
}

.rcc-record-row:hover {
    background: rgba(31, 67, 98, 0.04);
}

.lucros-record-row {
    cursor: pointer;
    transition: background-color 0.16s ease;
}

.lucros-record-row:hover > * {
    --bs-table-accent-bg: #eef5ff;
}

.badge {
    font-weight: 700;
    border-radius: 999px;
    padding: 0.35rem 0.52rem;
}

.list-group-item {
    border-color: var(--border);
    background: transparent;
}

.page-hero {
    border: 1px solid rgba(31, 67, 98, 0.18);
    border-radius: 18px;
    background: linear-gradient(120deg, var(--brand-900) 0%, var(--brand-700) 100%);
    color: #f3f8fd;
    padding: 1.35rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
}

.page-hero h2,
.page-hero p,
.page-hero small {
    color: inherit;
    margin: 0;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 0.82rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--brand-900);
    background: var(--surface);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-card);
}

.quick-link:hover {
    transform: translateY(-1px);
    border-color: #a8bfd3;
}

.quick-link i {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 10px;
    background: rgba(31, 67, 98, 0.1);
    display: grid;
    place-items: center;
}

.portal-settings-fab {
    position: fixed;
    right: 1.4rem;
    bottom: 1.25rem;
    z-index: 1015;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 40, 63, 0.22);
    background: var(--brand-850);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(18, 41, 64, 0.22);
}

.portal-settings-fab:hover {
    color: #fff;
    background: var(--brand-900);
}

.public-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 480px) 1fr;
}

.public-brand-panel {
    background: linear-gradient(160deg, var(--brand-900) 0%, #1f4566 100%);
    padding: 2.2rem;
    display: grid;
    place-items: center;
}

.public-brand-card {
    max-width: 340px;
    color: #eef4fb;
}

.public-kicker {
    display: inline-block;
    margin-bottom: 0.85rem;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.public-brand-card h1 {
    color: #fff;
    margin-bottom: 0.8rem;
    font-size: 1.75rem;
    line-height: 1.25;
}

.public-brand-card p {
    color: rgba(237, 245, 252, 0.86);
    margin-bottom: 1rem;
}

.public-meta {
    display: inline-flex;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(245, 250, 255, 0.95);
    font-size: 0.74rem;
    font-weight: 700;
}

.public-content-panel {
    display: grid;
    place-items: center;
    padding: 1.8rem;
}

.portal-public .public-content-panel .row {
    width: 100%;
}

.portal-public .card {
    width: min(430px, 100%);
}

.history-compact-list {
    display: grid;
    gap: 0.7rem;
}

.history-compact-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-alt);
    padding: 0.78rem 0.86rem;
}

.history-timeline {
    position: relative;
    display: grid;
    gap: 1rem;
}

.history-timeline::before {
    content: "";
    position: absolute;
    top: 0.6rem;
    bottom: 0.6rem;
    left: 11px;
    width: 2px;
    background: linear-gradient(180deg, rgba(31, 67, 98, 0.3), rgba(31, 140, 127, 0.22));
}

.history-timeline-item {
    position: relative;
    padding-left: 2rem;
}

.history-timeline-marker {
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #d9ebeb;
    background: var(--accent-600);
    box-shadow: 0 0 0 4px rgba(31, 140, 127, 0.14);
}

.history-timeline-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-alt);
    padding: 0.92rem 0.96rem;
}

.history-summary-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.history-summary-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 0.52rem 0.58rem;
    display: grid;
    gap: 0.2rem;
}

.history-summary-item small {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.66rem;
}

.history-summary-item strong {
    font-size: 0.88rem;
    color: var(--brand-900);
}

.history-list-events {
    display: grid;
    gap: 0.45rem;
}

.history-list-event {
    border: 1px dashed #c8d7e7;
    background: #fff;
    border-radius: 10px;
    padding: 0.5rem 0.62rem;
    font-size: 0.84rem;
    color: var(--brand-900);
}

.rcc-tax-sections {
    display: grid;
    gap: 0.85rem;
}

.rcc-tax-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-alt);
    padding: 0.85rem 0.95rem;
}

.rcc-tax-group {
    min-height: 100%;
}

.rcc-tax-title {
    margin: 0 0 0.7rem;
    font-size: 0.78rem;
    color: var(--brand-850);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-weight: 800;
}

.rcc-tax-panel .form-check {
    margin-bottom: 0;
}

.rcc-tax-panel .form-check-label {
    font-size: 0.88rem;
    font-weight: 600;
}

.rcc-tax-panel .form-label {
    margin-bottom: 0.22rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
}

.upload-dropzone {
    border: 2px dashed #b9cadb;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    text-align: center;
    background: #f8fbff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-dropzone i {
    font-size: 1.55rem;
    color: var(--brand-700);
    display: block;
    margin-bottom: 0.35rem;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
    border-color: var(--accent-600);
    background: rgba(31, 140, 127, 0.08);
}

.upload-dropzone.has-files {
    padding: 0.62rem 0.78rem;
    text-align: left;
    background: #f2f8ff;
    border-style: solid;
}

.upload-dropzone.has-files .upload-dropzone-content {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.upload-dropzone.has-files i {
    margin-bottom: 0;
    font-size: 1.05rem;
}

.upload-dropzone.has-files .upload-dropzone-title {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.upload-dropzone.has-files .upload-dropzone-hint {
    display: block;
    margin-left: auto;
    font-size: 0.76rem;
}

.internal-message-list {
    display: grid;
    gap: 0.6rem;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.internal-message-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-alt);
    padding: 0.75rem 0.85rem;
}

.internal-message-item.is-internal {
    border-color: rgba(168, 122, 24, 0.28);
    background: #fff8ea;
}

.kanban-toolbar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.kanban-notices {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.kanban-notice {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 0.65rem 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(18, 41, 64, 0.06);
}

.kanban-notice.is-new {
    border-color: rgba(31, 67, 98, 0.25);
    background: linear-gradient(150deg, #f4f9ff 0%, #ffffff 100%);
}

.kanban-notice.is-done {
    border-color: rgba(28, 135, 92, 0.28);
    background: linear-gradient(150deg, #ecfbf4 0%, #ffffff 100%);
}

.kanban-notice.is-canceled {
    border-color: rgba(177, 68, 68, 0.28);
    background: linear-gradient(150deg, #fff4f4 0%, #ffffff 100%);
}

.kanban-notice-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--brand-850);
    background: rgba(31, 67, 98, 0.12);
}

.kanban-notice-content {
    min-width: 0;
    flex: 1 1 auto;
}

.kanban-notice-content p {
    margin: 0;
}

.internal-kanban {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(7, minmax(270px, 1fr));
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.modern-kanban .kanban-column {
    border: 1px solid #d2dde8;
    border-radius: 16px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    background: var(--kanban-column-bg, #f8fbff);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.modern-kanban .kanban-column-header {
    border-bottom: 1px solid rgba(18, 41, 64, 0.12);
    padding: 0.72rem 0.78rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.kanban-column-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.modern-kanban .kanban-column-header h3 {
    font-size: 0.82rem;
    margin: 0;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2e455f;
}

.kanban-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #68778a;
    border: 1px solid rgba(18, 41, 64, 0.18);
}

.kanban-count {
    font-size: 0.8rem;
    font-weight: 800;
    color: #354d67;
}

.modern-kanban .kanban-column-body {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.62rem;
    min-height: 180px;
    flex: 1 1 auto;
    transition: background-color 0.18s ease;
}

.modern-kanban .kanban-column-body.is-drop-target {
    background: rgba(31, 140, 127, 0.14);
    outline: 2px dashed rgba(31, 140, 127, 0.45);
    outline-offset: -8px;
}

.modern-kanban .kanban-column.is-drop-target {
    border-color: rgba(31, 140, 127, 0.72);
    box-shadow: 0 0 0 3px rgba(31, 140, 127, 0.18);
    transform: translateY(-1px);
}

.modern-kanban .kanban-card {
    border: 1px solid #d4dde7;
    border-radius: 12px;
    background: var(--kanban-card-bg, #fff);
    padding: 0.68rem 0.7rem;
    box-shadow: 0 3px 10px rgba(18, 41, 64, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
    cursor: pointer;
}

.modern-kanban .kanban-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(18, 41, 64, 0.09);
}

.modern-kanban .kanban-card.is-unread {
    border-color: rgba(31, 91, 153, 0.45);
    box-shadow: 0 0 0 2px rgba(31, 91, 153, 0.12), 0 6px 14px rgba(18, 41, 64, 0.08);
}

.modern-kanban .kanban-card.is-dragging {
    opacity: 0.65;
    transform: scale(0.99);
}

.kanban-card-number {
    font-size: 0.88rem;
    color: #1b3550;
}

.kanban-drag-handle {
    color: #6b7f94;
    font-size: 0.95rem;
    cursor: grab;
}

.kanban-unread-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1f5b99;
    background: rgba(31, 91, 153, 0.12);
    border: 1px solid rgba(31, 91, 153, 0.22);
}

.kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.kanban-card-tags .badge.text-bg-light {
    border: 1px solid #d2deea;
    color: #34506d;
}

.kanban-card-meta {
    display: grid;
    gap: 0.2rem;
    font-size: 0.77rem;
    color: #53697f;
}

.kanban-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.kanban-empty {
    border: 1px dashed #c7d5e4;
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.72);
}

.kanban-theme-neutral {
    background: #f2f5f8;
}

.kanban-theme-analysis {
    background: #f5eefb;
}

.kanban-theme-progress {
    background: #fff2e8;
}

.kanban-theme-waiting-user {
    background: #ecf4ff;
}

.kanban-theme-waiting-third {
    background: #fff7e5;
}

.kanban-theme-done {
    background: #ecf8f1;
}

.kanban-theme-closed {
    background: #ecf1f1;
}

.kanban-theme-neutral .kanban-status-dot {
    background: #7d8796;
}

.kanban-theme-analysis .kanban-status-dot {
    background: #8d3ac2;
}

.kanban-theme-progress .kanban-status-dot {
    background: #de6d0b;
}

.kanban-theme-waiting-user .kanban-status-dot {
    background: #207be0;
}

.kanban-theme-waiting-third .kanban-status-dot {
    background: #c9930a;
}

.kanban-theme-done .kanban-status-dot {
    background: #1f8c5f;
}

.kanban-theme-closed .kanban-status-dot {
    background: #5f6f73;
}

.kanban-move-feedback {
    position: fixed;
    right: 1.1rem;
    bottom: 1rem;
    z-index: 1080;
    background: #163553;
    color: #fff;
    border-radius: 10px;
    padding: 0.56rem 0.82rem;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 12px 22px rgba(18, 41, 64, 0.22);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.2s ease;
}

.kanban-move-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.kanban-move-feedback.is-error {
    background: #8f2f2f;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-columns-grid {
    display: grid;
    gap: 0.75rem;
}

.kanban-column-editor {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-alt);
    padding: 0.85rem 0.9rem;
}

.sidebar-collapsed .portal-sidebar {
    width: 92px;
}

.sidebar-collapsed .portal-main {
    margin-left: 92px;
}

.sidebar-collapsed .brand-text,
.sidebar-collapsed .sidebar-section-title,
.sidebar-collapsed .module-label span,
.sidebar-collapsed .sidebar-link span,
.sidebar-collapsed .sidebar-settings-link span,
.sidebar-collapsed .future-module-list span,
.sidebar-collapsed .badge-soft {
    display: none;
}

.sidebar-collapsed .future-module-list li,
.sidebar-collapsed .module-label,
.sidebar-collapsed .sidebar-link,
.sidebar-collapsed .sidebar-settings-link {
    justify-content: center;
}

.sidebar-collapsed .module-label,
.sidebar-collapsed .sidebar-link,
.sidebar-collapsed .sidebar-settings-link {
    padding-left: 0;
    padding-right: 0;
}

.sidebar-collapsed .future-module-list li {
    grid-template-columns: 1fr;
}

@media (max-width: 1199px) {
    .topbar-right .module-chip {
        display: none;
    }
}

@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 90px;
    }

    .portal-content section[id] {
        scroll-margin-top: 90px;
    }

    .portal-sidebar {
        transform: translateX(-100%);
        width: 286px;
    }

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

    .sidebar-collapsed .portal-sidebar {
        width: 286px;
    }

    .sidebar-collapsed .brand-text,
    .sidebar-collapsed .sidebar-section-title {
        display: block;
    }

    .sidebar-collapsed .module-label span,
    .sidebar-collapsed .sidebar-link span,
    .sidebar-collapsed .sidebar-settings-link span,
    .sidebar-collapsed .future-module-list span {
        display: inline;
    }

    .sidebar-collapsed .badge-soft {
        display: inline-flex;
    }

    .sidebar-collapsed .future-module-list li {
        grid-template-columns: 16px 1fr auto;
    }

    .sidebar-collapsed .future-module-list li,
    .sidebar-collapsed .module-label,
    .sidebar-collapsed .sidebar-link,
    .sidebar-collapsed .sidebar-settings-link {
        justify-content: flex-start;
    }

    .sidebar-collapsed .module-label,
    .sidebar-collapsed .sidebar-link,
    .sidebar-collapsed .sidebar-settings-link {
        padding-left: 0.72rem;
        padding-right: 0.72rem;
    }

    .sidebar-open .portal-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .public-shell {
        grid-template-columns: 1fr;
    }

    .public-brand-panel {
        display: none;
    }

    .topbar-right .user-pill {
        display: none;
    }

    .portal-topbar,
    .portal-content {
        padding-left: 0.95rem;
        padding-right: 0.95rem;
    }

    .portal-settings-fab {
        right: 1rem;
        bottom: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .topbar-title {
        font-size: 1rem;
    }

    .btn-outline-secondary.btn-sm {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .rcc-tax-panel {
        padding: 0.7rem 0.75rem;
    }

    .rcc-action-btn {
        width: auto;
        min-width: 98px;
        height: 40px;
        font-size: 0.92rem;
    }

    .rcc-filter-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
    }
}

@media (max-width: 1199.98px) {
    .rcc-company-name {
        max-width: 260px;
    }
}

@media (max-width: 767.98px) {
    .rcc-company-name {
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    .lucros-table-responsive {
        overflow-x: auto;
        overflow-y: visible;
    }

    .lucros-entry-table thead th {
        position: static;
    }

    .internal-kanban {
        grid-template-columns: repeat(7, minmax(230px, 1fr));
    }
}
