.lcrm-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #F4F6F9;
    font-family: -apple-system, Arial, sans-serif;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.lcrm-sidebar {
    width: 220px;
    background: #0B1F3A;
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    transition: width 0.2s ease;
}

.lcrm-sidebar .lcrm-logo {
    padding: 0 18px 18px;
    font-size: 15px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}

.lcrm-sidebar a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
}

.lcrm-sidebar a:hover,
.lcrm-sidebar a.active {
    background: #1E3A5F;
    color: #fff;
}

.lcrm-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.lcrm-header {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 28px;
    gap: 14px;
    flex-shrink: 0;
}

.lcrm-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E0EDFF;
    color: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
}

.lcrm-username {
    font-size: 13px;
    color: #0B1F3A;
    font-weight: 500;
}

.lcrm-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: #FEE2E2;
    color: #B91C1C;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.lcrm-logout:hover {
    background: #FECACA;
}

.lcrm-main {
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.lcrm-main h1 {
    font-size: 22px;
    margin-bottom: 4px;
    color: #0B1F3A;
}

.lcrm-subtitle {
    color: #64748b;
    margin-bottom: 20px;
}

.lcrm-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
    margin-bottom: 20px;
}

.lcrm-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lcrm-card .lcrm-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-bottom: 12px;
}

.lcrm-card h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #0B1F3A;
}

.lcrm-card p {
    color: #64748b;
    font-size: 12px;
    margin: 0 0 12px;
}

.lcrm-card a.lcrm-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.lcrm-blue   .lcrm-icon { background: #E0EDFF; color: #2563EB; }
.lcrm-blue   a.lcrm-btn { background: #2563EB; }
.lcrm-green  .lcrm-icon { background: #DCFCE7; color: #16A34A; }
.lcrm-green  a.lcrm-btn { background: #16A34A; }
.lcrm-purple .lcrm-icon { background: #EDE9FE; color: #7C3AED; }
.lcrm-purple a.lcrm-btn { background: #7C3AED; }
.lcrm-orange .lcrm-icon { background: #FFEDD5; color: #EA580C; }
.lcrm-orange a.lcrm-btn { background: #EA580C; }

.lcrm-stats-box {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lcrm-stats-box p.lcrm-stats-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #0B1F3A;
}

.lcrm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.lcrm-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
}

.lcrm-stat .lcrm-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    flex-shrink: 0;
}

.lcrm-stat-number {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    color: #0B1F3A;
}

.lcrm-stat-label {
    margin: 0;
    font-size: 11px;
    color: #64748b;
}

.lcrm-footer {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 20px 0;
    flex-shrink: 0;
}

.lcrm-excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.lcrm-excel-table th {
    background: #F1F5F9;
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: left;
    color: #0B1F3A;
    font-weight: 500;
    position: relative;
}

.lcrm-excel-table td {
    border: 1px solid #cbd5e1;
    padding: 4px;
}

.lcrm-excel-table input,
.lcrm-excel-table select {
    width: 100%;
    border: none;
    padding: 6px;
    font-size: 13px;
    background: transparent;
}

.lcrm-excel-table input:focus,
.lcrm-excel-table select:focus {
    outline: 2px solid #2563EB;
    background: #fff;
}

@media (max-width: 768px) {
    .lcrm-sidebar {
        width: 70px;
    }
    .lcrm-sidebar .lcrm-logo,
    .lcrm-sidebar a span.lcrm-label {
        display: none;
    }
    .lcrm-header {
        padding: 0 12px;
    }
    .lcrm-username {
        display: none;
    }
    .lcrm-main {
        padding: 16px;
    }
}

html, body {
    height: 100%;
    overflow: hidden;
}

body.admin-bar .lcrm-layout {
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .lcrm-layout {
        height: calc(100vh - 46px);
    }
}

body:not(.admin-bar) .lcrm-layout {
    height: 100vh;
}

.lcrm-layout.lcrm-collapsed .lcrm-sidebar {
    width: 64px;
}

.lcrm-layout.lcrm-collapsed .lcrm-sidebar .lcrm-logo,
.lcrm-layout.lcrm-collapsed .lcrm-sidebar a span.lcrm-label {
    display: none;
}

.lcrm-layout.lcrm-collapsed .lcrm-sidebar a {
    justify-content: center;
    padding: 10px 0;
}

.lcrm-sidebar-toggle {
    background: #F1F5F9;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 15px;
    color: #0B1F3A;
    margin-right: auto;
}

.lcrm-th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.lcrm-filter-icon {
    cursor: pointer;
    font-size: 12px;
    color: #94a3b8;
    padding: 2px 4px;
    border-radius: 4px;
    user-select: none;
}

.lcrm-filter-icon:hover {
    background: #e5e7eb;
}

.lcrm-filter-icon.lcrm-filter-active {
    color: #16A34A;
    font-weight: bold;
}

.lcrm-filter-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 100;
    margin-top: 4px;
}

.lcrm-filter-popup input {
    width: 160px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}