﻿@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap");

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
    height: 100%;
    margin: 0;
}

body {
  margin-bottom: 0;
  background: radial-gradient(circle at top left, #f6eee1 0%, #fefcf7 45%, #eef6f4 100%);
  color: var(--ink);
}


.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

h4 {
    text-align: center;
}

.rightalign {
    text-align: right;
}

:root {
    --auth-ink: #0f1f1d;
    --auth-muted: #4f5c5a;
    --auth-accent: #1f6f66;
    --auth-accent-strong: #0f514b;
    --auth-sand: #f2efe9;
    --auth-peach: #f6c9a6;
    --auth-cream: #fbfaf6;
    --auth-shadow: 0 25px 60px rgba(15, 31, 29, 0.18);
    --surface: #ffffff;
    --surface-muted: #f7f7f7;
    --ink: #0f1f1d;
    --ink-muted: #4f5c5a;
    --border: rgba(15, 31, 29, 0.12);
    --chart-bg: #f1ecff;
}

.auth-page {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px 24px;
    width: 100%;
}

.auth-card {
    width: min(900px, 96%);
    background: var(--auth-cream);
    border-radius: 24px;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    border: 1px solid rgba(15, 31, 29, 0.08);
}

.auth-card-compact {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    width: min(760px, 96%);
}

.auth-hero {
    padding: 28px 32px 24px;
    background: linear-gradient(160deg, #f4d7bf 0%, #f7efe3 40%, #e2f0ed 100%);
    border-right: 1px solid rgba(15, 31, 29, 0.08);
}

.auth-hero-compact {
    padding: 28px 32px;
}

.auth-brand {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--auth-accent-strong);
    margin-bottom: 18px;
}

.auth-hero h1 {
    font-family: "Fraunces", serif;
    font-size: clamp(2rem, 3vw, 2.75rem);
    color: var(--auth-ink);
    margin-bottom: 12px;
}

.auth-hero p {
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--auth-muted);
    font-size: 1.02rem;
}

.auth-metrics {
    margin-top: 28px;
    display: grid;
    gap: 14px;
}

.auth-metric {
    background: rgba(255, 255, 255, 0.78);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(15, 31, 29, 0.08);
}

.auth-metric-label {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-metric-value {
    font-family: "Fraunces", serif;
    font-size: 1.2rem;
    color: var(--auth-accent-strong);
}

.auth-checklist {
    margin-top: 24px;
    padding-left: 18px;
    color: var(--auth-muted);
    font-family: "IBM Plex Sans", sans-serif;
    line-height: 1.6;
}

.auth-form {
    padding: 28px 32px;
    background: var(--auth-cream);
}

.auth-form h2 {
    font-family: "Fraunces", serif;
    color: var(--auth-ink);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--auth-muted);
    margin-bottom: 24px;
}

.auth-form .form-label {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    color: var(--auth-ink);
}

.auth-form .form-control {
    border-radius: 12px;
    border: 1px solid rgba(15, 31, 29, 0.15);
    padding: 10px 12px;
    font-family: "IBM Plex Sans", sans-serif;
}

.auth-form .form-control:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 0.15rem rgba(31, 111, 102, 0.2);
}

.auth-primary {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 12px;
}

.auth-primary:hover {
    background: var(--auth-accent-strong);
    border-color: var(--auth-accent-strong);
}

.auth-link {
    color: var(--auth-accent-strong);
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 18px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--auth-muted);
}

.auth-body header .navbar,
header .navbar {
    background-color: transparent !important;
    border-color: rgba(15, 31, 29, 0.12) !important;
    box-shadow: none !important;
}

.auth-body header .navbar .navbar-brand,
.auth-body header .navbar .nav-link,
header .navbar .navbar-brand,
header .navbar .nav-link {
    color: var(--auth-ink) !important;
}

footer {
    background: transparent;
}

body.theme-dark {
    background: radial-gradient(circle at top left, #1a2423 0%, #121816 45%, #0d1211 100%);
    color: #e6f0ee;
}

body.theme-dark .navbar,
body.theme-dark header .navbar {
    background-color: transparent !important;
    border-color: rgba(230, 240, 238, 0.18) !important;
}

body.theme-dark .navbar .nav-link,
body.theme-dark .navbar .navbar-brand {
    color: #e6f0ee !important;
}

body.theme-dark .card,
body.theme-dark .dropdown-menu,
body.theme-dark .table,
body.theme-dark .modal-content {
    background-color: #141d1c;
    color: #e6f0ee;
    border-color: rgba(230, 240, 238, 0.12);
}

body.theme-dark .table {
    --bs-table-bg: #141d1c;
    --bs-table-striped-bg: #192221;
    --bs-table-color: #e6f0ee;
    --bs-table-striped-color: #e6f0ee;
    --bs-table-border-color: rgba(230, 240, 238, 0.12);
}

body.theme-dark .table-light {
    --bs-table-bg: #1c2625;
    --bs-table-border-color: rgba(230, 240, 238, 0.12);
    color: #e6f0ee;
}

body.theme-dark .table {
    color: #e6f0ee;
}

body.theme-dark .table > :not(caption) > * > * {
    background-color: #141d1c;
    color: #e6f0ee;
}

body.theme-dark .table thead th,
body.theme-dark .table thead td {
    background-color: #172120;
    color: #e6f0ee;
}

body.theme-dark .table tbody tr,
body.theme-dark .table tbody td,
body.theme-dark .table tbody th {
    background-color: #141d1c !important;
    color: #e6f0ee !important;
}

body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #192221 !important;
    color: #e6f0ee !important;
}

body.theme-dark .table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #141d1c !important;
    color: #e6f0ee !important;
}

body.theme-dark .pagination .page-link {
    background-color: #1b2625;
    color: #e6f0ee;
    border-color: rgba(230, 240, 238, 0.2);
}

body.theme-dark .pagination .page-item.active .page-link {
    background-color: #2a3a39;
    border-color: #2a3a39;
}


body.theme-dark .footer,
body.theme-dark footer {
    color: #b5c2bf !important;
}

body.theme-dark .footer *,
body.theme-dark footer * {
    color: #b5c2bf !important;
}

body.theme-dark .text-muted,
body.theme-dark .text-secondary,
body.theme-dark .subtitle,
body.theme-dark .small,
body.theme-dark .form-text {
    color: #b5c2bf !important;
}

body.theme-dark .company-name,
body.theme-dark .company-initials,
body.theme-dark .user-initials,
body.theme-dark .dropdown-header,
body.theme-dark .dropdown-header small {
    color: #e6f0ee !important;
}

body.theme-dark .company-badge,
body.theme-dark .notification-bell {
    background: rgba(230, 240, 238, 0.08);
    border-color: rgba(230, 240, 238, 0.2);
}

body.theme-dark .notification-bell svg {
    fill: #e6f0ee;
}

body.theme-dark .notification-count,
body.theme-dark .notification-dot {
    border-color: #101b18;
}

body.theme-dark .notification-menu {
    background: #13211e;
    border-color: rgba(99, 230, 190, 0.18);
}

body.theme-dark .notification-header {
    background: linear-gradient(135deg, rgba(25, 129, 113, 0.26), rgba(99, 230, 190, 0.1));
    border-bottom-color: rgba(99, 230, 190, 0.16);
    color: #f3fff9;
}

body.theme-dark .notification-header small,
body.theme-dark .notification-view-all,
body.theme-dark .notification-message,
body.theme-dark .notification-time,
body.theme-dark .notification-empty {
    color: #a9c7bd;
}

body.theme-dark .notification-item {
    background: #13211e;
    border-bottom-color: rgba(99, 230, 190, 0.12);
}

body.theme-dark .notification-item.is-read {
    background: rgba(255, 255, 255, 0.025);
}

body.theme-dark .notification-title {
    color: #f3fff9;
}

body.theme-dark .notification-priority {
    background: rgba(99, 230, 190, 0.14);
    color: #63e6be;
}

body.theme-dark .notification-footer {
    background: #13211e;
    border-top-color: rgba(99, 230, 190, 0.12);
}

body.theme-dark .notification-list-card,
body.theme-dark .notification-row {
    background: #13211e;
    border-color: rgba(99, 230, 190, 0.12);
}

body.theme-dark .notification-row.is-read,
body.theme-dark .notification-row.is-dismissed {
    background: rgba(255, 255, 255, 0.025);
}

body.theme-dark .notification-row-title,
body.theme-dark .notification-empty-state h5 {
    color: #f3fff9;
}

body.theme-dark .notification-row-meta,
body.theme-dark .notification-row-message,
body.theme-dark .notification-empty-state {
    color: #a9c7bd;
}

body.theme-dark .notification-row-icon,
body.theme-dark .notification-empty-icon {
    background: rgba(99, 230, 190, 0.14);
    color: #63e6be;
}
body.theme-dark .auth-card,
body.theme-dark .auth-form,
body.theme-dark .auth-hero,
body.theme-dark .auth-metric,
body.theme-dark .auth-metric-label,
body.theme-dark .auth-metric-value,
body.theme-dark .auth-hero h1,
body.theme-dark .auth-hero p,
body.theme-dark .auth-form h2,
body.theme-dark .auth-subtitle,
body.theme-dark .auth-form .form-label,
body.theme-dark .auth-link,
body.theme-dark .auth-footer {
    color: #e6f0ee !important;
}

body.theme-dark .auth-card,
body.theme-dark .auth-form {
    background: #141d1c;
    border-color: rgba(230, 240, 238, 0.12);
}

body.theme-dark .auth-hero {
    background: linear-gradient(160deg, #1f2a29 0%, #182221 45%, #121a19 100%);
    border-color: rgba(230, 240, 238, 0.12);
}

body.theme-dark .auth-metric {
    background: rgba(15, 22, 21, 0.7);
    border-color: rgba(230, 240, 238, 0.12);
}

body.theme-dark .auth-form .form-control {
    background: #1b2625;
    color: #e6f0ee;
    border-color: rgba(230, 240, 238, 0.2);
}

body.theme-dark .btn-close {
    filter: invert(1) grayscale(100%);
}

body.theme-dark a {
    color: #8fd4c7;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .selectpicker,
body.theme-dark .dropdown-item {
    background-color: #1b2625;
    color: #e6f0ee;
    border-color: rgba(230, 240, 238, 0.2);
}

body.theme-dark .bootstrap-select > .dropdown-toggle,
body.theme-dark .bootstrap-select .dropdown-menu {
    background-color: #1b2625;
    color: #e6f0ee;
    border-color: rgba(230, 240, 238, 0.2);
}

body.theme-dark .bootstrap-select .dropdown-menu .dropdown-item {
    color: #e6f0ee;
}

body.theme-dark .bootstrap-select .dropdown-menu .dropdown-item.active,
body.theme-dark .bootstrap-select .dropdown-menu .dropdown-item:active,
body.theme-dark .bootstrap-select .dropdown-menu .dropdown-item:hover {
    background-color: #243030;
    color: #e6f0ee;
}

body.theme-dark .bootstrap-select .dropdown-menu .bs-searchbox .form-control {
    background-color: #1f2a29;
    color: #e6f0ee;
    border-color: rgba(230, 240, 238, 0.25);
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
    background-color: #243030;
}

body.theme-dark .dropdown-item-text {
    color: #e6f0ee;
}

body.theme-dark .footer {
    color: #b5c2bf;
}

body.theme-dark .kpi-gradient-card::after {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .chart-card {
    background: #1a2027;
}

body.theme-dark {
    --chart-bg: #1a2027;
}

.doc-summary-card {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #24736b 0%, #67c3b3 100%);
    box-shadow: 0 18px 35px rgba(31, 60, 57, 0.2);
    position: relative;
    z-index: 1;
}

.doc-summary-card h5 {
    font-family: "Fraunces", serif;
}

.doc-summary-list {
    display: grid;
    gap: 10px;
}

.doc-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.doc-summary-name {
    font-weight: 600;
}

.doc-summary-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.doc-summary-pill {
    background: rgba(15, 30, 28, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.doc-summary-badge {
    background: rgba(15, 30, 28, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

body.theme-dark .doc-summary-card {
    background: linear-gradient(135deg, #0f4d46 0%, #2b7f73 100%);
    box-shadow: 0 18px 35px rgba(8, 16, 15, 0.45);
}

.chart-card {
    margin-bottom: 18px;
    position: relative;
    z-index: 0;
}

.kpi-plan-table {
    min-width: 1600px;
}

.kpi-plan-table .form-control-sm {
    min-width: 7ch;
}

footer.border-top,
footer .border-top {
    border-color: rgba(15, 31, 29, 0.12) !important;
}

.auth-body .footer {
    position: static !important;
    line-height: normal;
}

.footer {
    padding: 12px 0;
}

.page-scroll .footer {
    position: static !important;
    line-height: normal !important;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(31, 111, 102, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(31, 111, 102, 0.25);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-initials {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    color: var(--auth-accent-strong);
    font-size: 0.85rem;
}

.notification-bell {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(31, 111, 102, 0.08);
    border: 1px solid rgba(31, 111, 102, 0.2);
    padding: 0;
    cursor: pointer;
}

.notification-bell svg {
    width: 20px;
    height: 20px;
    fill: var(--auth-accent-strong);
}

.notification-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e03a3a;
    border: 2px solid #fff;
}

.notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e03a3a;
    color: #fff;
    border: 2px solid #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.notification-menu {
    width: min(360px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(31, 122, 109, 0.14), rgba(68, 176, 158, 0.12));
    border-bottom: 1px solid rgba(31, 111, 102, 0.14);
    font-weight: 700;
    color: var(--auth-ink);
}

.notification-header > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-header small {
    color: var(--auth-muted);
    font-weight: 600;
}

.notification-view-all {
    color: #0d6efd;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.notification-list {
    max-height: 380px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15, 31, 29, 0.08);
    background: #fff;
}

.notification-item.is-read {
    background: rgba(15, 31, 29, 0.025);
    opacity: 0.78;
}

.notification-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.notification-title {
    font-weight: 700;
    color: var(--auth-ink);
}

.notification-priority {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(31, 122, 109, 0.12);
    color: var(--auth-accent-strong);
    font-size: 0.72rem;
    font-weight: 700;
}

.notification-message {
    margin-top: 6px;
    color: var(--auth-muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.notification-time {
    margin-top: 5px;
    color: rgba(72, 86, 82, 0.78);
    font-size: 0.72rem;
    font-weight: 600;
}

.notification-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.notification-actions .btn-link {
    padding: 0;
    font-weight: 700;
    text-decoration: none;
}

.notification-empty {
    padding: 18px 16px;
    color: var(--auth-muted);
    text-align: center;
}

.notification-footer {
    padding: 12px 16px;
    background: rgba(31, 111, 102, 0.035);
    border-top: 1px solid rgba(31, 111, 102, 0.1);
}

.notification-list-card .list-group-item:last-child {
    border-bottom: 0;
}

.notification-row {
    padding: 16px 18px;
    background: #fff;
}

.notification-row.is-read,
.notification-row.is-dismissed {
    opacity: 0.82;
}

.notification-row-icon,
.notification-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(31, 111, 102, 0.1);
    color: var(--auth-accent-strong);
    flex: 0 0 auto;
}

.notification-row-title {
    color: var(--auth-ink);
    font-weight: 700;
}

.notification-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--auth-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.notification-row-message {
    color: var(--auth-muted);
    line-height: 1.45;
}

.notification-empty-state h5 {
    color: var(--auth-ink);
    font-weight: 700;
}
.company-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    background: rgba(31, 111, 102, 0.08);
    border: 1px solid rgba(31, 111, 102, 0.2);
    max-width: 260px;
    white-space: normal;
    height: 42px;
}

.company-logo {
    /*width: 42px;
    height: 42px;
    border-radius: 50%;*/
    background: rgba(31, 111, 102, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .company-logo img {
       /* width: 100%;
        height: 100%;
        object-fit: cover;*/
        width: 45px;
        max-width: 100%;
        height: auto;
        display: block;
    }

.company-initials {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    color: var(--auth-accent-strong);
    font-size: 0.8rem;
}

.company-name {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    color: var(--auth-ink);
    font-size: 0.9rem;
    max-width: 200px;
    white-space: normal;
    overflow: visible;
}

.live-chat {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 1080;
    font-family: "IBM Plex Sans", sans-serif;
}

.live-chat-toggle {
    position: relative;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: #1f6f66;
    color: #fff;
    box-shadow: 0 18px 36px rgba(15, 31, 29, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.live-chat-toggle:hover,
.live-chat-toggle:focus {
    background: #0f514b;
    color: #fff;
}

.live-chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e03a3a;
    color: #fff;
    border: 2px solid #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 18px;
}

.live-chat-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: min(680px, calc(100vw - 28px));
    height: min(520px, calc(100vh - 120px));
    background: #fff;
    border: 1px solid rgba(15, 31, 29, 0.12);
    border-radius: 8px;
    box-shadow: 0 24px 56px rgba(15, 31, 29, 0.24);
    overflow: hidden;
}

.live-chat-header {
    height: 62px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(31, 111, 102, 0.12), rgba(68, 176, 158, 0.1));
    border-bottom: 1px solid rgba(31, 111, 102, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.live-chat-title {
    color: var(--auth-ink);
    font-weight: 700;
}

.live-chat-header small {
    color: var(--auth-muted);
    font-weight: 600;
}

.live-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-chat-status-select {
    width: 142px;
    border-radius: 8px;
    border-color: rgba(31, 111, 102, 0.22);
    color: var(--auth-ink);
    font-weight: 700;
}

.live-chat-icon-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(31, 111, 102, 0.1);
    color: var(--auth-accent-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.live-chat-body {
    height: calc(100% - 62px);
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.live-chat-users {
    border-right: 1px solid rgba(15, 31, 29, 0.1);
    background: rgba(31, 111, 102, 0.035);
    min-width: 0;
}

.live-chat-section-title {
    padding: 12px 14px 8px;
    color: var(--auth-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-chat-user-list {
    max-height: calc(100% - 42px);
    overflow-y: auto;
}

.live-chat-user {
    width: 100%;
    min-height: 58px;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    color: var(--auth-ink);
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.live-chat-user:hover,
.live-chat-user.is-active {
    background: rgba(31, 111, 102, 0.1);
}

.live-chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #dcefeb;
    color: #0f514b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
}

.live-chat-user-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.live-chat-user-name {
    color: var(--auth-ink);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-user-state {
    color: #1f7a52;
    font-size: 0.76rem;
    font-weight: 700;
}

.live-chat-avatar.is-online,
.live-chat-user-state.is-online {
    color: #1f7a52;
}

.live-chat-avatar.is-online {
    background: #dff4e8;
}

.live-chat-avatar.is-busy,
.live-chat-user-state.is-busy {
    color: #b26a00;
}

.live-chat-avatar.is-busy {
    background: #fff0d6;
}

.live-chat-avatar.is-dnd,
.live-chat-user-state.is-dnd {
    color: #c93636;
}

.live-chat-avatar.is-dnd {
    background: #ffe3e3;
}

.live-chat-avatar.is-offline,
.live-chat-user-state.is-offline {
    color: #6c757d;
}

.live-chat-avatar.is-offline {
    background: #e9ecef;
}

.live-chat-conversation {
    min-width: 0;
    display: grid;
    grid-template-rows: 48px minmax(0, 1fr) 54px;
}

.live-chat-conversation-header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 31, 29, 0.1);
    color: var(--auth-ink);
    font-weight: 700;
}

.live-chat-messages {
    padding: 14px;
    overflow-y: auto;
    background: #fbfcfb;
}

.live-chat-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 10px;
}

.live-chat-message.is-mine {
    align-items: flex-end;
}

.live-chat-bubble {
    max-width: min(78%, 360px);
    padding: 8px 11px;
    border-radius: 8px;
    background: #eef4f3;
    color: var(--auth-ink);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.live-chat-message.is-mine .live-chat-bubble {
    background: #1f6f66;
    color: #fff;
}

.live-chat-time {
    color: var(--auth-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.live-chat-form {
    padding: 10px;
    border-top: 1px solid rgba(15, 31, 29, 0.1);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    background: #fff;
}

.live-chat-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.live-chat-empty {
    padding: 16px;
    color: var(--auth-muted);
    font-size: 0.88rem;
    text-align: center;
}

body.theme-dark .live-chat-panel,
body.theme-dark .live-chat-form {
    background: #141d1c;
    border-color: rgba(230, 240, 238, 0.14);
}

body.theme-dark .live-chat-header {
    background: linear-gradient(135deg, rgba(31, 111, 102, 0.26), rgba(68, 176, 158, 0.1));
    border-color: rgba(230, 240, 238, 0.12);
}

body.theme-dark .live-chat-title,
body.theme-dark .live-chat-conversation-header,
body.theme-dark .live-chat-user-name,
body.theme-dark .live-chat-user {
    color: #e6f0ee;
}

body.theme-dark .live-chat-header small,
body.theme-dark .live-chat-empty,
body.theme-dark .live-chat-time {
    color: #a9c7bd;
}

body.theme-dark .live-chat-users,
body.theme-dark .live-chat-messages {
    background: #13211e;
}

body.theme-dark .live-chat-bubble {
    background: #20302d;
    color: #e6f0ee;
}

body.theme-dark .live-chat-message.is-mine .live-chat-bubble {
    background: #24736b;
    color: #fff;
}

body.theme-dark .live-chat-user:hover,
body.theme-dark .live-chat-user.is-active,
body.theme-dark .live-chat-icon-btn {
    background: rgba(230, 240, 238, 0.08);
}

body.theme-dark .live-chat-status-select {
    background-color: #1b2625;
    border-color: rgba(230, 240, 238, 0.2);
    color: #e6f0ee;
}

body.theme-dark .live-chat-avatar.is-online {
    background: rgba(42, 171, 107, 0.16);
}

body.theme-dark .live-chat-avatar.is-busy {
    background: rgba(255, 176, 32, 0.16);
}

body.theme-dark .live-chat-avatar.is-dnd {
    background: rgba(230, 64, 64, 0.16);
}

body.theme-dark .live-chat-avatar.is-offline {
    background: rgba(230, 240, 238, 0.1);
}

@media (max-width: 992px) {
    .auth-card,
    .auth-card-compact {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        border-right: none;
        border-bottom: 1px solid rgba(15, 31, 29, 0.08);
    }
}

@media (max-width: 640px) {
    .live-chat {
        right: 14px;
        bottom: 14px;
    }

    .live-chat-panel {
        height: min(620px, calc(100vh - 92px));
    }

    .live-chat-body {
        grid-template-columns: 1fr;
        grid-template-rows: 150px minmax(0, 1fr);
    }

    .live-chat-users {
        border-right: 0;
        border-bottom: 1px solid rgba(15, 31, 29, 0.1);
    }

    .live-chat-user-list {
        display: flex;
        max-height: 108px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .live-chat-user {
        width: 180px;
        flex: 0 0 180px;
    }
}

