/* CoreSol Portal - Modern Light Theme CSS */

:root {
    /* Primary Colors - Solid Red Accent */
    --primary-red: #FF1744;
    --primary-red-light: #FF4569;
    --primary-red-bg: #FFE8EE;
    
    /* Accent Colors - Grayscale with minimal color */
    --color-success: #22C55E;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-muted: #6B7280;
    
    /* Background Colors - Neutral */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F1F3F5;
    --bg-dark: #1F2937;
    --bg-darker: #111827;
    
    /* Text Colors - Neutral */
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #888888;
    --text-light: #CCCCCC;
    --text-white: #FFFFFF;
    
    /* Border Colors - Neutral */
    --border-light: #E8E8E8;
    --border-medium: #D0D0D0;
    --border-dark: #A0A0A0;
    
    /* Shadow Presets */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 32px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   BASE STYLES
============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ============================================================================
   LAYOUT STRUCTURE
============================================================================ */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    padding: var(--spacing-2xl) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-medium);
}

/* Brand */
.sidebar .brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sidebar .brand-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-blue);
    font-size: 24px;
}

/* Sidebar Search */
.sidebar-search {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

.sidebar-search input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-3xl);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sidebar-search i {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

/* Sidebar Navigation Label */
.sidebar-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 var(--spacing-md);
    margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
}

/* Sidebar Navigation */
.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar nav a .icon {
    font-size: 20px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar nav a:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.sidebar nav a.active {
    background: rgba(255, 23, 68, 0.08);
    color: var(--primary-red);
    font-weight: 600;
}

/* Bulletin Board */
.bulletin-board {
    margin-top: auto;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.bulletin-board h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.bulletin-board p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.bulletin-item {
    background: var(--bg-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-light);
}

.bulletin-badge {
    display: inline-block;
    background-color: #EFF6FF;
    color: var(--primary-blue);
    font-size: 10px;
    font-weight: 600;
    padding: 3px var(--spacing-sm);
    border-radius: var(--radius-full);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bulletin-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-view-more {
    width: 100%;
    padding: 7px var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-view-more:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

/* Main Content Area */
.content {
    flex: 1;
    margin-left: 240px;
    padding: var(--spacing-2xl);
    background-color: var(--bg-secondary);
    min-height: 100vh;
}

/* ============================================================================
   HEADER
============================================================================ */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    background-color: var(--bg-primary);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
}

.header-search {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.header-search input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-3xl);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.header-search i {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Icon Buttons */
.icon-btn-plain {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-btn-plain:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Tasks Badge */
.tasks-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background-color: #EFF6FF;
    color: var(--primary-blue);
    padding: 6px var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.tasks-badge:hover {
    background-color: #DBEAFE;
}

.tasks-badge .count {
    background-color: var(--primary-blue);
    color: var(--text-white);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--color-red);
    color: var(--text-white);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: var(--radius-full);
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: relative;
}

.notifications-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 1000;
}

.notifications-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.notifications-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: var(--bg-secondary);
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 6px 10px 6px 6px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.user-dropdown-trigger:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-blue) 0%, #8B5CF6 100%);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 140px;
}

.user-name-sm {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.user-email-sm {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform var(--transition-base);
}

.user-dropdown-trigger:hover .dropdown-arrow {
    color: var(--text-secondary);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 1000;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-item i {
    font-size: 18px;
    color: var(--text-muted);
}

.dropdown-item.danger {
    color: var(--color-red);
}

.dropdown-item.danger i {
    color: var(--color-red);
}

.dropdown-item.danger:hover {
    background-color: #FEF2F2;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 4px 0;
}

/* ============================================================================
   STAT CARDS
============================================================================ */

/* Large Stat Cards (Top Row) */
.stat-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.stat-card-large {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-base);
}

.stat-card-large:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue, .stat-icon.green, .stat-icon.orange, .stat-icon.purple, .stat-icon.pink, .stat-icon.red {
    background-color: var(--primary-red-bg);
    color: var(--primary-red);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-subtext {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.stat-progress {
    width: 100%;
    height: 6px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.stat-progress-fill.green {
    background-color: var(--color-green);
}

.stat-progress-fill.blue {
    background-color: var(--primary-blue);
}

.stat-progress-fill.orange {
    background-color: var(--color-orange);
}

/* Small Stat Cards (Second Row) */
.stat-cards-small-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.stat-card-small {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-base);
}

.stat-card-small:hover {
    box-shadow: var(--shadow-sm);
}

.stat-card-small .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.stat-card-small-content {
    flex: 1;
}

.stat-card-small .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-card-small .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================================
   CARDS & CONTAINERS
============================================================================ */

.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-title i {
    font-size: 20px;
    color: var(--text-secondary);
}

.card-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ============================================================================
   BUTTONS
============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--text-white);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-red-light);
    box-shadow: 0 4px 16px rgba(255, 23, 68, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-dark);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px var(--spacing-md);
    font-size: 13px;
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-secondary);
    font-size: 16px;
}

.icon-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* ============================================================================
   TABLES
============================================================================ */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

th {
    text-align: left;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color var(--transition-fast);
}

tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* ============================================================================
   BADGES & STATUS
============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge.pink, .badge.primary, .badge.red {
    background: var(--primary-red);
    color: #FFFFFF;
}

.badge.blue {
    background-color: #F5F5F5;
    color: var(--text-secondary);
}

.badge.green {
    background-color: #F5F5F5;
    color: var(--color-success);
}

.badge.orange, .badge.warning {
    background-color: #F5F5F5;
    color: var(--color-warning);
}

.badge.red, .badge.error {
    background-color: #F5F5F5;
    color: var(--color-error);
}

.badge.purple {
    background-color: #F5F5F5;
    color: var(--text-secondary);
}

.badge.gray {
    background-color: #F5F5F5;
    color: var(--text-muted);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
}

.status.connected,
.status.active {
    background-color: #ECFDF5;
    color: #059669;
}

.status.connected::before,
.status.active::before {
    background-color: var(--color-green);
}

.status.warning {
    background-color: #FFF7ED;
    color: #D97706;
}

.status.warning::before {
    background-color: var(--color-orange);
}

.status.disconnected,
.status.inactive {
    background-color: #FEF2F2;
    color: #DC2626;
}

.status.disconnected::before,
.status.inactive::before {
    background-color: var(--color-red);
}

/* ============================================================================
   FORMS
============================================================================ */

.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-field,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background-color: var(--bg-primary);
    transition: all var(--transition-base);
    color: var(--text-primary);
}

.input-field:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* ============================================================================
   GRID LAYOUTS
============================================================================ */

.grid {
    display: grid;
    gap: var(--spacing-xl);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ============================================================================
   ACTIVITY TIMELINE
============================================================================ */

.activity-timeline {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-description {
    font-size: 13px;
    color: var(--text-secondary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    align-self: flex-start;
}

/* ============================================================================
   PERFORMANCE GAUGE - SPEEDOMETER STYLE
============================================================================ */

.performance-gauge {
    position: relative;
    width: 180px;
    height: 120px;
    margin: 0 auto var(--spacing-2xl);
}

.gauge-circle {
    width: 100%;
    height: 100%;
}

.gauge-bg {
    fill: none;
    stroke: #E5E7EB;
    stroke-width: 16;
    stroke-linecap: round;
}

.gauge-progress {
    fill: none;
    stroke-width: 16;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Color coding based on performance score */
.gauge-progress.excellent {
    stroke: #22C55E;
}

.gauge-progress.good {
    stroke: #84CC16;
}

.gauge-progress.fair {
    stroke: #F59E0B;
}

.gauge-progress.poor {
    stroke: #F97316;
}

.gauge-progress.critical {
    stroke: #EF4444;
}

.gauge-text {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.gauge-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* Gauge tick marks */
.gauge-ticks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.gauge-tick {
    position: absolute;
    width: 2px;
    height: 8px;
    background-color: var(--text-muted);
    opacity: 0.3;
}

/* Gauge needle */
.gauge-needle {
    position: absolute;
    bottom: 10px;
    left: 50%;
    width: 3px;
    height: 60px;
    background: linear-gradient(to top, var(--text-primary), transparent);
    transform-origin: bottom center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.gauge-needle::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Web Vitals */
.web-vitals {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.vital-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.vital-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 60px;
}

.vital-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.vital-score {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 50px;
}

.vital-bar {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-fill.green {
    background-color: var(--color-green);
}

.progress-fill.orange {
    background-color: var(--color-orange);
}

.progress-fill.red {
    background-color: var(--color-red);
}

.progress-fill.blue {
    background-color: var(--primary-blue);
}

/* ============================================================================
   MODALS
============================================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-3xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.close-modal:hover {
    background: var(--bg-secondary);
}

/* ============================================================================
   ALERTS
============================================================================ */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.alert-success {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.alert-warning {
    background-color: #FFF7ED;
    color: #D97706;
    border: 1px solid #FED7AA;
}

.alert-info {
    background-color: #EFF6FF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
}

/* ============================================================================
   PAGINATION
============================================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 var(--spacing-md);
    border: 1px solid var(--border-light);
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-primary);
}

.pagination button:hover:not(.active) {
    background-color: var(--bg-secondary);
    border-color: var(--border-medium);
}

.pagination button.active {
    background-color: var(--primary-blue);
    color: var(--text-white);
    border-color: var(--primary-blue);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   UTILITY CLASSES
============================================================================ */

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }
.mt-6 { margin-top: var(--spacing-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }
.mb-6 { margin-bottom: var(--spacing-2xl); }

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }
.gap-5 { gap: var(--spacing-xl); }

/* ============================================================================
   RESPONSIVE DESIGN
============================================================================ */

@media (max-width: 1024px) {
    .grid-4,
    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .content {
        margin-left: 200px;
        padding: var(--spacing-lg);
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }
    
    .stat-cards-row,
    .stat-cards-small-row {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .header-search {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .sidebar {
        width: 0;
        padding: 0;
        overflow: hidden;
    }

    .content {
        margin-left: 0;
    }
}

/* ============================================================================
   ANIMATIONS
============================================================================ */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Loading Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

/* ============================================================================
   LOGIN PAGE SPECIFIC STYLES
============================================================================ */

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1;
    background: var(--primary-red);
    padding: var(--spacing-3xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-white);
}

.login-branding {
    margin-bottom: var(--spacing-3xl);
}

.login-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-3xl);
}

.login-headline {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-xl);
    color: var(--text-white);
}

.login-description {
    font-size: 16px;
    line-height: 1.6;
    color: #D1D5DB;
    margin-bottom: var(--spacing-3xl);
}

.login-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
}

.login-stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.login-stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.login-stat-content {
    display: flex;
    flex-direction: column;
}

.login-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
}

.login-stat-label {
    font-size: 14px;
    color: #D1D5DB;
}

.login-right {
    flex: 1;
    background: var(--bg-primary);
    padding: var(--spacing-3xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-header {
    margin-bottom: var(--spacing-3xl);
}

.login-form-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.login-form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-demo-accounts {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.demo-account-btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.demo-account-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        min-height: 300px;
    }
    
    .login-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
