:root {
    --crm-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --crm-font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --crm-radius: 12px;
}

html, body {
    font-family: var(--crm-font-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
    font-family: var(--crm-font-heading);
    letter-spacing: -0.015em;
}

/* ==================== GLASSMORPHISM LOGIN BACKDROP ==================== */
.glass-login-backdrop,
.glass-login-backdrop.light-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, #141922 0%, #06080c 62%, #000000 100%);
}

.glass-login-backdrop::before {
    content: "";
    position: absolute;
    inset: 10px;
    background-image: url('images/mansys-login-bg.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.22));
    opacity: 0.90;
    pointer-events: none;
    z-index: 1;
}

.glass-login-card,
.glass-login-backdrop.light-backdrop .glass-login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 24px !important;
    padding: 36px 34px;
    background: linear-gradient(
        135deg,
        rgba(18, 24, 38, 0.62) 0%,
        rgba(10, 14, 24, 0.50) 100%
    ) !important;
    backdrop-filter: blur(18px) saturate(175%);
    -webkit-backdrop-filter: blur(18px) saturate(175%);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 28px 65px rgba(0, 0, 0, 0.72),
        0 8px 24px rgba(0, 0, 0, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.28),
        inset 0 -1px 1px rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.glass-login-card .mud-input-outlined-border,
.glass-login-backdrop.light-backdrop .glass-login-card .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.28) !important;
}

.glass-login-card .mud-input-control-input-container,
.glass-login-backdrop.light-backdrop .glass-login-card .mud-input-control-input-container {
    background: rgba(0, 0, 0, 0.34);
    border-radius: 10px;
}

.glass-login-card .mud-input-slot,
.glass-login-card .mud-input-label,
.glass-login-card .mud-input-adornment,
.glass-login-card .mud-input-helper-text,
.glass-login-card .mud-select-input {
    color: #f1f5f9 !important;
}

.glass-login-card .mud-input-helper-text {
    opacity: 0.78;
}

.glass-login-card .mud-input-adornment-start {
    margin-right: 12px !important;
}

.glass-login-card .mud-input-adornment-start + .mud-input-slot {
    padding-left: 4px !important;
}

.glass-brand-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0284c7, #4f46e5);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

/* ==================== APP SHELL & CARDS ==================== */
.crm-kpi-card {
    border-radius: 14px !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-kpi-card:hover {
    transform: translateY(-2px);
}

.crm-section-card {
    border-radius: 14px !important;
    border: 1px solid var(--mud-palette-lines-default);
}

.crm-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.crm-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ==================== KANBAN BOARD ==================== */
.kanban-board-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 14px;
    align-items: flex-start;
    min-height: 62vh;
}

.kanban-column {
    flex: 0 0 268px;
    min-width: 268px;
    max-width: 268px;
    border-radius: 14px;
    border: 1px solid var(--mud-palette-lines-default);
    background-color: var(--mud-palette-background-gray);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 230px);
}

.kanban-column-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.kanban-dropzone {
    padding: 10px;
    min-height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card {
    border-radius: 11px !important;
    padding: 12px 14px;
    cursor: grab;
    border: 1px solid var(--mud-palette-lines-default);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.kanban-card:hover {
    border-color: var(--mud-palette-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
}

.kanban-card:active {
    cursor: grabbing;
}

/* ==================== THEME SWITCHER PILL ==================== */
.theme-switcher-group {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.22);
    gap: 2px;
}

.theme-switcher-btn {
    border-radius: 999px !important;
    min-width: auto !important;
    padding: 4px 10px !important;
    text-transform: none !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
}

.clickable-link {
    color: var(--mud-palette-primary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.clickable-link:hover {
    text-decoration: underline;
}

.overdue-row {
    border-left: 3px solid #ef4444 !important;
}

/* ManSys Staff-only Tab Accent */
.mud-tab.mansys-staff-tab {
    color: #d97706 !important;
    background-color: rgba(217, 119, 6, 0.10);
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.mud-tab.mansys-staff-tab:hover {
    background-color: rgba(217, 119, 6, 0.18);
}

.mud-tab.mansys-staff-tab.mud-tab-active {
    color: #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.18);
}
