:root {
    --bg-page: #f5f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #111827;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
}

a {
    text-decoration: none;
}

.app-page {
    min-height: 100vh;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: rgba(255, 255, 255, 0.9);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transition: transform 0.25s ease;
}

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

.brand-link {
    display: grid;
    gap: 0.75rem;
    color: #fff;
}

.brand-link-stacked {
    align-items: start;
}

.brand-logo {
    width: 42px;
    height: 42px;
}

.brand-logo-full {
    width: 100%;
    max-width: 190px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 0.2rem;
}

.brand-context {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.brand-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.sidebar-nav,
.sidebar-footer {
    display: grid;
    gap: 0.35rem;
}

.sidebar-glass-card {
    position: relative;
    z-index: 1;
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(108, 124, 255, 0.2), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(182, 194, 255, 0.18);
    box-shadow: var(--shadow-sm);
}

.sidebar-glass-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(230, 236, 255, 0.62);
}

.sidebar-glass-card strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    margin-bottom: 0.45rem;
}

.sidebar-glass-card p {
    margin: 0;
    color: rgba(223, 230, 255, 0.72);
    font-size: 0.88rem;
    line-height: 1.55;
}

.sidebar-nav {
    margin-top: 2rem;
    flex: 1;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    border-radius: 12px;
    padding: 0.78rem 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
}

.sidebar-link i {
    font-size: 1.05rem;
}

.sidebar-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.app-main {
    flex: 1;
    margin-left: 260px;
}

.topbar {
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-toggle,
.icon-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.topbar-search {
    max-width: 460px;
    width: 100%;
    position: relative;
}

.topbar-search i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-search .form-control {
    border-radius: 14px;
    border-color: var(--border);
    padding-left: 2.8rem;
    background: #fff;
    height: 46px;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-toggle {
    position: relative;
}

.notification-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24);
}

.notification-menu {
    width: min(380px, calc(100vw - 2rem));
    border-radius: 18px;
    overflow: hidden;
}

.notification-menu-header {
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.notification-list {
    display: grid;
    max-height: 360px;
    overflow-y: auto;
}

.notification-item,
.notification-page-item {
    display: block;
    color: var(--text-main);
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    transition: background-color 0.2s ease;
}

.notification-item:last-child,
.notification-page-item:last-child {
    border-bottom: 0;
}

.notification-item:hover,
.notification-page-item:hover {
    background: rgba(249, 250, 251, 0.9);
}

.notification-item.is-unread,
.notification-page-item.is-unread {
    background: rgba(37, 99, 235, 0.06);
}

.notification-item-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.notification-item-body,
.notification-item-date,
.notification-page-item p,
.notification-page-meta span {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.notification-item-date {
    margin-top: 0.45rem;
}

.notification-empty {
    padding: 1.25rem 1.1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-page-list {
    display: grid;
}

.notification-page-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.chat-shell {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 1.5rem;
}

.chat-sidebar,
.chat-main {
    min-height: 640px;
}

.chat-company-list {
    display: grid;
    gap: 0.75rem;
}

.chat-company-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.chat-company-link:hover,
.chat-company-link.active {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.06);
}

.chat-company-copy {
    display: grid;
    gap: 0.2rem;
}

.chat-company-copy strong {
    font-size: 0.95rem;
}

.chat-company-copy small {
    color: var(--text-muted);
    line-height: 1.35;
}

.invoice-sheet {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(249, 250, 251, 0.9)),
        var(--bg-card);
}

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

.invoice-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.invoice-meta-card {
    border: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.86);
}

.invoice-meta-card span {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.invoice-total-box {
    display: grid;
    gap: 0.75rem;
}

.profile-toggle {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 0.4rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.avatar-square {
    border-radius: 12px;
}

.profile-meta {
    flex-direction: column;
    text-align: left;
}

.profile-meta strong {
    font-size: 0.92rem;
}

.profile-meta small {
    color: var(--text-muted);
    text-transform: capitalize;
}

.content-area {
    padding: 1.5rem;
    max-width: 1600px;
}

.app-breadcrumbs {
    margin-bottom: 1rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.92rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #9ca3af;
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.85rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
}

.page-subtitle {
    color: var(--text-muted);
    margin: 0;
    max-width: 760px;
}

.page-action {
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.app-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.app-card .card-header {
    padding: 1.25rem 1.35rem 0;
}

.app-card .card-body {
    padding: 1.35rem;
}

.app-card .card-footer {
    padding: 0 1.35rem 1.35rem;
}

.app-card > .card-header .section-subtitle {
    display: none !important;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-subtitle,
.table-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.kpi-card {
    height: 100%;
}

.kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-weight: 600;
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin: 1rem 0 0.4rem;
}

.kpi-trend {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.status-soft-primary {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

.status-soft-secondary {
    background: rgba(107, 114, 128, 0.12);
    color: #4b5563;
}

.status-soft-success {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
}

.status-soft-warning {
    background: rgba(217, 119, 6, 0.12);
    color: var(--warning);
}

.status-soft-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.status-soft-info {
    background: rgba(8, 145, 178, 0.12);
    color: var(--info);
}

.table-app {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    --bs-table-border-color: rgba(229, 231, 235, 0.7);
    vertical-align: middle;
}

.table-app thead th {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1rem 1.35rem;
    background: rgba(249, 250, 251, 0.9);
}

.table-app tbody td {
    padding: 1rem 1.35rem;
}

.table-app tbody tr:hover {
    background: rgba(249, 250, 251, 0.75);
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    gap: 0.9rem;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 0.4rem;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.08);
}

.timeline-content {
    flex: 1;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.timeline-item:last-child .timeline-content {
    border-bottom: 0;
    padding-bottom: 0;
}

.timeline-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.timeline-top span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.timeline-content p {
    margin: 0;
    color: var(--text-muted);
}

.recommendation-list {
    display: grid;
    gap: 1rem;
}

.recommendation-item {
    padding: 1rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 250, 251, 0.96));
}

.recommendation-item strong {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.4rem;
}

.recommendation-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.list-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.chart-placeholder {
    height: 100%;
    min-height: 260px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 40%), #fbfdff;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    min-height: 180px;
}

.chart-bars span {
    flex: 1;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.95), rgba(37, 99, 235, 0.42));
}

.chart-caption {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.shortcut-card {
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 14px;
    padding: 1rem;
    background: #fff;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 110px;
}

.shortcut-card i {
    color: var(--primary);
    font-size: 1.2rem;
}

.color-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.86);
    border-radius: 18px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    min-width: 220px;
}

.kanban-column-head {
    padding: 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px 18px 0 0;
}

.kanban-column-head h3 {
    margin: 0;
    font-size: 1rem;
}

.kanban-column-head span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.kanban-column-body {
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
}

.kanban-card {
    padding: 1rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.kanban-card h4 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.kanban-card p,
.kanban-footer span {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.kanban-meta,
.kanban-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.kanban-meta {
    margin: 0.9rem 0;
    font-weight: 600;
    font-size: 0.88rem;
}

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 1.8rem;
}

.empty-state h3 {
    margin: 1.2rem 0 0.4rem;
    font-size: 1.2rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
        radial-gradient(circle at bottom right, rgba(8, 145, 178, 0.08), transparent 28%),
        var(--bg-page);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 460px;
}

.auth-intro {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-brand-logo {
    width: min(100%, 320px);
    height: auto;
    object-fit: contain;
    margin-bottom: 1.25rem;
}

.eyebrow {
    display: inline-flex;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-intro h1 {
    margin: 1rem 0 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.auth-intro p {
    margin: 0;
    color: var(--text-muted);
}

.auth-card {
    border-radius: 24px;
}

.auth-logo {
    width: 48px;
    height: 48px;
}

.auth-logo-wide {
    width: 168px;
    max-width: 100%;
    height: auto;
    max-height: 44px;
    object-fit: contain;
}

.auth-form .form-control,
.auth-form .form-select,
.content-area .form-control,
.content-area .form-select {
    min-height: 48px;
    border-radius: 12px;
    border-color: var(--border);
    box-shadow: none;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus,
.content-area .form-control:focus,
.content-area .form-select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
}

.form-textarea {
    min-height: 132px;
    resize: vertical;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 3;
}

.demo-account {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    color: var(--text-muted);
    font-size: 0.92rem;
}

.demo-account-title {
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-summary {
    text-align: center;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1035;
}

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

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

code {
    background: rgba(17, 24, 39, 0.06);
    color: var(--text-main);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

.ticket-detail-header {
    display: grid;
    gap: 1rem;
}

.ticket-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ticket-meta-item {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.96));
}

.ticket-meta-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.45rem;
}

.ticket-meta-item strong {
    font-size: 0.98rem;
}

.ticket-channel {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.05);
    color: var(--text-muted);
    font-weight: 600;
}

.ticket-description {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(249, 250, 251, 0.9);
    border: 1px solid rgba(229, 231, 235, 0.8);
    color: var(--text-main);
    line-height: 1.7;
}

.message-thread {
    display: grid;
    gap: 1rem;
}

.message-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.message-item-client {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.message-bubble {
    flex: 1;
    max-width: calc(100% - 60px);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: var(--shadow-sm);
}

.message-item-agency .message-bubble {
    background: #ffffff;
}

.message-item-client .message-bubble {
    background: rgba(8, 145, 178, 0.08);
    border-color: rgba(8, 145, 178, 0.18);
}

.message-item-system .message-bubble {
    background: rgba(107, 114, 128, 0.08);
    border-color: rgba(107, 114, 128, 0.18);
}

.message-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.86rem;
}

.message-meta span {
    color: var(--text-muted);
    white-space: nowrap;
}

.message-content {
    color: var(--text-main);
    line-height: 1.65;
}

.detail-list {
    display: grid;
    gap: 0.9rem;
}

.detail-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.detail-list-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.document-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.document-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

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

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

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .content-area,
    .topbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-action {
        width: 100%;
    }

    .ticket-meta-grid {
        grid-template-columns: 1fr;
    }

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

    .invoice-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .topbar-search {
        display: none;
    }

    .shortcut-grid {
        grid-template-columns: 1fr;
    }

    .table-app thead th,
    .table-app tbody td {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .kpi-value {
        font-size: 1.7rem;
    }

    .message-item,
    .message-item-client {
        flex-direction: column;
    }

    .message-bubble {
        max-width: 100%;
    }
}

/* PrestiOne visual refresh */

:root {
    --bg-page: #0f1226;
    --bg-card: rgba(18, 24, 53, 0.72);
    --bg-sidebar: rgba(12, 16, 38, 0.88);
    --text-main: #f5f7ff;
    --text-muted: #adb6df;
    --border: rgba(170, 188, 255, 0.18);
    --primary: #6c7cff;
    --primary-hover: #8390ff;
    --success: #3dd9b4;
    --warning: #ffbf69;
    --danger: #ff738b;
    --info: #6bd6ff;
    --shadow-sm: 0 10px 30px rgba(7, 10, 24, 0.22);
    --shadow-md: 0 24px 80px rgba(7, 10, 24, 0.36);
}

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 12%, rgba(90, 129, 255, 0.42), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(195, 118, 255, 0.34), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(76, 205, 255, 0.22), transparent 34%),
        linear-gradient(160deg, #0b0e21 0%, #14193a 48%, #181245 100%);
}

a {
    color: inherit;
}

.app-page,
.auth-page {
    position: relative;
    overflow-x: hidden;
}

.app-ambient,
.auth-ambient {
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(40px);
    opacity: 0.75;
    z-index: 0;
}

.app-ambient-one,
.auth-ambient-one {
    inset: 6% auto auto 4%;
    width: 24rem;
    height: 24rem;
    background: rgba(88, 132, 255, 0.28);
}

.app-ambient-two,
.auth-ambient-two {
    inset: auto 2% 8% auto;
    width: 28rem;
    height: 28rem;
    background: rgba(184, 111, 255, 0.22);
}

.app-shell,
.auth-shell {
    position: relative;
    z-index: 1;
}

.app-sidebar {
    background:
        linear-gradient(180deg, rgba(17, 22, 52, 0.92), rgba(9, 12, 31, 0.88)),
        rgba(7, 10, 24, 0.84);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
    box-shadow: 30px 0 80px rgba(5, 7, 18, 0.35);
}

.app-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(108, 124, 255, 0.24), transparent 32%),
        radial-gradient(circle at bottom left, rgba(65, 220, 255, 0.12), transparent 28%);
    pointer-events: none;
}

.sidebar-brand,
.sidebar-nav,
.sidebar-footer {
    position: relative;
    z-index: 1;
}

.brand-link {
    gap: 1rem;
}

.brand-logo-full {
    max-width: 208px;
    max-height: 50px;
    filter: drop-shadow(0 12px 24px rgba(130, 150, 255, 0.15));
}

.brand-context {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.58);
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.88);
}

.sidebar-link {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: linear-gradient(135deg, rgba(108, 124, 255, 0.24), rgba(74, 211, 255, 0.14));
    border-color: rgba(135, 151, 255, 0.28);
    transform: translateX(4px);
}

.sidebar-link i {
    color: rgba(196, 208, 255, 0.9);
}

.app-main {
    position: relative;
}

.topbar {
    margin: 1rem 1rem 0;
    border-radius: 24px;
    background: rgba(15, 20, 46, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
}

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

.topbar-brand-mobile {
    display: inline-flex;
    align-items: center;
    border-radius: 16px;
    padding: 0.45rem 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-brand-logo {
    width: 136px;
    max-width: 100%;
    height: auto;
    display: block;
}

.workspace-indicator {
    gap: 0.6rem;
    padding: 0.52rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workspace-indicator-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(222, 230, 255, 0.58);
}

.workspace-indicator strong {
    font-size: 0.92rem;
    color: #fff;
}

.topbar-toggle,
.icon-button,
.profile-toggle {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.topbar-search .form-control {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.topbar-search .form-control::placeholder {
    color: rgba(219, 227, 255, 0.5);
}

.notification-menu,
.dropdown-menu {
    background: rgba(12, 17, 39, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(22px);
    color: var(--text-main);
}

.dropdown-item {
    color: var(--text-main);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(108, 124, 255, 0.14);
    color: #fff;
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08);
}

.notification-menu-header,
.notification-item,
.notification-page-item {
    border-color: rgba(255, 255, 255, 0.08);
}

.notification-item:hover,
.notification-page-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notification-item.is-unread,
.notification-page-item.is-unread {
    background: linear-gradient(135deg, rgba(108, 124, 255, 0.16), rgba(107, 214, 255, 0.08));
}

.notification-count {
    background: linear-gradient(135deg, #ff7a93, #ff4d6d);
    box-shadow: 0 10px 24px rgba(255, 90, 122, 0.42);
}

.content-area {
    padding: 1.5rem 1rem 2rem;
}

.app-breadcrumbs {
    margin: 1.25rem 0 1rem;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: rgba(215, 223, 255, 0.7);
}

.page-header {
    position: relative;
    overflow: hidden;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(99, 118, 255, 0.2), rgba(124, 86, 255, 0.1)),
        rgba(17, 22, 52, 0.72);
    border: 1px solid rgba(186, 198, 255, 0.14);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(22px);
}

.page-header::before {
    content: "";
    position: absolute;
    inset: auto -5% -55% 40%;
    height: 220px;
    background: radial-gradient(circle, rgba(115, 232, 255, 0.22), transparent 68%);
    pointer-events: none;
}

.page-header-copy {
    position: relative;
    z-index: 1;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding: 0.48rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(238, 242, 255, 0.88);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-title,
.section-title,
.auth-showcase-copy h1,
.auth-card-head h2 {
    font-family: "Space Grotesk", sans-serif;
}

.page-title {
    font-size: clamp(2rem, 3vw, 2.9rem);
    margin-bottom: 0.55rem;
}

.page-subtitle {
    color: rgba(226, 232, 255, 0.8);
    max-width: 840px;
}

.page-action {
    position: relative;
    z-index: 1;
    min-width: 190px;
}

.app-card,
.page-header,
.auth-card,
.auth-showcase,
.chat-company-link,
.shortcut-card,
.recommendation-item,
.kanban-card,
.kanban-column,
.ticket-meta-item,
.detail-list-item,
.notification-menu,
.dropdown-menu {
    backdrop-filter: blur(22px);
}

.app-card {
    background:
        linear-gradient(180deg, rgba(30, 38, 80, 0.84), rgba(14, 18, 42, 0.84)),
        rgba(17, 22, 52, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.app-card .card-header,
.app-card .card-footer {
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 1.08rem;
    color: #f9fbff;
}

.section-subtitle,
.table-subtext,
.timeline-top span,
.timeline-content p,
.recommendation-item p,
.chart-caption,
.list-row,
.chat-company-copy small,
.detail-list-item span,
.notification-item-body,
.notification-item-date,
.notification-page-item p,
.notification-page-meta span,
.profile-meta small,
.auth-card-head p,
.form-text,
.text-muted {
    color: var(--text-muted) !important;
}

.kpi-card {
    overflow: hidden;
}

.kpi-head {
    color: rgba(219, 227, 255, 0.78);
}

.kpi-icon,
.document-icon,
.empty-state-icon {
    background: linear-gradient(135deg, rgba(108, 124, 255, 0.22), rgba(61, 217, 180, 0.14));
    color: #dbe7ff;
}

.kpi-value {
    color: #fff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.status-soft-primary {
    background: rgba(108, 124, 255, 0.18);
    color: #d9e2ff;
}

.status-soft-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #dbe1ff;
}

.status-soft-success {
    background: rgba(61, 217, 180, 0.18);
    color: #baf9e9;
}

.status-soft-warning {
    background: rgba(255, 191, 105, 0.18);
    color: #ffe1b0;
}

.status-soft-danger {
    background: rgba(255, 115, 139, 0.18);
    color: #ffd1da;
}

.status-soft-info {
    background: rgba(107, 214, 255, 0.18);
    color: #d1f4ff;
}

.chart-placeholder,
.recommendation-item,
.shortcut-card,
.kanban-card,
.kanban-column,
.ticket-meta-item,
.ticket-description,
.detail-list-item,
.chat-company-link,
.message-bubble,
.invoice-meta-card,
.profile-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.chart-placeholder {
    background:
        radial-gradient(circle at top right, rgba(115, 232, 255, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(126, 110, 255, 0.14), transparent 28%),
        rgba(255, 255, 255, 0.04);
}

.chart-bars span {
    background: linear-gradient(180deg, rgba(128, 142, 255, 0.96), rgba(95, 219, 255, 0.42));
    box-shadow: 0 16px 30px rgba(108, 124, 255, 0.22);
}

.table-app {
    --bs-table-color: var(--text-main);
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
}

.table-app thead th {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(227, 233, 255, 0.62);
}

.table-app tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.list-row {
    border-color: rgba(255, 255, 255, 0.08);
}

.timeline-dot {
    background: linear-gradient(180deg, #8b99ff, #4bd9ff);
    box-shadow: 0 0 0 8px rgba(108, 124, 255, 0.12);
}

.kanban-column-head,
.ticket-meta-item,
.detail-list-item {
    border-color: rgba(255, 255, 255, 0.08);
}

.message-item-agency .message-bubble {
    background: rgba(255, 255, 255, 0.06);
}

.message-item-client .message-bubble {
    background: rgba(107, 214, 255, 0.1);
    border-color: rgba(107, 214, 255, 0.16);
}

.message-item-system .message-bubble {
    background: rgba(255, 255, 255, 0.08);
}

.auth-shell {
    min-height: 100vh;
    padding: 2rem 1rem;
    display: grid;
    place-items: center;
}

.auth-stage {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 440px);
    gap: 1.5rem;
    align-items: stretch;
}

.auth-showcase,
.auth-card {
    border-radius: 36px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-showcase {
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(191, 123, 255, 0.34), transparent 30%),
        radial-gradient(circle at bottom left, rgba(90, 204, 255, 0.28), transparent 34%),
        linear-gradient(160deg, rgba(56, 67, 151, 0.9), rgba(32, 21, 86, 0.9));
    box-shadow: var(--shadow-md);
}

.auth-showcase::before {
    content: "";
    position: absolute;
    inset: auto -10% -30% auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.auth-trust-pill,
.auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-brand-logo {
    width: min(100%, 360px);
    margin: 1.2rem 0 1.6rem;
    filter: drop-shadow(0 18px 40px rgba(20, 8, 66, 0.28));
}

.auth-showcase-copy {
    max-width: 620px;
}

.auth-showcase-copy h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.02;
    margin-bottom: 1rem;
    color: #fff;
}

.auth-showcase-copy p {
    margin: 0;
    color: rgba(236, 241, 255, 0.8);
    font-size: 1rem;
    line-height: 1.75;
}

.auth-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.auth-stat-card {
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-stat-card span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(235, 240, 255, 0.68);
    margin-bottom: 0.55rem;
}

.auth-stat-card strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.55rem;
}

.auth-stat-card p {
    margin: 0;
    color: rgba(235, 240, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-card {
    background:
        linear-gradient(180deg, rgba(18, 24, 53, 0.92), rgba(11, 14, 31, 0.94)),
        rgba(11, 14, 31, 0.94);
    box-shadow: var(--shadow-md);
}

.auth-card-head {
    margin-bottom: 1.6rem;
}

.auth-card-head h2 {
    margin: 0.9rem 0 0.55rem;
    font-size: 2rem;
    color: #fff;
}

.eyebrow {
    background: rgba(108, 124, 255, 0.16);
    border: 1px solid rgba(147, 161, 255, 0.18);
    color: #dde4ff;
}

.auth-form .form-control,
.auth-form .form-select,
.content-area .form-control,
.content-area .form-select {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-form .form-control::placeholder,
.content-area .form-control::placeholder {
    color: rgba(218, 226, 255, 0.42);
}

.auth-form .form-control:focus,
.auth-form .form-select:focus,
.content-area .form-control:focus,
.content-area .form-select:focus {
    border-color: rgba(129, 144, 255, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(108, 124, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.form-label {
    color: rgba(237, 241, 255, 0.92);
    font-weight: 600;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

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

.password-toggle {
    color: rgba(224, 231, 255, 0.65);
}

.btn {
    border-radius: 16px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, #6676ff, #46cfff);
    border: 0;
    box-shadow: 0 18px 36px rgba(95, 118, 255, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #7786ff, #5cd8ff);
    box-shadow: 0 22px 42px rgba(95, 118, 255, 0.32);
}

.btn-light,
.btn-outline-secondary,
.btn-outline-danger {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-light:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.btn-outline-danger {
    color: #ffd6de;
    border-color: rgba(255, 115, 139, 0.3);
}

.danger-zone-card {
    border-color: rgba(255, 115, 139, 0.24);
}

.danger-zone-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
    border-radius: 18px;
    background: rgba(255, 90, 122, 0.08);
    border: 1px solid rgba(255, 115, 139, 0.16);
    color: var(--text-main);
}

.danger-zone-note i {
    color: #ff7a93;
    font-size: 1.1rem;
}

.settings-shortcut-card .btn {
    min-height: 48px;
}

.alert {
    background: rgba(18, 24, 53, 0.92);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    border-color: rgba(61, 217, 180, 0.24);
}

.alert-warning {
    border-color: rgba(255, 191, 105, 0.24);
}

.alert-danger {
    border-color: rgba(255, 115, 139, 0.24);
}

code {
    background: rgba(255, 255, 255, 0.08);
    color: #f4f6ff;
}

.dashboard-spotlight {
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

.dashboard-spotlight::before {
    content: "";
    position: absolute;
    inset: -10% auto auto 55%;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(116, 226, 255, 0.22), transparent 70%);
    pointer-events: none;
}

.dashboard-spotlight .card-body {
    position: relative;
    z-index: 1;
}

.dashboard-spotlight-copy {
    max-width: 700px;
    margin-bottom: 1.5rem;
}

.dashboard-spotlight-copy h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.05;
    margin-bottom: 0.85rem;
}

.dashboard-spotlight-copy p {
    margin: 0;
    color: rgba(226, 232, 255, 0.8);
    font-size: 1rem;
    line-height: 1.75;
}

.dashboard-spotlight-light {
    background:
        radial-gradient(circle at top right, rgba(115, 232, 255, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.96));
    border: 1px solid rgba(44, 52, 112, 0.08);
}

.dashboard-spotlight-light::before {
    background: radial-gradient(circle, rgba(64, 167, 255, 0.18), transparent 70%);
}

.dashboard-spotlight-light .dashboard-label {
    background: rgba(44, 52, 112, 0.08);
    border-color: rgba(44, 52, 112, 0.12);
    color: #2c3470;
}

.dashboard-spotlight-light .dashboard-spotlight-copy h2,
.dashboard-spotlight-light .mini-stat-card strong {
    color: #1f2a56;
}

.dashboard-spotlight-light .dashboard-spotlight-copy p,
.dashboard-spotlight-light .mini-stat-card span,
.dashboard-spotlight-light .mini-stat-card small {
    color: #5f6b93;
}

.dashboard-spotlight-light .mini-stat-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(44, 52, 112, 0.08);
    box-shadow: 0 18px 30px rgba(44, 52, 112, 0.08);
}

.dashboard-spotlight-client {
    background:
        radial-gradient(circle at top right, rgba(73, 216, 255, 0.16), transparent 26%),
        linear-gradient(135deg, rgba(47, 121, 255, 0.18), rgba(31, 192, 171, 0.12)),
        rgba(17, 22, 52, 0.72);
}

.dashboard-spotlight-light.dashboard-spotlight-client {
    background:
        radial-gradient(circle at top right, rgba(73, 216, 255, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.96));
}

.dashboard-label,
.dashboard-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(239, 243, 255, 0.82);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.mini-stat-card,
.dashboard-compact-card {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-stat-card span,
.metric-chip span {
    display: block;
    font-size: 0.8rem;
    color: rgba(223, 230, 255, 0.68);
    margin-bottom: 0.45rem;
}

.mini-stat-card strong,
.metric-chip strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.mini-stat-card small,
.metric-chip small {
    color: rgba(223, 230, 255, 0.72);
}

.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.quick-link-card {
    display: grid;
    gap: 0.5rem;
    min-height: 140px;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.quick-link-card:hover {
    transform: translateY(-3px);
    border-color: rgba(136, 151, 255, 0.24);
    background: rgba(255, 255, 255, 0.07);
}

.quick-link-card i {
    font-size: 1.25rem;
    color: #dbe7ff;
}

.quick-link-card strong {
    font-size: 0.98rem;
}

.quick-link-card span {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.metric-chip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: rgba(17, 22, 52, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
}

.metric-chip-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 124, 255, 0.22), rgba(61, 217, 180, 0.14));
    color: #dbe7ff;
    flex-shrink: 0;
}

@media (max-width: 1199.98px) {
    .auth-stage {
        grid-template-columns: 1fr;
    }

    .auth-stat-grid {
        grid-template-columns: 1fr;
    }

    .metric-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .topbar {
        margin: 0.75rem 0.75rem 0;
    }

    .content-area {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .page-header {
        padding: 1.2rem;
        border-radius: 24px;
    }

    .metric-mini-grid,
    .quick-link-grid,
    .metric-strip {
        grid-template-columns: 1fr;
    }

    .workspace-indicator {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .auth-shell {
        padding: 1rem 0.85rem;
    }

    .auth-showcase,
    .auth-card {
        border-radius: 28px;
    }

    .auth-showcase {
        padding: 1.4rem;
    }

    .page-action {
        width: 100%;
    }
}

/* Menu and invoice refresh */
.app-sidebar {
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: 280px;
    padding: 1.2rem 1rem;
    border-radius: 34px;
    background: linear-gradient(180deg, #2c3470 0%, #273067 52%, #202854 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 72px rgba(23, 31, 76, 0.34);
    overflow: hidden;
}

.app-sidebar::before {
    background:
        radial-gradient(circle at top left, rgba(133, 160, 255, 0.24), transparent 34%),
        radial-gradient(circle at bottom left, rgba(93, 219, 255, 0.16), transparent 28%);
}

.sidebar-brand {
    padding-bottom: 0;
}

.brand-link {
    padding: 1rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-logo-full {
    max-width: 214px;
    max-height: 56px;
}

.sidebar-glass-card {
    margin: 1.1rem 0 1.3rem;
    padding: 1.05rem 1.1rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-nav {
    margin-top: 1.25rem;
    gap: 0.55rem;
}

.sidebar-link {
    border-radius: 22px;
    padding: 0.88rem 1rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: linear-gradient(135deg, rgba(140, 156, 255, 0.28), rgba(86, 214, 255, 0.18));
    border-color: rgba(188, 198, 255, 0.22);
    transform: none;
    box-shadow: 0 16px 32px rgba(18, 26, 66, 0.2);
}

.sidebar-footer {
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.app-main {
    margin-left: 312px;
    padding-right: 16px;
}

.dashboard-expand {
    display: grid;
    justify-items: start;
    gap: 1rem;
}

.dashboard-expand-extra {
    width: 100%;
}

.dashboard-expand-button {
    border-radius: 999px;
    padding: 0.65rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-expand-button[aria-expanded="true"] {
    background: rgba(108, 124, 255, 0.16);
    border-color: rgba(108, 124, 255, 0.28);
}

.invoice-source-card,
.invoice-upload-card {
    padding: 1.1rem 1.15rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.invoice-upload-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.invoice-upload-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 124, 255, 0.22), rgba(61, 217, 180, 0.14));
    color: #dbe7ff;
    font-size: 1.35rem;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        top: 12px;
        left: 12px;
        bottom: 12px;
        width: min(304px, calc(100vw - 24px));
        border-radius: 28px;
    }

    .app-main {
        margin-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 767.98px) {
    .invoice-upload-card {
        flex-direction: column;
    }
}

/* Light workspace refresh */
.app-page {
    background:
        radial-gradient(circle at top right, rgba(115, 197, 255, 0.18), transparent 22%),
        linear-gradient(180deg, #eef3ff 0%, #f7faff 48%, #f2f6ff 100%);
    color: #1f2a56;
}

.app-main,
.content-area {
    color: #1f2a56;
}

.topbar {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(44, 52, 112, 0.08);
    box-shadow: 0 18px 40px rgba(44, 52, 112, 0.08);
    backdrop-filter: blur(16px);
}

.topbar-brand-mobile,
.workspace-indicator,
.notification-menu,
.dropdown-menu {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(44, 52, 112, 0.08);
    box-shadow: 0 18px 36px rgba(44, 52, 112, 0.1);
}

.workspace-indicator-label,
.table-subtext,
.section-subtitle,
.content-area .form-text,
.timeline-content p,
.detail-list-item span,
.mini-stat-card span,
.mini-stat-card small,
.metric-chip span,
.metric-chip small,
.quick-link-card span {
    color: #69759d !important;
}

.topbar .icon-button,
.topbar-toggle,
.profile-toggle,
.notification-item,
.dropdown-item {
    color: #23305f;
}

.topbar-search {
    background: rgba(245, 248, 255, 0.96);
    border: 1px solid rgba(44, 52, 112, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.topbar-search i,
.profile-toggle i,
.dropdown-item i {
    color: #6070a6;
}

.topbar-search .form-control {
    background: transparent;
    color: #1f2a56;
}

.topbar-search .form-control::placeholder {
    color: #8b96bb;
}

.page-header,
.app-card,
.metric-chip,
.dashboard-compact-card {
    background:
        radial-gradient(circle at top right, rgba(112, 225, 255, 0.08), transparent 18%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
    border: 1px solid rgba(44, 52, 112, 0.08) !important;
    box-shadow: 0 20px 48px rgba(44, 52, 112, 0.08);
}

.page-title,
.section-title,
.timeline-top strong,
.detail-list-item strong,
.ticket-meta-item strong,
.ticket-description,
.search-result-row,
.quick-link-card strong,
.mini-stat-card strong,
.metric-chip strong {
    color: #1f2a56;
}

.page-kicker,
.dashboard-label,
.dashboard-pill {
    background: rgba(44, 52, 112, 0.08);
    border-color: rgba(44, 52, 112, 0.12);
    color: #2c3470;
}

.page-subtitle {
    color: #66739d;
}

.quick-link-card {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(44, 52, 112, 0.08);
    box-shadow: 0 16px 32px rgba(44, 52, 112, 0.06);
}

.quick-link-card:hover {
    background: #ffffff;
    border-color: rgba(71, 118, 255, 0.2);
    box-shadow: 0 22px 38px rgba(44, 52, 112, 0.09);
}

.quick-link-card i,
.metric-chip-icon,
.invoice-upload-icon {
    color: #2c3470;
}

.metric-chip,
.dashboard-compact-card,
.mini-stat-card,
.invoice-source-card,
.invoice-upload-card {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(44, 52, 112, 0.08);
}

.metric-chip-icon,
.invoice-upload-icon {
    background: linear-gradient(135deg, rgba(44, 52, 112, 0.12), rgba(105, 197, 255, 0.18));
}

.content-area .form-label,
.content-area .form-check-label {
    color: #27356a !important;
}

.content-area .form-control,
.content-area .form-select,
.content-area textarea.form-control {
    background: #ffffff !important;
    color: #1f2a56 !important;
    border: 1px solid rgba(44, 52, 112, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.content-area .form-control::placeholder,
.content-area textarea.form-control::placeholder {
    color: #8d97ba;
}

.content-area .form-control:focus,
.content-area .form-select:focus,
.content-area textarea.form-control:focus {
    background: #ffffff;
    color: #1f2a56;
    border-color: rgba(71, 118, 255, 0.38);
    box-shadow: 0 0 0 0.25rem rgba(71, 118, 255, 0.12);
}

.content-area .form-check-input {
    border-color: rgba(44, 52, 112, 0.2);
}

.content-area .form-check-input:checked {
    background-color: #2c3470;
    border-color: #2c3470;
}

.table-app thead th {
    color: #65719a;
    background: rgba(245, 248, 255, 0.9);
}

.table-app tbody td {
    color: #1f2a56;
    border-color: rgba(44, 52, 112, 0.08);
}

.timeline-dot {
    background: #3d7cff;
    box-shadow: 0 0 0 6px rgba(61, 124, 255, 0.12);
}

.timeline-item,
.list-row {
    border-color: rgba(44, 52, 112, 0.08);
}

.search-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(44, 52, 112, 0.08);
}

.search-result-row:last-child {
    border-bottom: 0;
}

.search-result-row:hover {
    color: #1f2a56;
}

.avatar-image,
.profile-avatar-image,
.approval-preview-media img {
    object-fit: cover;
}

.approval-preview-media {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(44, 52, 112, 0.08);
    background: rgba(245, 248, 255, 0.8);
}

.approval-preview-media img {
    display: block;
    width: 100%;
    max-height: 420px;
}

.detail-list-item-stack {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
}

.danger-zone-note,
.ticket-description,
.invoice-total-box,
.invoice-meta-card,
.ticket-meta-item {
    background: rgba(245, 248, 255, 0.78);
    border-color: rgba(44, 52, 112, 0.08);
    color: #1f2a56;
}

@media (max-width: 767.98px) {
    .auth-card {
        order: -1;
    }

    .auth-showcase {
        order: 1;
    }

    .topbar {
        margin: 0.75rem;
    }

    .content-area {
        padding-top: 0.5rem;
    }
}

/* Contrast and hover cleanup */
.app-card:hover {
    transform: none;
    box-shadow: 0 20px 48px rgba(44, 52, 112, 0.08);
}

.quick-link-card:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(44, 52, 112, 0.08);
    box-shadow: 0 16px 32px rgba(44, 52, 112, 0.06);
}

.chat-company-link:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(44, 52, 112, 0.08);
}

.chat-company-link.active {
    background: rgba(232, 240, 255, 0.96);
    border-color: rgba(71, 118, 255, 0.18);
}

.table-app tbody tr:hover {
    background: transparent;
}

.search-result-row:hover,
.notification-item:hover,
.notification-page-item:hover {
    background: transparent;
}

.app-card,
.app-card .card-body,
.app-card .card-header,
.app-card .card-footer,
.list-row,
.dashboard-compact-card,
.kanban-card,
.chat-company-link,
.message-bubble {
    color: #1f2a56;
}

.fw-semibold,
.app-card strong,
.chat-company-copy strong,
.message-meta strong,
.message-content,
.kanban-card h4,
.ticket-description {
    color: #1f2a56 !important;
}

.table-subtext,
.section-subtitle,
.timeline-top span,
.timeline-content p,
.list-row .table-subtext,
.list-row,
.chat-company-copy small,
.message-meta span,
.message-content + br,
.recommendation-item p,
.detail-list-item span {
    color: #55648d !important;
}

.dashboard-compact-card .table-subtext,
.dashboard-compact-card .fw-semibold,
.dashboard-compact-card strong,
.metric-chip span,
.metric-chip small,
.mini-stat-card span,
.mini-stat-card small {
    color: #46547d !important;
}

.content-area .kpi-card .kpi-head,
.content-area .kpi-card .kpi-trend {
    color: #46547d !important;
}

.content-area .kpi-card .kpi-value {
    color: #1f2a56 !important;
    text-shadow: none;
}

.content-area .kpi-card .kpi-icon {
    background: linear-gradient(135deg, rgba(44, 52, 112, 0.12), rgba(105, 197, 255, 0.18));
    color: #2c3470;
}

.message-bubble {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(44, 52, 112, 0.08) !important;
    box-shadow: 0 14px 28px rgba(44, 52, 112, 0.06);
}

.message-item-client .message-bubble {
    background: rgba(237, 247, 255, 0.98) !important;
    border-color: rgba(120, 185, 255, 0.2) !important;
}

.message-item-system .message-bubble {
    background: rgba(245, 248, 255, 0.98) !important;
}

.status-soft-primary {
    background: rgba(71, 118, 255, 0.12);
    color: #3156c8;
}

.status-soft-secondary {
    background: rgba(126, 137, 165, 0.14);
    color: #45516f;
}

.status-soft-success {
    background: rgba(40, 180, 120, 0.14);
    color: #1f8d62;
}

.status-soft-warning {
    background: rgba(255, 193, 92, 0.18);
    color: #9b6a00;
}

.status-soft-danger {
    background: rgba(255, 116, 145, 0.16);
    color: #b93d5d;
}

.status-soft-info {
    background: rgba(108, 214, 255, 0.18);
    color: #23769c;
}

/* Final readability polish */
.content-area {
    font-size: 1.02rem;
}

.app-breadcrumbs {
    font-size: 0.98rem;
}

.app-breadcrumbs .breadcrumb-item,
.app-breadcrumbs .breadcrumb-item a {
    color: #5f6d97 !important;
    font-weight: 600;
}

.app-breadcrumbs .breadcrumb-item.active,
.app-breadcrumbs .breadcrumb-item a:hover {
    color: #1f2a56 !important;
}

.app-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    color: #8f9bc0 !important;
}

.page-title {
    font-size: clamp(2.35rem, 3.4vw, 3.15rem);
}

.section-title {
    font-size: 1.2rem;
}

.page-subtitle,
.section-subtitle,
.table-subtext,
.timeline-content p,
.timeline-top span,
.quick-link-card span,
.mini-stat-card span,
.mini-stat-card small,
.metric-chip span,
.metric-chip small {
    font-size: 0.96rem;
}

.quick-link-card strong,
.list-row .fw-semibold,
.dashboard-compact-card strong,
.metric-chip strong,
.mini-stat-card strong,
.timeline-top strong {
    font-size: 1.04rem;
}

.content-area .btn i,
.content-area .page-action i,
.content-area .quick-link-card i,
.content-area .metric-chip-icon,
.content-area .invoice-upload-icon,
.content-area .empty-state-icon,
.content-area .list-row .btn i,
.content-area .dashboard-compact-card .btn i {
    color: #2c3470 !important;
}

/* Navigation, notification and typography updates */
html {
    font-size: 16px;
}

body,
.app-page,
.content-area,
input,
select,
textarea,
button {
    font-size: 1rem;
}

.notification-menu-header strong,
.notification-item-title,
.notification-page-meta strong {
    color: #1f2a56 !important;
}

.notification-menu-header .text-muted,
.notification-menu-header a,
.notification-item-body,
.notification-item-date,
.notification-page-item p,
.notification-page-meta span {
    color: #586894 !important;
}

.notification-item,
.notification-page-item {
    color: #23305f !important;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.sidebar-link-label {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.sidebar-link-label span:last-child {
    line-height: 1.2;
}

.sidebar-badge {
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.42rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6cc5ff, #4f7fff);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(79, 127, 255, 0.28);
    flex-shrink: 0;
}

/* Mobile sidebar and login cleanup */
.app-sidebar {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(214, 223, 255, 0.5) transparent;
}

.app-sidebar::-webkit-scrollbar {
    width: 8px;
}

.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(214, 223, 255, 0.42);
}

.brand-context,
.sidebar-glass-kicker {
    color: rgba(231, 237, 255, 0.74) !important;
}

.brand-subtitle,
.sidebar-glass-card strong,
.sidebar-link,
.sidebar-button {
    color: #f7f9ff;
}

.sidebar-glass-card p {
    color: rgba(236, 241, 255, 0.88);
}

.sidebar-link-label span:last-child {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.sidebar-link i {
    color: rgba(226, 234, 255, 0.94) !important;
}

.auth-showcase {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-showcase .auth-stat-grid {
    width: 100%;
    margin-top: 0;
}

.auth-card-logo {
    width: min(100%, 340px);
    height: auto;
    display: block;
    margin: 0 0 1.15rem;
    filter: drop-shadow(0 18px 40px rgba(103, 122, 255, 0.16));
}

.auth-card-head h2 {
    margin-top: 0;
}

.auth-card-head p {
    max-width: 29rem;
}

.auth-stage-solo {
    width: min(540px, 100%);
    display: block;
}

.auth-card-head-solo {
    text-align: center;
}

.auth-card-head-solo .auth-card-logo {
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        max-height: calc(100dvh - 24px);
        padding-bottom: 1.35rem;
    }

    .sidebar-link {
        padding: 1rem 1.05rem;
    }

    .sidebar-link-label span:last-child {
        font-size: 1rem;
    }

    .topbar {
        height: auto;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.9rem 1rem;
    }

    .topbar-left,
    .topbar-actions,
    .topbar-search {
        width: 100%;
        max-width: none;
    }

    .topbar-left,
    .topbar-actions {
        justify-content: space-between;
    }

    .topbar-search {
        order: 3;
        display: block;
    }

    .content-area {
        padding: 0.9rem 0.75rem 1.5rem;
    }

    .page-header,
    .app-card .card-header,
    .app-card .card-body,
    .app-card .card-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .page-title {
        font-size: clamp(1.85rem, 8vw, 2.45rem);
    }

    .page-subtitle,
    .dashboard-spotlight-copy p {
        max-width: none;
    }

    .dashboard-spotlight-copy h2 {
        font-size: clamp(1.8rem, 8vw, 2.45rem);
    }

    .list-row,
    .timeline-top,
    .invoice-sheet-head,
    .metric-chip {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-row .text-end,
    .timeline-top span {
        text-align: left !important;
    }

    .table-app {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-app thead,
    .table-app tbody,
    .table-app tr {
        white-space: nowrap;
    }

    .dashboard-expand-button {
        width: 100%;
        justify-content: center;
    }

    .chat-sidebar,
    .chat-main {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .auth-stage {
        gap: 1rem;
    }

    .auth-showcase {
        padding: 1rem;
    }

    .auth-stat-grid {
        grid-template-columns: 1fr;
    }

    .topbar-search {
        display: block;
    }

    .topbar-brand-mobile {
        padding: 0.35rem 0.55rem;
    }

    .topbar-brand-logo {
        width: 132px;
    }

    .page-header,
    .auth-card {
        border-radius: 24px;
    }

    .kanban-board {
        grid-template-columns: repeat(6, minmax(78vw, 1fr));
    }
}

/* Mobile sidebar interaction fix */
.app-shell {
    z-index: auto;
}

.auth-shell {
    z-index: 1;
}

.app-main {
    position: relative;
    z-index: 1;
}

.sidebar-nav {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.sidebar-footer {
    flex-shrink: 0;
}

.app-sidebar {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        height: calc(100dvh - 24px);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0.85rem 0.85rem 1rem;
    }

    .sidebar-brand {
        padding-bottom: 0.25rem;
    }

    .brand-link {
        gap: 0.5rem;
        padding: 0.75rem 0.9rem;
        border-radius: 22px;
    }

    .brand-logo-full {
        max-width: 228px;
        max-height: 60px;
    }

    .brand-context {
        font-size: 0.68rem;
    }

    .sidebar-glass-card {
        display: none;
    }

    .sidebar-nav {
        margin-top: 0.75rem;
        overflow: visible;
        flex: 0 0 auto;
    }

    .sidebar-footer {
        margin-top: 0.65rem;
    }
}

.auth-brand-logo {
    width: min(100%, 410px);
}

.brand-logo-full {
    max-width: 228px;
    max-height: 60px;
}

.topbar-brand-logo {
    width: 146px;
}

img,
iframe,
embed,
object {
    max-width: 100%;
}

@media (min-width: 992px) {
    .app-sidebar {
        overflow: hidden;
    }

    .sidebar-nav {
        overflow: visible;
        flex: 1 1 auto;
    }

    .sidebar-footer {
        margin-top: auto;
        flex-shrink: 0;
    }

    .sidebar-glass-card {
        display: block;
    }

    .brand-link {
        gap: 1rem;
        padding: 1rem;
        border-radius: 26px;
    }

    .brand-logo-full {
        max-width: 214px;
        max-height: 56px;
    }
}

/* Final sidebar and mobile responsiveness pass */
html {
    font-size: 15px;
}

body,
.app-page,
.app-main,
.content-area {
    overflow-x: hidden;
}

.content-area {
    max-width: 100%;
}

.page-header-copy,
.sidebar-link,
.sidebar-link-label,
.topbar-left,
.topbar-actions {
    min-width: 0;
}

.sidebar-link {
    justify-content: flex-start;
}

.sidebar-link-label {
    flex: 1 1 auto;
}

.sidebar-link-label span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-badge {
    margin-left: auto;
}

@media (min-width: 992px) {
    .app-sidebar {
        padding: 0.95rem 0.85rem;
    }

    .sidebar-brand {
        padding-bottom: 0.15rem;
    }

    .brand-link {
        gap: 0.55rem;
        padding: 0.82rem 0.9rem;
        border-radius: 22px;
    }

    .brand-logo-full {
        max-width: 206px;
        max-height: 52px;
    }

    .sidebar-glass-card {
        margin: 0.7rem 0 0.9rem;
        padding: 0.9rem 0.95rem;
        border-radius: 22px;
    }

    .sidebar-nav {
        margin-top: 0.8rem;
        gap: 0.38rem;
        flex: 0 0 auto;
    }

    .sidebar-footer {
        margin-top: 0.7rem;
        padding-top: 0.7rem;
        gap: 0.38rem;
    }

    .sidebar-link {
        padding: 0.72rem 0.85rem;
        border-radius: 18px;
    }

    .sidebar-link-label {
        gap: 0.72rem;
    }

    .sidebar-link-label span:last-child {
        font-size: 0.95rem;
    }
}

@media (max-width: 991.98px) {
    .topbar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        height: auto;
        margin: 0.6rem;
        padding: 0.7rem 0.85rem;
        gap: 0.65rem;
        overflow: hidden;
    }

    .topbar-left {
        display: contents;
    }

    .topbar-toggle {
        grid-column: 1;
    }

    .topbar-brand-mobile {
        grid-column: 2;
        justify-self: start;
        max-width: 100%;
        padding: 0.3rem 0.5rem;
        border-radius: 14px;
    }

    .topbar-brand-logo {
        width: 126px;
    }

    .topbar-actions {
        grid-column: 3;
        width: auto;
        margin-left: 0;
        gap: 0.45rem;
    }

    .topbar-search {
        display: none !important;
    }

    .profile-toggle {
        padding: 0.32rem 0.42rem;
    }

    .profile-toggle .profile-meta,
    .profile-toggle .bi-chevron-down {
        display: none !important;
    }

    .icon-button,
    .topbar-toggle,
    .notification-toggle {
        width: 40px;
        height: 40px;
    }

    .app-sidebar {
        width: min(286px, calc(100vw - 24px));
        padding: 0.75rem;
        border-radius: 24px;
    }

    .brand-link {
        gap: 0.4rem;
        padding: 0.7rem 0.78rem;
        border-radius: 18px;
    }

    .brand-logo-full {
        max-width: 172px;
        max-height: 42px;
    }

    .brand-context {
        font-size: 0.66rem;
    }

    .sidebar-nav,
    .sidebar-footer {
        gap: 0.44rem;
    }

    .sidebar-link {
        min-height: 50px;
        padding: 0.76rem 0.82rem;
        border-radius: 16px;
    }

    .sidebar-link-label {
        gap: 0.68rem;
    }

    .sidebar-link-label span:last-child {
        font-size: 0.94rem;
    }

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

    .sidebar-footer {
        margin-top: 0.55rem;
        padding-top: 0.55rem;
    }

    .content-area {
        padding: 0.8rem 0.7rem 1.4rem;
    }

    .content-area > * {
        max-width: 100%;
    }

    .page-header {
        padding: 0.95rem;
        margin-bottom: 1rem;
        border-radius: 20px;
    }

    .page-title {
        font-size: clamp(1.65rem, 7vw, 2.15rem);
    }

    .section-title {
        font-size: 1.08rem;
    }

    .page-subtitle,
    .section-subtitle,
    .table-subtext,
    .timeline-content p,
    .timeline-top span,
    .quick-link-card span,
    .mini-stat-card span,
    .mini-stat-card small,
    .metric-chip span,
    .metric-chip small {
        font-size: 0.92rem;
    }

    .metric-mini-grid,
    .quick-link-grid,
    .metric-strip,
    .shortcut-grid,
    .chat-shell,
    .ticket-meta-grid,
    .invoice-meta-grid {
        grid-template-columns: 1fr !important;
    }

    .kanban-board {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .kanban-column {
        min-width: 0;
    }

    .list-row,
    .timeline-top,
    .invoice-sheet-head,
    .metric-chip {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-row .text-end,
    .timeline-top span {
        text-align: left !important;
    }

    .table-app {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-app thead,
    .table-app tbody,
    .table-app tr {
        white-space: nowrap;
    }
}

/* Mobile topbar and overflow hardening */
@media (max-width: 991.98px) {
    .topbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 0.55rem;
        margin: 0.55rem;
        padding: 0.7rem 0.8rem;
        position: sticky;
        top: 0.4rem;
        z-index: 1080;
        overflow: visible !important;
    }

    .topbar-left {
        display: flex !important;
        align-items: center;
        gap: 0.55rem;
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-toggle {
        flex: 0 0 auto;
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .topbar-brand-mobile {
        grid-column: auto;
        justify-self: auto;
        flex: 0 1 auto;
        max-width: calc(100vw - 180px);
        padding: 0.28rem 0.5rem;
    }

    .topbar-brand-logo {
        width: 124px;
    }

    .topbar-actions {
        width: auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 0 0 auto;
        margin-left: 0;
        position: relative;
        z-index: 1082;
    }

    .topbar-actions .dropdown {
        position: relative;
        z-index: 1083;
    }

    .notification-toggle,
    .profile-toggle {
        width: 44px;
        height: 44px;
        min-width: 44px;
        padding: 0;
        justify-content: center;
    }

    .topbar-search {
        display: none !important;
    }

    .notification-menu,
    .topbar .dropdown-menu {
        max-width: calc(100vw - 1rem);
    }

    .row > *,
    [class*="col-"] {
        min-width: 0;
    }

    .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Dashboard/sidebar final alignment */
.sidebar-brand {
    text-align: left;
}

.brand-link {
    justify-items: start;
    align-items: start;
}

.brand-logo-full {
    width: min(100%, 214px);
    justify-self: start;
    object-position: left center;
}

@media (max-width: 991.98px) {
    .brand-logo-full {
        width: min(100%, 172px);
    }
}
