/* ============================================
   TOM CRM - Stylesheet
   Attio-inspired, Taurus + ImmoMentor CI
   ============================================ */

/* -- CSS Variables (Brand Fusion) -- */
:root {
    --crm-bg: #F0F4F7;
    --crm-surface: #FFFFFF;
    --crm-surface-hover: #F8FAFC;
    --crm-text: #04253E;
    --crm-text-secondary: #758B9C;
    --crm-text-muted: #94A3B8;

    --crm-primary: #409DFF;
    --crm-primary-light: #6BB3FF;
    --crm-primary-dark: #2B7DE0;
    --crm-primary-bg: rgba(64, 157, 255, 0.08);

    --crm-teal: #0AD6C7;
    --crm-teal-bg: rgba(10, 214, 199, 0.08);
    --crm-purple: #8B5CF6;
    --crm-purple-bg: rgba(139, 92, 246, 0.08);

    --crm-success: #2EB296;
    --crm-success-bg: rgba(46, 178, 150, 0.08);
    --crm-warning: #F5A623;
    --crm-warning-bg: rgba(245, 166, 35, 0.08);
    --crm-danger: #D3644D;
    --crm-danger-bg: rgba(211, 100, 77, 0.08);

    --crm-border: #E2E8F0;
    --crm-border-light: #EEF2F6;

    --crm-sidebar-bg: #1F2529;
    --crm-sidebar-text: #CED9E0;
    --crm-sidebar-active: rgba(64, 157, 255, 0.15);
    --crm-sidebar-hover: rgba(255, 255, 255, 0.05);
    --crm-sidebar-width: 260px;

    --crm-topbar-height: 60px;
    --crm-radius: 10px;
    --crm-radius-sm: 6px;
    --crm-radius-lg: 14px;
    --crm-shadow: 0 1px 3px rgba(4, 37, 62, 0.06);
    --crm-shadow-md: 0 4px 12px rgba(4, 37, 62, 0.08);
    --crm-shadow-lg: 0 8px 24px rgba(4, 37, 62, 0.12);
    --crm-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* -- Reset & Base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background: var(--crm-bg);
    color: var(--crm-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--crm-text);
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }

a { color: var(--crm-primary); text-decoration: none; transition: color var(--crm-transition); }
a:hover { color: var(--crm-primary-dark); }

/* -- Sidebar -- */
.crm-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--crm-sidebar-width);
    background: var(--crm-sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--crm-transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand-logos {
    display: flex;
    gap: 6px;
}

.brand-logo-circle {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2a3035, #3a4045);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.brand-logo-immo {
    background: linear-gradient(135deg, #2B7DE0, #409DFF);
    font-size: 0.65rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.brand-sub {
    color: var(--crm-text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}

/* Unit Switcher */
.sidebar-unit-switcher {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.unit-pill {
    flex: 1;
    padding: 5px 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--crm-sidebar-text);
    background: rgba(255,255,255,0.04);
    border: 1.5px solid transparent;
    transition: all var(--crm-transition);
    text-decoration: none;
}

.unit-pill:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.unit-pill.active {
    background: var(--crm-sidebar-active);
    color: var(--crm-primary);
    border-color: var(--crm-primary);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--crm-sidebar-text);
    font-size: 0.88rem;
    font-weight: 400;
    transition: all var(--crm-transition);
    text-decoration: none;
    margin-bottom: 2px;
}

.nav-item i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    opacity: 0.7;
}

.nav-item:hover {
    background: var(--crm-sidebar-hover);
    color: #fff;
}
.nav-item:hover i { opacity: 1; }

.nav-item.active {
    background: var(--crm-sidebar-active);
    color: var(--crm-primary);
    font-weight: 500;
}
.nav-item.active i { opacity: 1; color: var(--crm-primary); }

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 10px 14px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--crm-primary), var(--crm-teal));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
}

.user-role {
    color: var(--crm-text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-logout {
    color: var(--crm-sidebar-text);
    opacity: 0.5;
    transition: all var(--crm-transition);
    font-size: 1.1rem;
}
.user-logout:hover { opacity: 1; color: var(--crm-danger); }

/* -- Main Content -- */
.crm-main {
    margin-left: var(--crm-sidebar-width);
    min-height: 100vh;
}

/* Top Bar */
.crm-topbar {
    height: var(--crm-topbar-height);
    background: var(--crm-surface);
    border-bottom: 1px solid var(--crm-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--crm-text);
    cursor: pointer;
}

.topbar-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--crm-text-muted);
    font-size: 0.9rem;
}

.topbar-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1.5px solid var(--crm-border);
    border-radius: var(--crm-radius-sm);
    font-size: 0.88rem;
    font-family: var(--font-body);
    background: var(--crm-bg);
    color: var(--crm-text);
    transition: all var(--crm-transition);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--crm-primary);
    background: var(--crm-surface);
    box-shadow: 0 0 0 3px var(--crm-primary-bg);
}

.topbar-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.btn-icon {
    width: 36px; height: 36px;
    border: 1.5px solid var(--crm-border);
    border-radius: var(--crm-radius-sm);
    background: var(--crm-surface);
    color: var(--crm-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--crm-transition);
    font-size: 1rem;
}

.btn-icon:hover {
    border-color: var(--crm-primary);
    color: var(--crm-primary);
    background: var(--crm-primary-bg);
}

/* Content Area */
.crm-content {
    padding: 24px;
}

/* -- Alerts / Flash Messages -- */
.crm-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin: 0 24px;
    border-radius: var(--crm-radius-sm);
    font-size: 0.88rem;
    position: relative;
}

.alert-success { background: var(--crm-success-bg); color: #1a6b57; }
.alert-danger { background: var(--crm-danger-bg); color: #8b3a2d; }
.alert-warning { background: var(--crm-warning-bg); color: #8a6010; }
.alert-info { background: var(--crm-primary-bg); color: var(--crm-primary-dark); }

.alert-close {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
}
.alert-close:hover { opacity: 1; }

/* -- Page Header -- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 i {
    color: var(--crm-primary);
    font-size: 1.3rem;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* -- Cards -- */
.crm-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    box-shadow: var(--crm-shadow);
    transition: box-shadow var(--crm-transition);
}

.crm-card:hover { box-shadow: var(--crm-shadow-md); }

.crm-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--crm-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crm-card-header h3 {
    margin: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crm-card-body {
    padding: 20px;
}

.crm-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--crm-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* -- KPI Strip (Dashboard) -- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all var(--crm-transition);
    box-shadow: var(--crm-shadow);
}

.kpi-card:hover {
    box-shadow: var(--crm-shadow-md);
    transform: translateY(-1px);
}

.kpi-icon {
    width: 44px; height: 44px;
    border-radius: var(--crm-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.kpi-icon-blue { background: var(--crm-primary-bg); color: var(--crm-primary); }
.kpi-icon-teal { background: var(--crm-teal-bg); color: var(--crm-teal); }
.kpi-icon-purple { background: var(--crm-purple-bg); color: var(--crm-purple); }
.kpi-icon-green { background: var(--crm-success-bg); color: var(--crm-success); }
.kpi-icon-orange { background: var(--crm-warning-bg); color: var(--crm-warning); }

.kpi-data h4 {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--crm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--crm-text);
    line-height: 1.2;
}

.kpi-change {
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 4px;
}
.kpi-change.up { color: var(--crm-success); }
.kpi-change.down { color: var(--crm-danger); }

/* -- Tables -- */
.crm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.crm-table th {
    padding: 10px 16px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--crm-text-secondary);
    border-bottom: 1px solid var(--crm-border);
    text-align: left;
    white-space: nowrap;
}

.crm-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--crm-border-light);
    vertical-align: middle;
}

.crm-table tbody tr {
    transition: background var(--crm-transition);
}

.crm-table tbody tr:hover {
    background: var(--crm-surface-hover);
}

.crm-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table row click */
.crm-table .row-link {
    cursor: pointer;
}

/* -- Badges -- */
.crm-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.badge-blue { background: var(--crm-primary-bg); color: var(--crm-primary-dark); }
.badge-green { background: var(--crm-success-bg); color: #1a6b57; }
.badge-purple { background: var(--crm-purple-bg); color: #6D3BD0; }
.badge-teal { background: var(--crm-teal-bg); color: #088a80; }
.badge-orange { background: var(--crm-warning-bg); color: #8a6010; }
.badge-red { background: var(--crm-danger-bg); color: #8b3a2d; }
.badge-gray { background: rgba(148,163,184,0.1); color: var(--crm-text-secondary); }

/* Unit badge */
.unit-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
}

/* -- Buttons -- */
.btn-crm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--crm-radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--crm-transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--crm-primary);
    color: #fff;
    border-color: var(--crm-primary);
}
.btn-primary:hover {
    background: var(--crm-primary-dark);
    border-color: var(--crm-primary-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(64, 157, 255, 0.3);
}

.btn-secondary {
    background: var(--crm-surface);
    color: var(--crm-text);
    border-color: var(--crm-border);
}
.btn-secondary:hover {
    background: var(--crm-surface-hover);
    border-color: var(--crm-text-muted);
    color: var(--crm-text);
}

.btn-ghost {
    background: transparent;
    color: var(--crm-text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--crm-primary-bg);
    color: var(--crm-primary);
}

.btn-danger {
    background: var(--crm-danger);
    color: #fff;
    border-color: var(--crm-danger);
}
.btn-danger:hover {
    background: #b8503c;
    border-color: #b8503c;
    color: #fff;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
}

/* -- Forms -- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--crm-text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--crm-border);
    border-radius: var(--crm-radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--crm-text);
    background: var(--crm-surface);
    transition: all var(--crm-transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px var(--crm-primary-bg);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23758B9C' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

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

/* -- Pipeline / Kanban -- */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: calc(100vh - 200px);
}

.kanban-column {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--crm-radius) var(--crm-radius) 0 0;
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-bottom: 2px solid var(--crm-primary);
}

.kanban-column-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kanban-column-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--crm-text);
}

.kanban-column-count {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--crm-text-muted);
    background: var(--crm-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

.kanban-column-body {
    flex: 1;
    background: var(--crm-bg);
    border: 1px solid var(--crm-border);
    border-top: none;
    border-radius: 0 0 var(--crm-radius) var(--crm-radius);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
}

.kanban-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-sm);
    padding: 14px;
    cursor: grab;
    transition: all var(--crm-transition);
}

.kanban-card:hover {
    box-shadow: var(--crm-shadow-md);
    border-color: var(--crm-primary);
}

.kanban-card-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--crm-text);
    margin-bottom: 6px;
}

.kanban-card-company {
    font-size: 0.75rem;
    color: var(--crm-text-secondary);
    margin-bottom: 8px;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-card-value {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--crm-primary);
}

.kanban-card-date {
    font-size: 0.7rem;
    color: var(--crm-text-muted);
}

/* Drag states */
.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.kanban-column-body.drag-over {
    background: var(--crm-primary-bg);
    border-color: var(--crm-primary);
}

/* -- Activity Timeline -- */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--crm-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    z-index: 1;
}

.timeline-content {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-sm);
    padding: 12px 16px;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.timeline-time {
    font-size: 0.72rem;
    color: var(--crm-text-muted);
}

.timeline-body {
    font-size: 0.82rem;
    color: var(--crm-text-secondary);
}

/* -- Contact Detail -- */
.contact-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-avatar {
    width: 56px; height: 56px;
    border-radius: var(--crm-radius);
    background: linear-gradient(135deg, var(--crm-primary), var(--crm-teal));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
}

.contact-meta {
    flex: 1;
}

.contact-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-subtitle {
    font-size: 0.85rem;
    color: var(--crm-text-secondary);
}

/* -- Dashboard Grid -- */
.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.dash-grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* -- Modal / Drawer -- */
.crm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 37, 62, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.crm-modal-overlay.open { display: flex; }

.crm-modal {
    background: var(--crm-surface);
    border-radius: var(--crm-radius-lg);
    box-shadow: var(--crm-shadow-lg);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
}

.crm-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--crm-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crm-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.crm-modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--crm-text-muted);
    cursor: pointer;
    padding: 4px;
}
.crm-modal-close:hover { color: var(--crm-text); }

.crm-modal-body { padding: 24px; }

.crm-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--crm-border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* -- Empty State -- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--crm-text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* -- Product cards -- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 20px;
    transition: all var(--crm-transition);
}

.product-card:hover {
    box-shadow: var(--crm-shadow-md);
    border-color: var(--crm-primary);
}

.product-category {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--crm-primary);
    margin-bottom: 6px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-desc {
    font-size: 0.82rem;
    color: var(--crm-text-secondary);
    margin-bottom: 12px;
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--crm-text);
}

.product-price-type {
    font-size: 0.72rem;
    color: var(--crm-text-muted);
    font-weight: 400;
}

/* -- Login Page -- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1F2529 0%, #2a3540 50%, #04253E 100%);
}

.login-card {
    background: var(--crm-surface);
    border-radius: var(--crm-radius-lg);
    box-shadow: var(--crm-shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.login-logo-circle {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.login-logo-taurus { background: linear-gradient(135deg, #2a3035, #3a4045); }
.login-logo-immo { background: linear-gradient(135deg, #2B7DE0, #409DFF); font-size: 0.75rem; }

.login-title {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    color: var(--crm-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 28px;
}

.login-card .form-control {
    padding: 11px 14px;
    font-size: 0.92rem;
}

.login-btn {
    width: 100%;
    padding: 11px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* -- Responsive -- */
@media (max-width: 991.98px) {
    .crm-sidebar {
        transform: translateX(-100%);
    }
    .crm-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--crm-shadow-lg);
    }
    .crm-main {
        margin-left: 0;
    }
    .dash-grid, .dash-grid-equal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .crm-content { padding: 16px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .kanban-board { gap: 12px; }
    .kanban-column { min-width: 260px; }
    .page-header { flex-direction: column; align-items: flex-start; }
}

/* -- Utility -- */
.text-muted { color: var(--crm-text-muted) !important; }
.text-secondary { color: var(--crm-text-secondary) !important; }
.text-primary { color: var(--crm-primary) !important; }
.text-success { color: var(--crm-success) !important; }
.text-danger { color: var(--crm-danger) !important; }
.text-warning { color: var(--crm-warning) !important; }

.fw-600 { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
