:root {
    --lcg-blue: #315cf6;
    --lcg-blue-dark: #2548c7;
    --lcg-bg: #f4f7fb;
    --lcg-heading: #111827;
    --lcg-text: #273447;
    --lcg-muted: #687789;
    --lcg-border: #dbe4ef;
    --lcg-success: #0f9b7a;
    --lcg-warning: #c87914;
    --lcg-danger: #e05264;
}

body,
.header,
.sidebar,
.main {
    font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: var(--lcg-bg);
}

.lcg-page {
    padding-top: 22px;
}

.sidebar-logo-name,
.header-logo span:last-child {
    letter-spacing: -0.03em;
}

.sidebar-logo-mark,
.header-logo-mark {
    background: #eef3ff !important;
}

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

.lcg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
    color: var(--lcg-blue);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.lcg-page-title {
    margin: 0;
    color: var(--lcg-heading);
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.lcg-page-subtitle {
    max-width: 760px;
    margin: 0.55rem 0 0;
    color: var(--lcg-muted);
    line-height: 1.6;
}

.lcg-card {
    border: 1px solid var(--lcg-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.04);
}

.lcg-card .card-header {
    border-bottom: 1px solid #edf2f8;
    background: #ffffff;
    padding: 1rem 1.1rem;
    border-radius: 18px 18px 0 0;
}

.lcg-card .card-body {
    padding: 1.1rem;
}

.lcg-stat-card {
    position: relative;
    min-height: 126px;
    overflow: hidden;
}

.lcg-stat-card .stat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef3ff;
    color: var(--lcg-blue);
    font-size: 1.25rem;
}

.lcg-stat-card span {
    display: block;
    margin-top: 0.85rem;
    color: var(--lcg-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lcg-stat-card strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--lcg-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.lcg-filter-bar {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto auto;
    gap: 0.75rem;
    align-items: end;
}

.form-label {
    color: var(--lcg-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.form-control,
.form-select {
    border-color: var(--lcg-border);
    border-radius: 12px;
    min-height: 42px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--lcg-blue);
    box-shadow: 0 0 0 0.2rem rgba(49, 92, 246, 0.12);
}

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

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

.btn-primary:hover {
    background: var(--lcg-blue-dark);
    border-color: var(--lcg-blue-dark);
}

.table thead th {
    color: var(--lcg-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    background: #f8fbff;
}

.table td {
    color: var(--lcg-text);
    vertical-align: middle;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.36rem 0.62rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}

.status-active,
.status-approved,
.status-paid,
.status-posted,
.status-verified,
.status-unused,
.status-fully_paid {
    color: var(--lcg-success);
    background: #e9fbf6;
    border-color: #c9f3e8;
}

.status-pending,
.status-pending_approval,
.status-unpaid,
.status-partial,
.status-reserved,
.status-overdue {
    color: var(--lcg-warning);
    background: #fff7e8;
    border-color: #f7e2bd;
}

.status-rejected,
.status-cancelled,
.status-expired,
.status-void,
.status-inactive,
.status-delinquent,
.status-no_show {
    color: var(--lcg-danger);
    background: #fff0f3;
    border-color: #ffd6de;
}

.status-locked {
    color: #687789;
    background: #f1f5f9;
    border-color: #dde7f1;
}

.lcg-auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, rgba(49, 92, 246, .14), transparent 28%), #f4f7fb;
}

.lcg-auth-card {
    width: min(430px, calc(100vw - 2rem));
    border: 1px solid var(--lcg-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(17, 24, 39, .08);
    padding: 2rem;
}

.public-hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f4f7fb, #eef3ff);
}

@media (max-width: 992px) {
    .lcg-page-header,
    .lcg-filter-bar {
        display: block;
    }

    .lcg-filter-bar > * {
        margin-bottom: .75rem;
    }
}

/* LCG compact module UI refresh - 2026-07-09 */
body:not(.lcg-auth-body),
body.member-body {
    font-size: 14px;
    color: #1f2937;
}

body:not(.lcg-auth-body) .main,
body:not(.lcg-auth-body) .member-content,
body:not(.lcg-auth-body) .lcg-page {
    line-height: 1.45;
}

.lcg-page {
    padding-top: 14px;
}

.lcg-page-header {
    margin-bottom: 1rem;
    gap: .8rem;
}

.lcg-kicker,
.member-workspace-label,
.sidebar-logo-label,
.nav-heading,
.form-label,
.lcg-stat-card span {
    font-size: .68rem !important;
    letter-spacing: .08em;
}

.lcg-page-title {
    font-size: clamp(1.35rem, 2.2vw, 1.95rem) !important;
    letter-spacing: -.035em;
}

.lcg-page-subtitle {
    margin-top: .35rem;
    font-size: .86rem;
    line-height: 1.45;
}

.lcg-card {
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(17, 24, 39, .045);
}

.lcg-card .card-header {
    padding: .78rem .95rem;
    border-radius: 14px 14px 0 0;
}

.lcg-card .card-body {
    padding: .9rem;
}

.card-header h5,
.card-header h6,
.lcg-card h5,
.lcg-card h6 {
    font-size: .98rem;
}

.lcg-stat-card {
    min-height: 104px;
}

.lcg-stat-card .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 1rem;
}

.lcg-stat-card strong,
.lcg-card h3,
.lcg-card h4,
.lcg-card h5 {
    letter-spacing: -.02em;
}

.lcg-card h3 {
    font-size: 1.35rem;
}

.table,
.table > :not(caption) > * > * {
    font-size: .82rem;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: .55rem .65rem;
}

.table thead th {
    font-size: .68rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #667085;
    background: #f8fafc;
}

.form-control,
.form-select,
.btn,
.dropdown-menu,
.alert,
.badge,
.status-badge {
    font-size: .82rem;
}

.form-control,
.form-select {
    min-height: 38px;
    padding: .45rem .65rem;
    border-radius: 10px;
}

textarea.form-control {
    min-height: 82px;
}

.btn {
    padding: .43rem .72rem;
    border-radius: 10px;
    font-weight: 700;
}

.btn-sm {
    padding: .28rem .5rem;
    font-size: .74rem;
    border-radius: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .26rem .5rem;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1.1;
}

.status-cancelled {
    color: #b42318 !important;
    background: #fff1f0 !important;
    border-color: #fecaca !important;
}

.header {
    min-height: 64px;
}

.header-logo-mark,
.sidebar-logo-mark {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
}

.header-logo span:last-child,
.sidebar-logo-name {
    font-size: .95rem !important;
}

.header-context strong,
.user-name strong {
    font-size: .82rem;
}

.header-context span,
.user-name small {
    font-size: .68rem;
}

.sidebar {
    font-size: .86rem;
}

.nav-link,
.sidebar .nav-link,
.sidebar-nav a {
    font-size: .84rem !important;
    padding-top: .68rem !important;
    padding-bottom: .68rem !important;
}

.nav-link i,
.sidebar-nav a i {
    font-size: 1rem !important;
}

.member-sidebar {
    width: 280px !important;
    padding: 16px 14px !important;
}

.member-main {
    margin-left: 280px !important;
}

.member-topbar {
    height: 64px !important;
    padding: 0 20px !important;
}

.member-content {
    padding: 20px !important;
}

.member-brand {
    padding-bottom: 16px !important;
    margin-bottom: 12px !important;
}

.member-brand img {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
}

.member-brand strong {
    font-size: .98rem !important;
}

.member-nav {
    gap: 5px !important;
}

.member-nav a {
    padding: 9px 10px !important;
    border-radius: 12px !important;
    font-size: .84rem !important;
}

.member-nav a i {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
}

.member-workspace-title {
    font-size: .95rem !important;
}

.member-avatar {
    width: 38px !important;
    height: 38px !important;
    font-size: .85rem !important;
}

@media (max-width: 991px) {
    .member-main {
        margin-left: 0 !important;
    }

    .member-content {
        padding: 16px !important;
    }
}

/* Complete system automation compact refinements */
.lcg-mini-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef4ff;
    color: #315df3;
    font-size: 1.05rem;
}
.lcg-message-pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid #e5edf8;
    border-radius: 10px;
    padding: .65rem .75rem;
    font-family: inherit;
    font-size: .78rem;
    line-height: 1.38;
    color: #334155;
    max-height: 190px;
    overflow: auto;
}
.lcg-page .table th,
.lcg-page .table td {
    font-size: .82rem;
}
.lcg-page .card-header h5,
.lcg-page .card-header h6 {
    font-size: .96rem;
}
.lcg-page .form-label,
.lcg-page .btn,
.lcg-page .badge,
.lcg-page .small,
.lcg-page small {
    font-size: .78rem;
}
.lcg-page .lcg-page-title {
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
}
