/* ==================== CSS VARIABLES ==================== */
:root {
    --primary: #0066B2;
    --primary-dark: #004C8C;
    --primary-light: #E6F0F9;
    --secondary: #6C757D;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --info: #17A2B8;

    --marketing-color: #9C27B0;
    --sales-color: #2196F3;
    --cs-color: #4CAF50;

    --shopee-color: #EE4D2D;
    --tokped-color: #42B549;

    --bg-dark: #1A1D21;
    --bg-sidebar: #252A30;
    --bg-light: #F5F7FA;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;

    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-light: #ADB5BD;
    --text-white: #FFFFFF;

    --border-color: #E0E0E0;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

    --sidebar-width: 280px;
    --header-height: 64px;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select {
    font-family: inherit;
    font-size: inherit;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Branch Selector */
.branch-selector {
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.branch-selector label {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.branch-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 13px;
    cursor: pointer;
}

.branch-selector select:focus {
    outline: none;
    border-color: var(--primary);
}

.branch-selector select option {
    background: var(--bg-sidebar);
    color: white;
}

/* Branch Overview Card */
.branch-overview-card {
    margin-bottom: 24px;
}

.branch-mini-stats {
    display: flex;
    gap: 16px;
    padding: 16px;
    flex-wrap: wrap;
}

.branch-stat-item {
    flex: 1;
    min-width: 150px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
}

.branch-region {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.branch-count {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.branch-assets {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

.alert-badge {
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.logo i {
    color: var(--primary);
    font-size: 28px;
}

.integration-badge {
    margin-top: 12px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.integration-badge i {
    color: #00A4EF;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    padding: 0 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-light);
    transition: all 0.3s ease;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.nav-item::after {
    content: '';
    position: absolute;
    right: 10px;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    opacity: 0;
    animation: navDot 1.5s ease-in-out infinite;
}

.nav-item:not(.active)::after {
    opacity: 1;
}

@keyframes navDot {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-white);
    padding-left: 24px;
}

.nav-item:hover::after {
    opacity: 0;
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--text-white);
}

.nav-item.active::after {
    display: none;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item span {
    flex: 1;
}

.nav-item .badge {
    padding: 2px 8px;
    background: var(--primary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.nav-item.active .badge {
    background: rgba(255,255,255,0.2);
}

.nav-item .badge.warning {
    background: var(--warning);
    color: var(--text-primary);
}

.ecommerce-icons {
    display: flex;
    gap: 4px;
}

.marketplace-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-light);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    font-size: 20px;
    color: var(--text-secondary);
}

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

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-light);
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.header-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.sync-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.notification-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-selector select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    cursor: pointer;
}

/* ==================== PAGE CONTAINER ==================== */
.page-container {
    padding: 24px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-size: 200% 200%;
    color: white;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
    box-shadow: 0 4px 15px rgba(0, 102, 178, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 178, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Clickable button animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes borderGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 102, 178, 0.3); }
    50% { box-shadow: 0 0 15px rgba(0, 102, 178, 0.6); }
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Clickable indicator class - add to buttons with onclick */
.btn-clickable {
    animation: pulse 2s ease-in-out infinite, borderGlow 2s ease-in-out infinite;
}

.btn-clickable:hover {
    animation: none;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.1);
}

/* Clickable icon button - has onclick action */
.btn-icon[onclick],
.btn-icon[title] {
    animation: iconPulse 2s ease-in-out infinite;
}

.btn-icon[onclick]:hover,
.btn-icon[title]:hover {
    animation: none;
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 102, 178, 0.2);
}

@keyframes iconPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.period-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    cursor: pointer;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--info));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card.mini {
    flex-direction: column;
    text-align: center;
    gap: 8px;
}

/* Clickable card animation */
.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.clickable-card::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary);
}

.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.clickable-card:hover::after {
    opacity: 1;
    right: 12px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: #E8F5E9; color: var(--success); }
.stat-icon.orange { background: #FFF3E0; color: #FF9800; }
.stat-icon.purple { background: #F3E5F5; color: #9C27B0; }
.stat-icon.red { background: #FFEBEE; color: var(--danger); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card.mini .stat-value {
    font-size: 32px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* ==================== SECTION TITLE ==================== */
.section-title {
    margin: 32px 0 20px;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.section-title .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== TEAM PERFORMANCE ==================== */
.team-performance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.team-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-top: 4px solid;
}

.team-card.marketing { border-color: var(--marketing-color); }
.team-card.sales { border-color: var(--sales-color); }
.team-card.cs { border-color: var(--cs-color); }

.team-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.team-header i {
    font-size: 24px;
}

.team-card.marketing .team-header i { color: var(--marketing-color); }
.team-card.sales .team-header i { color: var(--sales-color); }
.team-card.cs .team-header i { color: var(--cs-color); }

.team-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.team-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.team-stat {
    text-align: center;
}

.team-stat .value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.team-stat .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.team-members {
    display: flex;
    align-items: center;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-left: -8px;
    border: 2px solid white;
}

.member-avatar:first-child {
    margin-left: 0;
}

.more-members {
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== DASHBOARD GRID ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--primary);
}

.view-all {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Alert List */
.alert-list {
    padding: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    gap: 12px;
    margin-bottom: 8px;
}

.alert-item:last-child {
    margin-bottom: 0;
}

.alert-item.urgent { background: #FFEBEE; }
.alert-item.warning { background: #FFF8E1; }
.alert-item.info { background: #E3F2FD; }

.alert-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.alert-item.urgent .alert-status { background: var(--danger); }
.alert-item.warning .alert-status { background: var(--warning); }
.alert-item.info .alert-status { background: var(--info); }

.alert-info {
    flex: 1;
}

.alert-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.alert-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.alert-time {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.alert-item.urgent .alert-time { color: var(--danger); }

/* Contract List */
.contract-list {
    padding: 12px;
}

.contract-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.contract-item:last-child {
    border-bottom: none;
}

.contract-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.contract-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.days-left {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-light);
}

.days-left.urgent { background: #FFEBEE; color: var(--danger); }
.days-left.warning { background: #FFF8E1; color: #F57C00; }

/* E-Commerce Channels */
.ecommerce-channels {
    padding: 12px;
}

.channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--bg-light);
}

.channel:last-child {
    margin-bottom: 0;
}

.channel-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.channel-info {
    flex: 1;
}

.channel-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.channel-orders {
    font-size: 12px;
    color: var(--text-secondary);
}

.channel-revenue {
    font-weight: 600;
    color: var(--success);
}

/* Activity List */
.activity-list {
    padding: 12px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.marketing { background: #F3E5F5; color: var(--marketing-color); }
.activity-icon.sales { background: #E3F2FD; color: var(--sales-color); }
.activity-icon.cs { background: #E8F5E9; color: var(--cs-color); }
.activity-icon.training { background: #FFF3E0; color: #FF9800; }

.activity-info {
    flex: 1;
}

.activity-text {
    display: block;
    font-size: 14px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== TABLES ==================== */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.table-controls {
    margin-bottom: 16px;
}

.search-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-filter input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.search-filter select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-white);
}

.table-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: var(--primary-light);
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 102, 178, 0.1);
}

.data-table tbody tr:hover td:first-child {
    border-left: 3px solid var(--primary);
}

.customer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.customer-name {
    display: block;
    font-weight: 600;
}

.customer-id {
    font-size: 12px;
    color: var(--text-secondary);
}

.contract-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.contract-badge.all-in { background: #E3F2FD; color: #1565C0; }
.contract-badge.annual { background: #FFF3E0; color: #EF6C00; }
.contract-badge.multi { background: #E8F5E9; color: #2E7D32; }
.contract-badge.sparepart { background: #F3E5F5; color: #7B1FA2; }
.contract-badge.prospect { background: var(--bg-light); color: var(--text-secondary); }

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active { background: #E8F5E9; color: #2E7D32; }
.status-badge.prospect { background: #FFF3E0; color: #EF6C00; }
.status-badge.inactive { background: var(--bg-light); color: var(--text-secondary); }
.status-badge.success { background: #E8F5E9; color: #2E7D32; }
.status-badge.warning { background: #FFF3E0; color: #EF6C00; }
.status-badge.danger { background: #FFEBEE; color: #C62828; }
.status-badge.info { background: #E3F2FD; color: #1565C0; }

.assigned-team {
    display: flex;
    gap: 4px;
}

.team-tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.team-tag.marketing { background: #F3E5F5; color: var(--marketing-color); }
.team-tag.sales { background: #E3F2FD; color: var(--sales-color); }
.team-tag.cs { background: #E8F5E9; color: var(--cs-color); }

.action-buttons {
    display: flex;
    gap: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    margin-top: 16px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ==================== PRODUCTS ==================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.category-icon.renal { background: #FFEBEE; color: #C62828; }
.category-icon.consumables { background: #E3F2FD; color: #1565C0; }
.category-icon.diagnostics { background: #F3E5F5; color: #7B1FA2; }
.category-icon.cardiovascular { background: #FCE4EC; color: #AD1457; }
.category-icon.safety { background: #E8F5E9; color: #2E7D32; }
.category-icon.others { background: var(--bg-light); color: var(--text-secondary); }

.category-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 2px 8px;
    background: var(--warning);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.product-image {
    height: 140px;
    background: linear-gradient(135deg, var(--primary-light), #E3F2FD);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image i {
    font-size: 48px;
    color: var(--primary);
}

.product-type {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.product-content {
    padding: 16px;
}

.product-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.product-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.product-stat .label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
}

.product-stat .value {
    font-size: 14px;
    font-weight: 600;
}

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

.stock-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.stock-badge.high { background: #E8F5E9; color: #2E7D32; }
.stock-badge.medium { background: #FFF3E0; color: #EF6C00; }
.stock-badge.low { background: #FFEBEE; color: #C62828; }

/* ==================== CONTRACTS ==================== */
.contract-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.contract-type-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.type-icon.multi-year { background: #E8F5E9; color: #2E7D32; }
.type-icon.annual { background: #FFF3E0; color: #EF6C00; }
.type-icon.all-in { background: #E3F2FD; color: #1565C0; }
.type-icon.purchase { background: #F3E5F5; color: #7B1FA2; }

.type-count {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.type-name {
    font-weight: 600;
    font-size: 14px;
}

.type-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.model-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.model-badge.quality { background: #E3F2FD; color: #1565C0; }
.model-badge.profit { background: #E8F5E9; color: #2E7D32; }

/* ==================== ASSETS ==================== */
.asset-detail-container {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
}

.rs-selector {
    height: fit-content;
}

.rs-search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 12px 0;
}

.rs-list {
    max-height: 400px;
    overflow-y: auto;
}

.rs-item {
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.rs-item:hover {
    background: var(--bg-light);
}

.rs-item.active {
    background: var(--primary-light);
}

.rs-name {
    font-weight: 500;
    font-size: 14px;
}

.rs-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.asset-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.asset-grid {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.asset-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.asset-card:hover {
    background: var(--primary-light);
}

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

.asset-id {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.asset-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.asset-status.operational { background: #E8F5E9; color: #2E7D32; }
.asset-status.service { background: #FFF3E0; color: #EF6C00; }
.asset-status.attention { background: #FFEBEE; color: #C62828; }

.asset-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.asset-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.asset-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.asset-progress {
    margin-top: 8px;
}

.progress-label {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 2px;
}

.progress-fill.warning { background: var(--warning); }
.progress-fill.service { background: var(--info); }

.asset-history {
    height: fit-content;
}

.history-timeline {
    padding: 16px;
}

.history-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.history-date {
    text-align: center;
    flex-shrink: 0;
}

.history-date .date {
    display: block;
    font-weight: 600;
    font-size: 13px;
}

.history-date .type {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    font-size: 10px;
    margin-top: 4px;
}

.history-content h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.history-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.parts-used {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.part-tag {
    padding: 2px 8px;
    background: var(--bg-light);
    border-radius: 10px;
    font-size: 11px;
}

.technician {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== MAINTENANCE CALENDAR ==================== */
.calendar-legend {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.completed { background: var(--success); }
.legend-color.scheduled { background: var(--primary); }
.legend-color.in-progress { background: var(--info); }
.legend-color.overdue { background: var(--danger); }
.legend-color.rescheduled { background: #FF9800; }

.calendar-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.calendar-header h2 {
    font-size: 20px;
}

.calendar-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.calendar-nav:hover {
    background: var(--primary);
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px;
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
}

.calendar-day.other-month {
    background: var(--bg-light);
    color: var(--text-light);
}

.calendar-day.today {
    border: 2px solid var(--primary);
    background: var(--primary-light);
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.event {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 4px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event.completed { background: var(--success); color: white; }
.event.scheduled { background: var(--primary); color: white; }
.event.in-progress { background: var(--info); color: white; }
.event.overdue { background: var(--danger); color: white; }
.event.rescheduled { background: #FF9800; color: white; }

.maintenance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.summary-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.summary-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-card.overdue .summary-header { background: #FFEBEE; color: var(--danger); }
.summary-card.scheduled .summary-header { background: var(--primary-light); color: var(--primary); }
.summary-card.rescheduled .summary-header { background: #FFF3E0; color: #EF6C00; }

.summary-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.summary-list {
    list-style: none;
    padding: 12px 20px;
}

.summary-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-list li:last-child {
    border-bottom: none;
}

.item-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.item-desc {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ==================== TRAINING ==================== */
.badge-success { background: #E8F5E9; color: #2E7D32; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-warning { background: #FFF3E0; color: #EF6C00; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-danger { background: #FFEBEE; color: #C62828; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-info { background: #E3F2FD; color: #1565C0; padding: 2px 8px; border-radius: 10px; font-size: 12px; }

.training-detail-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.training-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
}

.training-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.training-tab:hover {
    color: var(--primary);
}

.training-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.trained-list {
    padding: 16px;
}

.trained-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: var(--bg-light);
    margin-bottom: 8px;
}

.trained-item:last-child {
    margin-bottom: 0;
}

.trained-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.trained-info {
    flex: 1;
}

.trained-name {
    display: block;
    font-weight: 600;
}

.trained-detail {
    font-size: 13px;
    color: var(--text-secondary);
}

.trained-cert {
    text-align: right;
}

.cert-date, .cert-valid {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.cert-status {
    font-size: 24px;
}

.cert-status.valid { color: var(--success); }
.cert-status.expired { color: var(--danger); }

/* ==================== ORDERS ==================== */
.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.pending { background: #FFF3E0; color: #EF6C00; }
.order-status.shipping { background: #E3F2FD; color: #1565C0; }
.order-status.completed { background: #E8F5E9; color: #2E7D32; }

.channel-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.channel-badge.direct { background: var(--primary-light); color: var(--primary); }
.channel-badge.shopee { background: #FFEBE8; color: var(--shopee-color); }
.channel-badge.tokped { background: #E8F5E9; color: var(--tokped-color); }

/* ==================== E-COMMERCE ==================== */
.ecommerce-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.platform-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.platform-card.shopee { border-top: 4px solid var(--shopee-color); }
.platform-card.tokopedia { border-top: 4px solid var(--tokped-color); }
.platform-card.direct { border-top: 4px solid var(--primary); }

.platform-header {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.platform-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.platform-card.shopee .platform-logo { background: #FFEBE8; color: var(--shopee-color); }
.platform-card.tokopedia .platform-logo { background: #E8F5E9; color: var(--tokped-color); }
.platform-card.direct .platform-logo { background: var(--primary-light); color: var(--primary); }

.platform-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.platform-status {
    font-size: 12px;
    color: var(--success);
}

.platform-status i {
    margin-right: 4px;
}

.sync-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-secondary);
}

.platform-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 20px 20px;
    gap: 16px;
}

.platform-stat {
    text-align: center;
}

.platform-stat .value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.platform-stat .label {
    font-size: 11px;
    color: var(--text-secondary);
}

.platform-actions {
    padding: 16px 20px;
    background: var(--bg-light);
    display: flex;
    gap: 8px;
}

/* ==================== TEAMS ==================== */
.team-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.team-detail-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.team-detail-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-detail-header.marketing { background: linear-gradient(135deg, #F3E5F5, #E1BEE7); }
.team-detail-header.sales { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); }
.team-detail-header.cs { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); }

.team-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.team-detail-header.marketing .team-icon { color: var(--marketing-color); }
.team-detail-header.sales .team-icon { color: var(--sales-color); }
.team-detail-header.cs .team-icon { color: var(--cs-color); }

.team-title h3 {
    font-size: 18px;
    margin-bottom: 2px;
}

.team-title span {
    font-size: 13px;
    color: var(--text-secondary);
}

.team-kpi {
    display: flex;
    padding: 20px;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
}

.kpi-item {
    text-align: center;
}

.kpi-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.team-member-list {
    padding: 12px 20px;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.member-row:last-child {
    border-bottom: none;
}

.member-info {
    flex: 1;
}

.member-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.member-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.member-leads, .member-deals, .member-tickets {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

/* ==================== REPORTS ==================== */
.report-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.report-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

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

.report-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.report-period {
    font-size: 13px;
    color: var(--text-secondary);
}

.report-chart {
    margin-bottom: 20px;
}

.chart-placeholder {
    height: 200px;
    display: flex;
    align-items: flex-end;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    height: 100%;
}

.bar {
    flex: 1;
    background: var(--primary-light);
    border-radius: 4px 4px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 8px;
    transition: all 0.2s ease;
}

.bar:hover {
    background: var(--primary);
}

.bar:hover span {
    color: white;
}

.bar span {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: auto;
}

.bar.highlight {
    background: var(--primary);
}

.bar.highlight span {
    color: white;
}

.pie-chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pie-segment {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary) 0% 65%,
        var(--shopee-color) 65% 85%,
        var(--tokped-color) 85% 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pie-segment::before {
    content: '';
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

.pie-segment span {
    position: absolute;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.legend-item .color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-item .color.direct { background: var(--primary); }
.legend-item .color.shopee { background: var(--shopee-color); }
.legend-item .color.tokped { background: var(--tokped-color); }

.report-summary {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-item .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.summary-item .value {
    font-size: 20px;
    font-weight: 700;
}

.summary-item .value.positive { color: var(--success); }

.top-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-rank {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.product-rank .rank {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.product-rank .product-info {
    flex: 1;
}

.product-rank .name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.product-rank .category {
    font-size: 12px;
    color: var(--text-secondary);
}

.product-rank .sales {
    font-weight: 600;
    color: var(--success);
}

.customer-metrics {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-info {
    flex: 1;
}

.metric-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.metric-change {
    font-size: 13px;
    font-weight: 500;
}

.metric-change.positive { color: var(--success); }

/* Integration Status */
.integration-status-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.integration-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
}

.integration-logo {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #00A4EF;
}

.integration-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.integration-connected {
    color: var(--success);
    font-size: 13px;
}

.sync-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.sync-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.integration-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 24px;
    gap: 24px;
}

.int-stat {
    text-align: center;
}

.int-stat .value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.int-stat .label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .asset-detail-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-performance-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .ecommerce-platforms {
        grid-template-columns: 1fr;
    }

    .team-overview-grid {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .contract-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .maintenance-summary {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .integration-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .contract-type-grid {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        font-size: 12px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .event {
        font-size: 9px;
        padding: 2px 4px;
    }

    .table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 800px;
    }

    .platform-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 16px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .calendar-legend {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-actions {
        gap: 8px;
    }

    .team-selector {
        display: none;
    }
}
