:root {
    --primary-100: #1F3A5F;
    --primary-200: #4d648d;
    --primary-300: #acc2ef;
    --accent-100: #3D5A80;
    --accent-200: #cee8ff;
    --text-100: #FFFFFF;
    --text-200: #e0e0e0;
    --bg-100: #0F1C2E;
    --bg-200: #1f2b3e;
    --bg-300: #374357;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-100);
    color: var(--text-100);
    height: 100vh;
    overflow: hidden;
}

/* Poppins for Headings */
h1, h2, h3, h4, h5, h6,
.card-title,
.modal-title,
.confirmation-modal-title,
.client-group-title,
.stat-label,
.sidebar-title,
.profile-header h1,
.section-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dashboard {
    display: flex;
    height: 100vh;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    max-width: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-200);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--bg-300);
    transition: all 0.3s ease;
    position: relative;
    z-index: 99990; /* High z-index to ensure sidebar and its children are above main content */
}

.sidebar.collapsed {
    width: 80px;
    padding: 20px 10px;
    overflow: visible;
    background-color: var(--bg-200);
}

.sidebar.collapsed .user-profile {
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .user-avatar {
    margin-right: 0;
    margin-bottom: 0;
}

.sidebar.collapsed .nav-item {
    padding: 15px 0;
    justify-content: center;
    position: relative;
    border-radius: 8px;
    margin: 8px 0;
}

.sidebar.collapsed .nav-item:hover {
    background-color: var(--bg-300);
    transform: scale(1.1);
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
    font-size: 18px;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-item {
    overflow: visible; /* Ensure tooltip isn't clipped */
}

.sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute; /* Back to absolute positioning */
    left: calc(100% + 15px); /* Position to the right of the nav item */
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-100);
    color: var(--text-100);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    border: 1px solid var(--bg-300);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10; /* Relative to sidebar's stacking context */
    pointer-events: none;
    width: auto;
    min-width: fit-content;
    overflow: visible;
}

.sidebar.collapsed .nav-item::before {
    content: '';
    position: absolute; /* Back to absolute positioning */
    left: calc(100% + 9px); /* Position arrow */
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--bg-100);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 11; /* Above the tooltip background */
    pointer-events: none;
}

.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-item:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Convert group headers to dividers when collapsed */
.sidebar.collapsed .nav-group-header {
    font-size: 0;
    height: 1px;
    background: var(--bg-300);
    padding: 0;
    margin: 15px 10px;
    border: none;
}

.sidebar.collapsed .nav-group:first-child .nav-group-header {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-top: 22px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-300);
}

.user-avatar {
    width: 50px;
    height: 50px;
    background-color: var(--primary-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border: 2px solid var(--bg-300);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: var(--primary-200);
}

.user-avatar.has-avatar {
    background-color: transparent !important;
}

.user-avatar i {
    font-size: 20px;
    color: var(--text-100);
}

/* Force proper avatar styling */
.user-avatar[style*="background-image"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.user-info h3 {
    color: var(--text-100);
    font-size: 18px;
    margin: 0;
    line-height: 1.3;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role-badge .role-medal-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -2px;
}

.user-role-badge.commander {
    color: #ffc107;
}

.user-role-badge.troop {
    color: #9ca3af;
}

/* Medal Icons */
.role-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: relative;
}

.role-medal-icon {
    font-size: 16px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Commander Medal - Gold Crown */
.role-medal.commander .role-medal-icon {
    color: #ffc107;
    animation: subtle-glow-gold 3s ease-in-out infinite;
}

/* Troop Medal - Silver Shield */
.role-medal.troop .role-medal-icon {
    color: #9ca3af;
    animation: subtle-glow-silver 3s ease-in-out infinite;
}

@keyframes subtle-glow-gold {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255, 193, 7, 0.3)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.6)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
}

@keyframes subtle-glow-silver {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(156, 163, 175, 0.3)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(156, 163, 175, 0.5)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
}

/* Sidebar Medal - Larger */
.sidebar .role-medal {
    width: 28px;
    height: 28px;
}

.sidebar .role-medal-icon {
    font-size: 20px;
}

/* Users Table Medal - Slightly smaller */
.user-role .role-medal {
    width: 22px;
    height: 22px;
}

.user-role .role-medal-icon {
    font-size: 15px;
}

.nav-menu {
    flex: 1;
}

.nav-group {
    margin: 20px 0;
}

.nav-group:first-child {
    margin-top: 0;
}

.nav-group-header {
    color: #8B92A3;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px 8px 20px;
    margin-bottom: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin: 5px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-200);
}

.nav-item:hover {
    background-color: var(--bg-300);
    color: var(--text-100);
}

.nav-item.active {
    background-color: var(--accent-100);
    color: var(--text-100);
}

.nav-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.nav-item:hover i {
    color: #FFFFFF;
    transform: scale(1.1);
}

.nav-item.active i {
    color: #FFFFFF;
}

.logout {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--bg-300);
}

.logout .nav-item i {
    color: #E74C3C;
}

.logout .nav-item:hover i {
    color: #EC7063;
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: var(--bg-100);
    padding: 130px 30px 30px 30px;
    overflow-y: auto;
    overflow-x: hidden;
    width: calc(100% - 280px);
    transition: all 0.3s ease;
    max-width: 100%;
}

/* Tab content containers */
.tab-content {
    padding-top: 0;
    max-width: 100%;
    overflow: hidden;
}


.main-content.sidebar-collapsed {
    width: calc(100% - 80px);
}

.main-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    margin-bottom: 50px;
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    background: var(--bg-100);
    border-bottom: 1px solid var(--bg-300);
    z-index: 100000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

.main-content.sidebar-collapsed .main-header {
    left: 80px;
}


/* Clients tab specific header margin */
.main-header.clients-active {
    margin-bottom: 100px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: var(--bg-300);
    border: 1px solid var(--bg-300);
    color: var(--text-100);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.sidebar-toggle:hover {
    background: var(--primary-200);
    border-color: var(--primary-200);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 100, 141, 0.3);
}

.sidebar-toggle:active {
    transform: translateY(0);
}

.download-client-btn {
    background: var(--primary-200);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.download-client-btn:hover {
    background: var(--primary-100);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 100, 141, 0.3);
}

.download-client-btn i {
    font-size: 16px;
}

/* Online Users Component - Google Sheets Style */
.online-users-avatars {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 12px;
    gap: 0;
    padding: 0;
}

.user-avatar-chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    position: relative;
    border: 2px solid var(--bg-100);
    cursor: pointer;
    margin-left: -8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

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

.user-avatar-chip:hover {
    z-index: 10;
}

.user-avatar-chip img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-chip .user-presence-indicator {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-100);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.user-avatar-chip .user-presence-indicator.active {
    background: #10b981;
}

.user-avatar-chip .user-presence-indicator.away {
    background: #f59e0b;
}

/* Tooltip for user avatar - subtle, non-intrusive */
.user-avatar-chip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 40, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.user-avatar-chip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(30, 30, 40, 0.95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    z-index: 10000;
}

.user-avatar-chip:hover::after {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.1s ease, visibility 0s linear;
}

.user-avatar-chip:hover::before {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.1s ease, visibility 0s linear;
}

/* More users indicator */
.more-users-chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-400);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-200);
    font-weight: 600;
    font-size: 11px;
    border: 2px solid var(--bg-100);
    cursor: pointer;
    margin-left: -8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.more-users-chip:hover {
    background: var(--primary-200);
    color: white;
    z-index: 10;
}

.more-users-chip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 40, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

.more-users-chip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(30, 30, 40, 0.95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    z-index: 10000;
}

.more-users-chip:hover::after {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.1s ease, visibility 0s linear;
}

.more-users-chip:hover::before {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.1s ease, visibility 0s linear;
}

.header-icon {
    font-size: 2rem;
    color: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--bg-200), var(--bg-300));
    border-radius: 12px;
    border: 2px solid var(--primary-200);
    box-shadow: 0 4px 12px rgba(77, 100, 141, 0.2);
    flex-shrink: 0;
    padding: 6px;
}

.custom-shield-header {
    width: 100%;
    height: 100%;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-100);
    margin: 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--text-200);
    margin: 0;
    font-weight: 400;
    opacity: 0.8;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
    max-width: 100%;
}

.dashboard-grid-wide {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.card.span-2 {
    grid-column: span 2;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .dashboard-grid-wide {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid-three {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-grid-wide {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid-three {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card.span-2 {
        grid-column: span 1;
    }
}

.card {
    background-color: var(--bg-200);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid var(--bg-300);
    transition: all 0.3s ease;
    max-width: 100%;
    overflow: hidden;
}


/* Stat Cards */
.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-200);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-200);
    font-weight: 500;
}

.stat-change {
    font-size: 0.8rem;
    margin-top: 4px;
}

.stat-change.positive {
    color: #4CAF50;
}

.stat-change.negative {
    color: #f44336;
}

/* Progress Bars */
.progress-container {
    margin: 15px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-300);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-200), var(--accent-200));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Activity Feed */
.activity-feed {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-300);
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-200);
}

/* Charts */
.chart-container {
    position: relative;
    height: 200px;
    margin-top: 20px;
}

.mini-chart {
    height: 80px;
}

/* Status Indicators */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot-small {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot-small.online {
    background: #4CAF50;
}

.status-dot-small.warning {
    background: #ff9800;
}

.status-dot-small.error {
    background: #f44336;
}

.status-dot-small.info {
    background: var(--primary-200);
}

.card-content {
    margin-top: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    color: var(--text-100);
    font-size: 18px;
    font-weight: 600;
}

.card-subtitle {
    color: var(--text-200);
    font-size: 14px;
    margin-top: 5px;
}

.status-card {
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-icon {
    font-size: 24px;
    color: var(--primary-200);
    transition: all 0.3s ease;
}

.status-icon.error {
    color: #f44336;
}

.status-icon.warning {
    color: #ff9800;
}

.status-icon.offline {
    color: #f44336;
}

.status-icon-small {
    font-size: 14px;
    width: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.status-icon-small.online {
    color: var(--primary-200);
}

.status-icon-small.warning {
    color: #ff9800;
}

.status-icon-small.error {
    color: #f44336;
}

.status-icon-small.info {
    color: var(--primary-200);
}

.client-count {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-100);
    margin: 10px 0;
}

.client-list {
    max-height: 200px;
    overflow-y: auto;
}

.client-item {
    background-color: var(--bg-300);
    padding: 15px;
    margin: 10px 0;
    border-radius: 12px;
    border-left: 4px solid var(--primary-200);
    transition: all 0.3s ease;
}

.client-item:hover {
    background-color: var(--bg-100);
    transform: translateX(5px);
}

.client-name {
    color: var(--text-100);
    font-weight: 600;
    margin-bottom: 5px;
}

.client-details {
    color: var(--text-200);
    font-size: 12px;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.command-btn {
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    color: var(--text-100);
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.command-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(77, 100, 141, 0.3);
}

.command-btn:disabled {
    background: var(--bg-300);
    color: var(--text-200);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.log-container {
    background-color: var(--bg-200);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
}

.log {
    background-color: var(--bg-100);
    border: 1px solid var(--bg-300);
    padding: 20px;
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.log-entry {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 8px;
}

.log-entry.info {
    background-color: rgba(77, 100, 141, 0.1);
    border-left: 3px solid var(--primary-200);
}

.log-entry.error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
}

.log-entry.success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4CAF50;
}

.controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.control-btn {
    background-color: var(--bg-300);
    color: var(--text-200);
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background-color: var(--primary-200);
    color: var(--text-100);
}

.empty-state {
    text-align: center;
    color: var(--text-200);
    padding: 40px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--bg-300);
}

/* Layout Toggle Buttons */
.layout-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: flex-end;
}

.layout-btn {
    background: var(--bg-300);
    color: var(--text-200);
    border: 1px solid var(--bg-300);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.layout-btn:hover {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
}

.layout-btn.active {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
}

/* Client Cards - Grid Layout */
.client-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 20px;
    overflow: visible;
    width: 100%;
}

@media (max-width: 1400px) {
    .client-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 600px) {
    .client-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Bulk Actions Toolbar */
.bulk-actions-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-200) 100%);
    border: 1px solid var(--primary-200);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

.bulk-actions-toolbar.active {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.bulk-actions-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-100);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-actions-count i {
    font-size: 18px;
}

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

.bulk-action-btn {
    background: var(--bg-100);
    border: 1px solid var(--border-100);
    color: var(--text-100);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-action-btn:hover {
    background: var(--bg-200);
    border-color: var(--primary-100);
    transform: translateY(-1px);
}

.bulk-action-btn i {
    font-size: 14px;
}

.bulk-action-btn-primary {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.bulk-action-btn-primary:hover {
    background: #28a745;
    border-color: #28a745;
}

.bulk-action-btn-danger {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.bulk-action-btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        padding: 15px;
    }
    
    .main-content {
        width: 100%;
        padding: 150px 20px 20px 20px;
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 20px;
        margin-bottom: 35px;
        left: 0;
    }

    .main-content.sidebar-collapsed .main-header {
        left: 0;
    }

    /* Clients tab specific mobile spacing */
    .main-header.clients-active {
        margin-bottom: 70px;
    }

    /* Group header responsive adjustments */
    .client-group-header-right {
        gap: 12px;
    }

    .client-group-stats {
        gap: 12px;
        font-size: 11px;
    }

    .client-group-stat {
        min-width: 20px;
        gap: 4px;
    }

    .client-group-stat i {
        font-size: 9px;
        width: 9px;
    }

    .client-group-stat span {
        min-width: 10px;
        font-size: 11px;
    }

    .expand-collapse-toggle {
        min-width: 36px;
        height: 32px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .new-group-btn {
        padding: 6px 12px;
        font-size: 11px;
        margin-right: 6px;
        min-height: 32px;
    }

    .new-group-btn i {
        font-size: 10px;
    }

    .new-group-btn span {
        display: none;
    }

    .client-group-bulk-controls {
        padding: 8px 12px 6px 12px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .group-select-toggle {
        padding: 6px 12px;
        font-size: 11px;
        gap: 4px;
        margin-right: 8px;
        min-height: 32px;
    }

    .bulk-control-btn {
        min-width: 60px;
        font-size: 11px;
        padding: 5px 8px;
        gap: 4px;
    }

    .bulk-control-btn span {
        display: none;
    }

    .group-progress-container {
        min-width: 140px;
        gap: 8px;
    }

    .group-progress-spinner {
        font-size: 14px;
    }

    .group-progress-text {
        font-size: 12px;
        min-width: 70px;
    }

    /* Adjust client cards container height for mobile */
    #client-cards-container {
        min-height: calc(100vh - 350px);
    }

    /* Total clients counter responsive */
    .total-clients-counter {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 13px;
    }

    .total-clients-label {
        font-size: 13px;
    }

    .total-clients-stats {
        gap: 12px;
    }

    .total-stat {
        font-size: 13px;
    }

    .total-stat span {
        font-size: 13px;
    }

    .total-stat-main {
        padding-left: 12px;
    }

}

/* Client Cards - List Layout */
.client-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    overflow: visible;
}

.client-card-list-item {
    background: #0F1C2E;
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: grab;
    position: relative;
    overflow: visible;
}


.client-card-list-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.client-card-list-item.selected {
    border-color: var(--primary-200);
    box-shadow: 0 4px 16px rgba(77, 100, 141, 0.25);
}

.client-card-list-item:has(.client-actions-dropdown.active),
.client-card-list-item:has(.client-actions-menu.active) {
    z-index: 99999;
    overflow: visible !important;
}

.client-list-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.client-list-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-list-name {
    color: var(--text-100);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    position: relative;
}

.client-list-details {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-200);
    font-size: 12px;
}

.client-list-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.client-list-detail-item i {
    color: var(--primary-200);
    font-size: 10px;
}

.client-list-actions {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.client-list-actions:has(.client-actions-dropdown.active),
.client-list-actions:has(.client-actions-menu.active) {
    overflow: visible !important;
    z-index: 99999;
}

.client-list-action-btn {
    background: var(--bg-300);
    color: var(--text-200);
    border: 1px solid var(--bg-300);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
}

.client-list-action-btn:hover {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
}

.client-list-action-btn:disabled {
    background: var(--bg-100);
    color: var(--text-200);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Client Cards Container */
#client-cards-container {
    min-height: calc(100vh - 280px);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow: hidden;
}

#client-cards-container:has(.group-actions-dropdown.active),
#client-cards-container:has(.group-actions-menu.active) {
    overflow: visible !important;
}

/* Total Clients Counter */
.total-clients-counter {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 16px;
    padding: 0;
    font-size: 14px;
    color: var(--text-200);
}

.total-clients-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-200);
}

.total-clients-label i {
    font-size: 14px;
    color: var(--text-200);
}

.total-clients-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.total-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-200);
}

.total-stat i {
    font-size: 8px;
}

.total-stat span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-100);
}

.total-stat-main {
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.total-stat-main i {
    font-size: 14px;
    color: var(--text-200);
}

/* Client Groups Styling */
.client-groups-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.client-group {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    transition: all 0.3s ease;
    margin-bottom: 0;
    position: relative;
}

.client-group:has(.client-actions-dropdown.active),
.client-group:has(.client-actions-menu.active),
.client-group:has(.group-actions-dropdown.active),
.client-group:has(.group-actions-menu.active) {
    overflow: visible !important;
    z-index: 100;
}

.client-group:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.client-group:first-child .client-group-header {
    border-radius: 8px 8px 0 0;
}

.client-group:last-child .client-group-header {
    border-radius: 0;
}

.client-group:last-child.collapsed .client-group-header {
    border-radius: 0 0 8px 8px;
}

.client-group:first-child:last-child .client-group-header {
    border-radius: 8px;
}

.client-group.collapsed .client-group-header {
    border-radius: 0;
}

.client-group-header {
    background: #28374f;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: var(--text-100);
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 68px;
    overflow: visible;
    position: relative;
    /* z-index: 1; */
}

.client-group-header:has(.group-actions-dropdown.active),
.client-group-header:has(.group-actions-menu.active) {
    overflow: visible !important;
    z-index: 2100;
}

.client-group-header:hover {
    background: #2f4058;
    box-shadow: none;
}

.client-group-header:active {
    background: #232f45;
}

.client-group-header:has(.group-actions-dropdown.active) {
    z-index: 1999;
}

.client-group-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.client-group-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    position: relative;
}

.client-group-toggle {
    font-size: 13px;
    transition: transform 0.3s ease;
    color: var(--text-200);
    opacity: 0.7;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.client-group-header:hover .client-group-toggle {
    opacity: 1;
    color: var(--text-100);
}

.client-group.expanded .client-group-toggle {
    transform: rotate(90deg);
}

.client-group-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.01em;
    line-height: 1.4;
    color: var(--text-100);
    opacity: 0.85;
}

.group-datetime {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-200);
    white-space: nowrap;
    opacity: 0.6;
    padding-right: 20px;
    margin-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.client-group-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    opacity: 1;
    line-height: 1.2;
}

.client-group-stat {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 32px;
    justify-content: flex-start;
}

.client-group-stat i {
    font-size: 11px;
    flex-shrink: 0;
    width: 12px;
    text-align: center;
}

.client-group-stat span {
    font-weight: 600;
    line-height: 1;
    min-width: 14px;
    text-align: left;
    font-size: 13px;
}

/* Maintenance indicator in group stats */
.client-group-stat.maintenance-stat {
    animation: pulse-maintenance 2s ease-in-out infinite;
}

.client-group-stat.maintenance-stat i {
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.5));
}

@keyframes pulse-maintenance {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.client-group-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.client-group-header:hover .client-group-actions {
    opacity: 1;
}

.client-group-bulk-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    margin: 0;
}

.group-select-toggle {
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    color: var(--text-100);
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    margin-right: 12px;
}

.group-select-toggle:hover {
    transform: translateY(-2px);
}

.group-select-toggle.all-selected {
    background: linear-gradient(135deg, var(--danger-600), var(--danger-500));
}

.group-select-toggle.all-selected:hover {
    transform: translateY(-2px);
}

.bulk-control-btn {
    background: var(--bg-300);
    border: 1px solid var(--bg-300);
    color: var(--text-100);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.bulk-control-btn:hover:not(:disabled) {
    background: var(--bg-400);
    border-color: var(--bg-400);
    color: var(--text-100);
}

.bulk-control-btn:disabled {
    background: var(--bg-200);
    border-color: var(--bg-200);
    color: var(--text-300);
    opacity: 0.6;
    cursor: not-allowed;
}

.bulk-control-btn:disabled:hover {
    background: var(--bg-200);
    border-color: var(--bg-200);
    color: var(--text-300);
}

/* Group Progress Spinner Style */
.group-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    padding: 0;
    background: transparent;
    border: none;
    margin-bottom: 8px;
    color: var(--text-200);
    font-size: 13px;
    font-weight: 500;
}

.group-progress-spinner {
    color: #00dd00;
    font-size: 16px;
}

.group-progress-text {
    font-size: 13px;
    color: #00dd00;
    white-space: nowrap;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.3px;
}

.client-group-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 7px 9px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.client-group-action-btn i {
    transition: all 0.2s ease;
}

.client-group-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.client-group-action-btn:hover i {
    filter: brightness(1.2);
}

.client-group-action-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.12);
}

.client-group-action-btn.disabled,
.client-group-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.client-group-action-btn.disabled:hover,
.client-group-action-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-200);
    transform: none;
}

/* Group Actions Dropdown */
.group-actions-dropdown {
    position: relative;
    z-index: 1;
}

.group-actions-dropdown.active {
    z-index: 2000;
}

.group-actions-toggle {
    color: var(--text-200);
}

.group-actions-toggle:hover {
    color: var(--text-100);
}

.group-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 2001;
}

.group-actions-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Position group dropdown upward when near bottom */
.group-actions-menu.open-upward {
    top: auto;
    bottom: calc(100% + 8px);
}

.group-actions-section-title {
    padding: 10px 16px 6px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.group-actions-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.group-actions-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.group-actions-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.group-actions-menu-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.group-actions-menu-item span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-100);
}

.group-actions-menu-item.group-actions-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.group-actions-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.group-actions-menu-item.disabled:hover {
    background: transparent;
}

.group-actions-menu-item.disabled span {
    color: #9ca3af;
}

.client-group-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.client-group.expanded .client-group-content {
    max-height: none;
    padding: 20px;
    background: #2d3d56;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: visible;
}

.client-group.expanded .client-group-content:has(.client-actions-dropdown.active),
.client-group.expanded .client-group-content:has(.client-actions-menu.active) {
    overflow: visible !important;
}

.client-group:last-child.expanded .client-group-content {
    border-radius: 0 0 7px 7px;
}

.client-group-clients {
    display: grid;
    gap: 12px;
    overflow: visible;
}

.client-group-clients:has(.client-actions-dropdown.active),
.client-group-clients:has(.client-actions-menu.active) {
    overflow: visible !important;
    position: relative;
    z-index: 100;
}

.client-group-clients.grid-layout {
    grid-template-columns: repeat(4, 1fr);
}

.client-group-clients.list-layout {
    grid-template-columns: 1fr;
}

.client-group-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.client-group-empty i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 12px;
    display: block;
}

/* Group Management Modal */
.group-management-bar {
    background: var(--bg-200);
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.group-management-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-management-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-btn {
    background: var(--primary-100);
    color: var(--text-100);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.group-btn:hover {
    background: var(--primary-200);
    transform: translateY(-1px);
}

.group-btn.secondary {
    background: var(--bg-300);
    color: var(--text-200);
}

.group-btn.secondary:hover {
    background: var(--bg-400);
    color: var(--text-100);
}

/* Drag and Drop Styling */
.client-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(0.95);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 2px dashed var(--primary-200);
    cursor: grabbing;
}

.client-card-list-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.98);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 2px dashed var(--primary-200);
    cursor: grabbing;
}

.client-group.drop-target {
    background: rgba(34, 197, 94, 0.08);
    box-shadow: inset 0 0 0 2px var(--success-100);
    transition: all 0.2s ease;
}

.client-group-content.drop-zone {
    border: 2px dashed var(--success-100);
    background: rgba(34, 197, 94, 0.1);
    border-radius: 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.client-group-content.drop-zone::after {
    content: "Drop client here";
    color: var(--success-100);
    font-size: 14px;
    font-weight: 500;
    position: absolute;
    pointer-events: none;
    opacity: 0.7;
}

/* Dropdown Button Styling - Match Server Logs Design */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: var(--bg-300);
    border: 1px solid var(--bg-300);
    color: var(--text-100);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: space-between;
}

.dropdown-btn:hover {
    background: var(--bg-200);
}

.dropdown-btn:focus {
    outline: none;
    border-color: var(--primary-200);
    background: var(--bg-200);
    box-shadow: 0 0 0 2px rgba(77, 100, 141, 0.1);
}

.dropdown-btn i.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-btn i.dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-300);
    border: 1px solid var(--bg-300);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    margin-top: 2px;
}

.dropdown.active .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: var(--text-100);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: var(--bg-300);
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-200);
}

/* Expand/Collapse Toggle Button */
.expand-collapse-toggle {
    background: var(--bg-300);
    border: 1px solid var(--bg-400);
    color: var(--text-200);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-width: 40px;
    height: 36px;
}

.expand-collapse-toggle:hover {
    background: var(--bg-400);
    color: var(--text-100);
    border-color: var(--bg-500);
}

.expand-collapse-toggle:active {
    transform: translateY(1px);
}

/* New Group Button */
.new-group-btn {
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    color: var(--text-100);
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    white-space: nowrap;
    margin-right: 8px;
}

.new-group-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(77, 100, 141, 0.3);
}

.new-group-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(77, 100, 141, 0.1);
}

.new-group-btn i {
    font-size: 12px;
}

.dropdown-item.active {
    background: var(--primary-200);
    color: var(--text-100);
}

.dropdown-item i {
    font-size: 11px;
    width: 14px;
}

/* Client Move Button */
.client-move-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-300);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 1;
    margin-right: 4px;
}

.client-move-btn:hover {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
}

/* Client Running Status */
.client-running-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #60a5fa;
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulse-status 2s ease-in-out infinite;
}

.client-running-status i {
    font-size: 10px;
    color: #60a5fa;
}

.client-running-status .status-text {
    font-size: 11px;
    font-weight: 500;
    color: #93c5fd;
    letter-spacing: 0.3px;
}

@keyframes pulse-status {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Maintenance Request Badge */
.maintenance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    animation: pulse-badge 2s ease-in-out infinite;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.maintenance-badge:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transform: scale(1.08);
}

.maintenance-badge:active {
    transform: scale(0.98);
}

/* Text change on hover for list view */
.maintenance-badge .badge-text::before {
    content: 'Maintenance';
}

.maintenance-badge:hover .badge-text::before {
    content: 'Complete';
}

/* Compact version for grid layout */
.client-card .maintenance-badge {
    font-size: 13px;
    padding: 3px 7px;
    gap: 2px;
}

/* Icon only for very tight spaces */
.maintenance-badge-icon-only {
    padding: 3px 5px;
    font-size: 12px;
}

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

/* Client Card Header Actions */
.client-card-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.client-card-header-actions:has(.client-actions-dropdown.active),
.client-card-header-actions:has(.client-actions-menu.active) {
    z-index: 99999;
    overflow: visible !important;
}


/* Client Actions Dropdown */
.client-actions-dropdown {
    position: relative;
    z-index: 10;
}

.client-actions-dropdown.active {
    z-index: 10000;
}

.client-actions-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-200);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.client-actions-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-100);
    border-color: rgba(255, 255, 255, 0.3);
}

.client-actions-toggle:focus {
    outline: 2px solid var(--primary-200);
    outline-offset: 2px;
}

.client-actions-toggle i {
    font-size: 14px;
    pointer-events: none;
}

.client-actions-toggle:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.client-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #0a1628;
    border: 2px solid #334155;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.9);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 99999;
    opacity: 100;
    /* backdrop-filter: blur(0px); */
}

.client-actions-menu.active {
    display: block;
}

/* Position dropdown upward when near bottom */
.client-actions-menu.open-upward {
    top: auto;
    bottom: calc(100% + 8px);
}


.client-actions-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
    background: #0a1628;
}

.client-actions-menu-item:hover {
    background: #1e293b;
}

.client-actions-menu-item.disabled {
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
    background: #0a1628;
    color: #64748b;
}

.client-actions-menu-item.disabled span {
    color: #64748b;
}

.client-actions-menu-item.disabled i {
    color: #64748b;
}

.client-actions-menu-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.client-actions-menu-item span {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
}

.client-actions-menu-item.danger:hover {
    background: #2d1a1a;
    color: #ef4444;
}

.client-actions-separator {
    height: 1px;
    background: #334155;
    margin: 8px 0;
}

/* Detach Client Modal */
.detach-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
}

.detach-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detach-modal-content {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease-out;
}

.detach-modal-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
}

.detach-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.detach-modal-message p {
    color: var(--text-100);
    font-size: 16px;
    margin: 0 0 20px 0;
    text-align: center;
}

.detach-modal-details {
    background: var(--bg-300);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.detach-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-200);
    font-size: 14px;
    margin-bottom: 8px;
}

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

.detach-detail-item i {
    color: var(--primary-200);
    width: 16px;
}

.detach-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.detach-btn {
    background: var(--bg-300);
    color: var(--text-100);
    border: 1px solid var(--bg-300);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detach-btn-secondary:hover {
    background: var(--bg-400);
    border-color: var(--bg-400);
}

.detach-btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.detach-btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
}

/* Move Client Modal */
.move-client-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.move-client-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-client-modal-content {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    margin: 20px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.move-client-modal-header {
    background: var(--primary-100);
    color: var(--text-100);
    padding: 20px 24px;
    border-bottom: 1px solid var(--bg-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.move-client-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.move-client-modal-close {
    background: none;
    border: none;
    color: var(--text-100);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.move-client-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.move-client-modal-body {
    padding: 24px;
}

.move-client-info {
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--primary-200);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.move-client-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.move-client-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-100);
}

.move-client-name-section h4 {
    margin: 0 0 4px 0;
    color: var(--text-100);
    font-size: 16px;
    font-weight: 600;
}

.move-client-name-section .move-client-user {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.move-client-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.move-client-spec {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.move-client-spec i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    width: 16px;
}

.move-client-spec span {
    color: var(--text-100);
    font-size: 12px;
    font-weight: 500;
}

.move-client-current-group {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.move-client-current-group i {
    color: var(--success-200);
    font-size: 14px;
}

.move-client-current-group span {
    color: var(--text-100);
    font-size: 12px;
}

.move-client-current-group .group-name {
    font-weight: 600;
}

/* Rename Client Modal */
.rename-client-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.rename-client-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rename-client-modal-content {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 450px;
    width: 90%;
    margin: 20px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.rename-client-modal-header {
    background: var(--primary-100);
    color: var(--text-100);
    padding: 20px 24px;
    border-bottom: 1px solid var(--bg-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rename-client-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rename-client-modal-close {
    background: none;
    border: none;
    color: var(--text-100);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.rename-client-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rename-client-modal-body {
    padding: 24px;
}

.rename-client-info {
    margin-bottom: 20px;
}

.rename-client-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-100);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.rename-client-label i {
    color: var(--primary-200);
    font-size: 16px;
}

.rename-client-description {
    color: var(--text-300);
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

.rename-input-group {
    margin-bottom: 24px;
}

.rename-input-group label {
    display: block;
    color: var(--text-200);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.rename-client-input {
    width: 100%;
    background: var(--bg-100);
    border: 1px solid var(--bg-300);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-100);
    font-size: 14px;
    transition: all 0.2s ease;
}

.rename-client-input:focus {
    outline: none;
    border-color: var(--primary-200);
    background: var(--bg-200);
    box-shadow: 0 0 0 3px rgba(77, 100, 141, 0.1);
}

.rename-client-input::placeholder {
    color: var(--text-400);
}

.rename-client-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.rename-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.rename-btn-secondary {
    background: var(--bg-300);
    color: var(--text-100);
    border: 1px solid var(--bg-300);
}

.rename-btn-secondary:hover {
    background: var(--bg-400);
    border-color: var(--bg-400);
}

.rename-btn-primary {
    background: var(--primary-200);
    color: var(--text-100);
}

.rename-btn-primary:hover {
    background: var(--primary-300);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 100, 141, 0.3);
}

/* Bulk Move Styles */
.move-bulk-header {
    margin-bottom: 16px;
}

.move-bulk-count {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.move-bulk-count i {
    font-size: 20px;
    color: var(--text-100);
}

.move-bulk-count h4 {
    margin: 0;
    color: var(--text-100);
    font-size: 18px;
    font-weight: 600;
}

.move-bulk-description {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.move-clients-list {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    margin-top: 12px;
}

.move-client-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 6px;
}

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

.move-client-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.move-client-item-left i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.move-client-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.move-client-item-name {
    color: var(--text-100);
    font-size: 13px;
    font-weight: 600;
}

.move-client-item-user {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.move-client-item-group {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.move-client-item-group i {
    font-size: 10px;
}

.move-groups-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.move-group-item {
    background: var(--bg-100);
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.move-group-item:hover {
    background: var(--bg-300);
    border-color: var(--primary-200);
}

.move-group-item.current-group {
    background: var(--primary-100);
    border-color: var(--primary-200);
    color: var(--text-100);
}

.move-group-item.current-group:hover {
    background: var(--primary-200);
}

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

.move-group-icon {
    color: var(--primary-200);
    font-size: 14px;
}

.move-group-item.current-group .move-group-icon {
    color: var(--text-100);
}

.move-group-details h5 {
    margin: 0 0 2px 0;
    color: var(--text-100);
    font-size: 13px;
}

.move-group-details p {
    margin: 0;
    color: var(--text-300);
    font-size: 11px;
}

.move-group-item.current-group .move-group-details h5,
.move-group-item.current-group .move-group-details p {
    color: var(--text-100);
}

.move-group-current {
    color: var(--success-200);
    font-size: 11px;
    font-weight: 500;
}

/* Confirmation Modal */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 11000;
    animation: fadeIn 0.2s ease;
}

.confirmation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-modal-content {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 90%;
    margin: 20px;
    overflow: hidden;
    animation: slideIn 0.2s ease;
}

.confirmation-modal-header {
    background: var(--primary-100);
    color: var(--text-100);
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-300);
}

.confirmation-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.confirmation-modal-body {
    padding: 20px;
}

.confirmation-modal-message {
    color: var(--text-100);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.confirmation-modal-input {
    width: 100%;
    background: var(--bg-300);
    border: 1px solid var(--bg-300);
    color: var(--text-100);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
}

.confirmation-modal-input:focus {
    outline: none;
    border-color: var(--primary-200);
    background: var(--bg-200);
    box-shadow: 0 0 0 2px rgba(77, 100, 141, 0.1);
}

.confirmation-modal-input::placeholder {
    color: var(--text-300);
}

.confirmation-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirmation-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.confirmation-btn-primary {
    background: var(--primary-200);
    color: var(--text-100);
}

.confirmation-btn-primary:hover {
    background: var(--primary-100);
}

.confirmation-btn-danger {
    background: #dc2626;
    color: white;
    border: 1px solid #b91c1c;
}

.confirmation-btn-danger:hover {
    background: #b91c1c;
    border-color: #991b1b;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.confirmation-btn-secondary {
    background: var(--bg-300);
    color: var(--text-200);
}

.confirmation-btn-secondary:hover {
    background: var(--bg-400);
    color: var(--text-100);
}

.confirmation-btn i {
    margin-right: 6px;
    font-size: 13px;
}

/* File Upload Modal Styles */
.file-upload-section {
    margin-bottom: 20px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-100);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-upload-label i {
    color: var(--primary-200);
}

.file-upload-area {
    border: 2px dashed var(--bg-400);
    border-radius: 8px;
    padding: 24px;
    background: var(--bg-300);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-area:hover {
    border-color: var(--primary-200);
    background: var(--bg-200);
}

.file-upload-area.drag-over {
    border-color: var(--primary-100);
    background: var(--primary-200);
    opacity: 0.8;
}

.file-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-upload-placeholder i {
    font-size: 32px;
    color: var(--text-300);
    margin-bottom: 4px;
}

.file-upload-placeholder p {
    margin: 0;
    font-size: 14px;
    color: var(--text-200);
}

.file-upload-selected {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary-200);
    font-weight: 500;
}

.file-upload-selected:empty {
    display: none;
}

/* Broadcast Confirmation Modal - Yellow Header */
#broadcast-confirmation-modal .move-client-modal-header {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
}

#broadcast-confirmation-modal .move-client-modal-title {
    color: #1f2937;
}

#broadcast-confirmation-modal .move-client-modal-close {
    color: #1f2937;
}

#broadcast-confirmation-modal .move-client-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Passcode Lock Screen */
.passcode-lock-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 100000;
    justify-content: center;
    align-items: center;
}

.passcode-lock-overlay.active {
    display: flex;
}

.passcode-lock-content {
    background: var(--bg-100);
    border: 1px solid var(--border-100);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.passcode-lock-icon {
    font-size: 48px;
    color: var(--primary-100);
    margin-bottom: 20px;
}

.passcode-lock-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-100);
    margin-bottom: 10px;
}

.passcode-lock-description {
    font-size: 14px;
    color: var(--text-200);
    margin-bottom: 20px;
}

.passcode-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-100);
}

.passcode-timer i {
    font-size: 16px;
}

.passcode-timer.warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.passcode-timer-note {
    font-size: 12px;
    color: var(--text-300);
    margin: -16px 0 20px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.passcode-timer-note i {
    font-size: 11px;
}

.passcode-input {
    width: 100%;
    padding: 16px;
    background: var(--bg-200);
    border: 2px solid var(--border-100);
    border-radius: 8px;
    color: var(--text-100);
    font-size: 24px;
    text-align: center;
    letter-spacing: 10px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.passcode-input:focus {
    outline: none;
    border-color: var(--primary-100);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.passcode-input.error {
    border-color: var(--accent-red);
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.passcode-error {
    color: var(--accent-red);
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 10px;
    display: none;
}

.passcode-error.active {
    display: block;
}

.passcode-buttons {
    display: flex;
    gap: 12px;
}

.passcode-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.passcode-btn-cancel {
    background: var(--bg-200);
    color: var(--text-100);
}

.passcode-btn-cancel:hover {
    background: var(--bg-300);
}

.passcode-btn-unlock {
    background: var(--primary-100);
    color: white;
}

.passcode-btn-unlock:hover {
    background: var(--primary-200);
    transform: translateY(-1px);
}

.passcode-btn-unlock:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Warning Note Box */
.warning-note-box {
    background: #fef3c7;
    border: none;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 
        0 4px 6px -1px rgba(245, 158, 11, 0.1),
        0 2px 4px -1px rgba(245, 158, 11, 0.06),
        0 0 0 1px rgba(245, 158, 11, 0.1);
    position: relative;
    overflow: hidden;
}

.warning-note-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #f59e0b;
    border-radius: 12px 12px 0 0;
}

.warning-note-box p {
    margin: 0;
    color: #92400e;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

.warning-note-box strong {
    color: #b45309;
    font-weight: 700;
}

/* Confirmation Modal Message Styling */
.confirmation-modal-message ul {
    list-style-type: disc;
    margin: 8px 0;
    padding-left: 20px;
}

.confirmation-modal-message li {
    margin-bottom: 4px;
    list-style-type: disc;
}

/* Search Bar Styling */

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.open {
    display: flex;
}

.modal-content {
    background: var(--bg-100);
    border: 1px solid var(--border-100);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 130%;
    min-width: 1200px;
    /* max-width: 2500px; */
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--bg-300);
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
}

.modal-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-indicators {
    display: flex;
    gap: 16px;
    align-items: center;
}

.connection-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.9;
}

.connection-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4CAF50; /* Green for connected */
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
    transition: all 0.3s ease;
}

.connection-indicator.disconnected .connection-circle {
    background-color: #f44336; /* Red for disconnected */
    box-shadow: 0 0 4px rgba(244, 67, 54, 0.5);
}


.connection-indicator i {
    color: #4CAF50;
}

.connection-indicator.disconnected i {
    color: #f44336;
}


.connection-indicator.disconnected span {
    color: rgba(255, 255, 255, 0.6);
}


.auto-refresh-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.9;
}

.auto-refresh-indicator i {
    animation: spin 2s linear infinite;
    color: rgba(255, 255, 255, 0.9);
}

.auto-refresh-indicator.paused i {
    animation-play-state: paused;
    color: rgba(255, 255, 255, 0.5);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.refresh-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.refresh-controls select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-controls select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.refresh-controls select option {
    background: var(--bg-200);
    color: var(--text-100);
}

.last-updated {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.last-updated i {
    font-size: 10px;
}

.refresh-error {
    color: #f44336;
    font-size: 11px;
    margin-left: 8px;
}

.modal-header h2 {
    color: var(--text-100);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-100);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 24px; /* Equal padding on all sides for symmetry */
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.modal-left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.modal-section.health-section {
    margin-top: -24px; /* Move Health & Security up even more to align with Network/WiFi cards */
    padding-bottom: 16px; /* Add bottom padding for better spacing */
}

.modal-section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: var(--text-100);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-200);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-200);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Invitation Toggle Styles */
.invitation-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(77, 100, 141, 0.08);
    border: 2px solid rgba(77, 100, 141, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.invitation-toggle-container:hover {
    background: rgba(77, 100, 141, 0.12);
    border-color: rgba(77, 100, 141, 0.3);
}

.invitation-toggle-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-200);
}

.invitation-toggle-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-100);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.invitation-toggle-label i {
    color: var(--primary-200);
    font-size: 16px;
}

.form-group input {
    background-color: var(--bg-300);
    border: 1px solid var(--bg-300);
    color: var(--text-100);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-200);
    box-shadow: 0 0 0 2px rgba(77, 100, 141, 0.2);
}

.metric-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.status-badge, .health-status, .security-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--bg-300);
    border-radius: 8px;
    width: fit-content;
}

.status-dot, .health-dot, .security-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4CAF50;
}

.health-dot.good {
    background-color: #4CAF50;
}

.health-dot.warning {
    background-color: #ff9800;
}

.health-dot.critical {
    background-color: #f44336;
}

.security-dot.enabled {
    background-color: #4CAF50;
}

.security-dot.disabled {
    background-color: #f44336;
}

.status-text, .health-text, .security-text {
    color: var(--text-100);
    font-size: 14px;
    font-weight: 400;
}

.disk-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.disk-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--bg-300);
    border-radius: 6px;
    font-size: 13px;
}

.disk-drive {
    color: var(--text-100);
    font-weight: 500;
}

.disk-usage {
    color: var(--text-200);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--bg-300);
    flex-shrink: 0;
    background-color: var(--bg-100);
    border-radius: 0 0 16px 16px;
}

.btn-primary, .btn-secondary, .btn-warning {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-200);
    color: var(--text-100);
}

.btn-primary:hover {
    background-color: var(--accent-100);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-300);
    color: var(--text-200);
}

.btn-secondary:hover {
    background-color: var(--bg-200);
    color: var(--text-100);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-300);
    color: var(--text-300);
}

.btn-secondary:disabled:hover {
    background-color: var(--bg-300);
    color: var(--text-300);
    transform: none;
}

.btn-warning {
    background-color: #ff9800;
    color: white;
}

.btn-warning:hover {
    background-color: #f57c00;
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .modal-content {
        width: 98%;
        max-width: 1200px;
        max-height: 90vh;
    }
    
    .modal-body {
        flex-direction: column;
        gap: 16px;
    }
    
    .modal-left-column,
    .modal-right-column {
        flex: none;
    }
    
    .system-info-grid,
    .performance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .health-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 16px; /* Equal padding on all sides for mobile symmetry */
        gap: 12px;
    }
    
    .system-info-grid,
    .performance-grid,
    .health-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-footer {
        padding: 16px 20px;
    }
}

.client-card {
    background: #0F1C2E;
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 
                0px 1px 1px 0px rgba(0,0,0,0.14), 
                0px 1px 3px 0px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    cursor: grab;
    z-index: 1;
    max-width: 100%;
    min-width: 0;
}

.client-card[data-status="offline"] {
    opacity: 0.7;
}

/* List view - Green left border for online clients */
.list-layout .client-card:not([data-status="offline"]),
.list-layout .client-card[data-status="idle"],
.list-layout .client-card[data-status="online"] {
    border-left: 1px solid #4CAF50;
}

/* List view - Red left border for offline clients */
.list-layout .client-card[data-status="offline"] {
    border-left: 1px solid #f44336;
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 3px 5px -1px rgba(0,0,0,0.2), 
                0px 6px 10px 0px rgba(0,0,0,0.14), 
                0px 1px 18px 0px rgba(0,0,0,0.12);
}

.client-card:has(.client-actions-dropdown.active),
.client-card:has(.client-actions-menu.active) {
    z-index: 99999;
    overflow: visible !important;
}

.client-card.selected {
    border-color: var(--primary-200);
    background: #0F1C2E;
    box-shadow: 0px 5px 5px -3px rgba(77, 100, 141, 0.2), 
                0px 8px 10px 1px rgba(77, 100, 141, 0.14), 
                0px 3px 14px 2px rgba(77, 100, 141, 0.12);
}

.client-card.selected::before {
    opacity: 1;
}

.client-card-content {
    padding: 0;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
    max-width: 100%;
    min-width: 0;
}

.client-card-content:has(.client-actions-dropdown.active),
.client-card-content:has(.client-actions-menu.active) {
    overflow: visible !important;
}

/* Task Manager Style Drawer Layout */
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
    max-width: 100%;
    min-width: 0;
}

.info-card {
    background: rgba(77, 100, 141, 0.1);
    border: 1px solid rgba(77, 100, 141, 0.2);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.info-card:hover {
    background: rgba(77, 100, 141, 0.15);
    transform: translateY(-2px);
}

.info-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.info-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.info-label {
    font-size: 11px;
    color: var(--text-200);
    margin-bottom: 2px;
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    color: var(--text-100);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    max-width: 100%;
    min-width: 0;
}

.metric-card {
    background: rgba(77, 100, 141, 0.1);
    border: 1px solid rgba(77, 100, 141, 0.2);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s ease;
    height: 280px;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.metric-card:hover {
    background: rgba(77, 100, 141, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(77, 100, 141, 0.2);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.metric-header .metric-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.metric-title {
    font-size: 12px;
    color: var(--text-100);
    font-weight: 600;
    flex: 1;
    margin-left: 8px;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-100);
}

.metric-values {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
}

.upload-value {
    color: #ff6b6b;
    font-weight: 600;
}

.download-value {
    color: #4ecdc4;
    font-weight: 600;
}

.metric-chart-container {
    flex: 1;
    position: relative;
    min-height: 180px;
}

.metric-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}


.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #F44336);
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.health-card {
    background: rgba(77, 100, 141, 0.1);
    border: 1px solid rgba(77, 100, 141, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.health-card:hover {
    background: rgba(77, 100, 141, 0.15);
    transform: translateY(-2px);
}

.health-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.health-content {
    flex: 1;
}

.health-title {
    font-size: 12px;
    color: var(--text-200);
    margin-bottom: 4px;
    font-weight: 500;
}

.health-value {
    font-size: 14px;
    color: var(--text-100);
    font-weight: 600;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-200);
}

.status-dot.good {
    background: #4CAF50;
}

.status-dot.warning {
    background: #FFC107;
}

.status-dot.critical {
    background: #F44336;
}

.status-text {
    font-size: 12px;
    color: var(--text-100);
    font-weight: 400;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    color: var(--text-100);
    margin-bottom: 20px;
    font-weight: 600;
}

.section-title i {
    color: var(--primary-200);
    font-size: 20px;
}


.client-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.client-checkbox {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-200);
    cursor: pointer;
    margin-top: 2px;
}

.client-info {
    flex: 1;
    margin-left: 16px;
    min-width: 0; /* Allow flex items to shrink */
    overflow: visible;
}

.client-name {
    color: var(--text-100);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.client-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* Allow flex items to shrink */
    overflow: visible;
}

/* Two-column layout for grid view */
.client-details-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-width: 0;
    overflow: visible;
}

.client-details-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.client-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-200);
    font-size: 13px;
    min-width: 0; /* Allow flex items to shrink */
}

.client-detail-item span {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    min-width: fit-content;
}

.client-detail-item i {
    width: 16px;
    color: var(--primary-200);
    font-size: 12px;
}

.client-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    min-width: 0; /* Allow flex items to shrink */
}

.client-status span {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    min-width: fit-content;
    font-size: 13px;
    font-weight: 500;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background-color: #f44336;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.4);
}

.status-indicator.warning {
    background-color: #ff9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

/* Offline client styling */
.client-card:has(.status-indicator.offline) {
    opacity: 0.7;
}

/* List view - Green left border for online client list items */
.client-card-list-item:has(.status-indicator:not(.offline)),
.client-cards-list .client-card-list-item:has(.status-indicator:not(.offline)) {
    border-left: 1px solid #4CAF50;
}

/* List view - Red left border for offline client list items */
.client-card-list-item:has(.status-indicator.offline),
.client-cards-list .client-card-list-item:has(.status-indicator.offline) {
    opacity: 0.7;
    border-left: 1px solid #f44336;
}

.client-card:has(.status-indicator.offline) .client-card-hostname {
    color: rgba(255, 255, 255, 0.7);
}

.client-list-name:has(~ .client-list-details .status-indicator.offline) {
    color: rgba(255, 255, 255, 0.7);
}

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

.client-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    padding: 16px 0 8px 0;
    border-top: 1px solid var(--bg-300);
}

.client-action-btn {
    background: var(--bg-300);
    color: var(--text-200);
    border: 1px solid var(--bg-300);
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.client-action-btn:hover {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
    box-shadow: 0 6px 20px rgba(77, 100, 141, 0.3);
}


.client-action-btn:disabled {
    background: var(--bg-100);
    color: var(--text-200);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Loading state for buttons */
.client-action-btn:disabled .fa-spinner,
.client-list-action-btn:disabled .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Command Button Colors */
.client-action-btn.disk-cleanup {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.client-action-btn.disk-cleanup:hover {
    background: #45a049;
    border-color: #45a049;
    color: white;
}

.client-action-btn.malware-scan {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.client-action-btn.malware-scan:hover {
    background: #da190b;
    border-color: #da190b;
    color: white;
}

.client-action-btn.cleanup-7d {
    background: #ff9800;
    border-color: #ff9800;
    color: white;
}

.client-action-btn.cleanup-7d:hover {
    background: #e68900;
    border-color: #e68900;
    color: white;
}

.client-action-btn.cleanup-30d {
    background: #9c27b0;
    border-color: #9c27b0;
    color: white;
}

.client-action-btn.cleanup-30d:hover {
    background: #7b1fa2;
    border-color: #7b1fa2;
    color: white;
}

.client-action-btn.system-info {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
}

.client-action-btn.system-info:hover {
    background: linear-gradient(135deg, #1976D2, #1CB5E0);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Client Card Header Section */
.client-card-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--bg-300);
    border-radius: 8px 8px 0 0;
    min-height: 50px;
    position: relative;
    z-index: 1;
    max-width: 100%;
    min-width: 0;
}

/* Grid view - Online client header with green bottom border */
.grid-layout .client-card:has(.status-indicator:not(.offline)) .client-card-header-section,
.client-cards-grid .client-card:has(.status-indicator:not(.offline)) .client-card-header-section {
    border-bottom: 1px solid #4CAF50;
}

/* Grid view - Offline client header with red bottom border */
.grid-layout .client-card:has(.status-indicator.offline) .client-card-header-section,
.client-cards-grid .client-card:has(.status-indicator.offline) .client-card-header-section {
    border-bottom: 1px solid #f44336;
}

/* Grid view - Remove left border for offline clients */
.grid-layout .client-card:has(.status-indicator.offline),
.client-cards-grid .client-card:has(.status-indicator.offline) {
    border-left: none !important;
}

.grid-layout .client-card[data-status="offline"],
.client-cards-grid .client-card[data-status="offline"] {
    border-left: none !important;
}

.client-card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.client-card-hostname {
    color: var(--text-100);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    overflow: hidden;
    position: relative;
}

/* Hostname text wrapper for better text handling */
.hostname-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Editable hostname styles */
.editable-hostname {
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: text;
    outline: none;
    border: 1px solid transparent;
}

.editable-hostname:hover {
    background: var(--bg-300);
    border-color: var(--bg-400);
}

.editable-hostname:focus {
    background: var(--bg-250);
    border-color: var(--primary-200);
    box-shadow: 0 0 0 2px rgba(77, 100, 141, 0.1);
    cursor: text;
}

.editable-hostname[contenteditable="true"]:empty:before {
    content: "Computer Name";
    color: var(--text-400);
    font-style: italic;
}

/* Edit hint indicator */
.edit-hint {
    position: fixed;
    background: rgba(30, 30, 40, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.edit-hint.show {
    opacity: 1;
}

.edit-hint-key {
    display: inline-block;
    background: rgba(100, 100, 110, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 10px;
    margin: 0 2px;
    border: 1px solid rgba(150, 150, 160, 0.4);
    color: rgba(255, 255, 255, 0.9);
}

/* Last task info display */
.last-task-separator {
    margin: 0 6px;
    color: var(--text-300);
}

.last-task-time {
    color: var(--text-300);
}

/* Custom tooltip styling */
.hostname-text[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: var(--bg-100);
    color: var(--text-100);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid var(--bg-300);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    margin-top: -8px;
    left: 0;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-100%) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(-100%);
    }
}

.client-card-body {
    padding: 8px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

/* List View Detach Button */
.client-detach-list {
    padding: 4px 8px;
    font-size: 11px;
    margin-right: 12px;
}

/* Client Detach Button */
.client-detach-btn {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.client-detach-btn:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
}

/* List View Button Colors */
.client-list-action-btn.disk-cleanup {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.client-list-action-btn.disk-cleanup:hover {
    background: #45a049;
    border-color: #45a049;
    color: white;
}

.client-list-action-btn.malware-scan {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.client-list-action-btn.malware-scan:hover {
    background: #da190b;
    border-color: #da190b;
    color: white;
}

.client-list-action-btn.cleanup-7d {
    background: #ff9800;
    border-color: #ff9800;
    color: white;
}

.client-list-action-btn.cleanup-7d:hover {
    background: #e68900;
    border-color: #e68900;
    color: white;
}

.client-list-action-btn.cleanup-30d {
    background: #9c27b0;
    border-color: #9c27b0;
    color: white;
}

.client-list-action-btn.cleanup-30d:hover {
    background: #7b1fa2;
    border-color: #7b1fa2;
    color: white;
}

.client-list-action-btn.system-info {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
}

.client-list-action-btn.system-info:hover {
    background: linear-gradient(135deg, #1976D2, #1CB5E0);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}


.client-action-btn i {
    font-size: 16px;
}

/* Server Logs Terminal Styles */
.logs-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logs-controls-left {
    display: flex;
    gap: 10px;
}

.logs-controls-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    color: var(--text-200);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.filter-label i {
    font-size: 11px;
    color: var(--primary-200);
}

.filter-input,
.filter-select {
    background: var(--bg-300);
    border: 1px solid var(--bg-300);
    color: var(--text-100);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-200);
    background: var(--bg-200);
    box-shadow: 0 0 0 2px rgba(77, 100, 141, 0.1);
}

.filter-select option {
    background: var(--bg-300);
    color: var(--text-100);
}

.filter-clear-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52) !important;
    color: white !important;
    min-width: auto !important;
}

.filter-clear-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff5252, #e57373) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.filter-clear-btn:disabled {
    background: var(--bg-300) !important;
    color: var(--text-200) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.5 !important;
}

.filter-active-indicator {
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    color: var(--text-100);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(77, 100, 141, 0.3);
    white-space: nowrap;
    margin-right: 8px;
}

.logs-controls {
    position: relative;
}

.logs-control-btn {
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    color: var(--text-100);
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
}

.logs-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(77, 100, 141, 0.3);
}

.logs-control-btn:disabled {
    background: var(--bg-300);
    color: var(--text-200);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.logs-container {
    background-color: #1F2B3E;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bg-300);
}

.logs-body {
    height: calc(100vh - 280px);
    overflow-y: auto;
    background: #1F2B3E;
}

.logs-content {
    padding: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.log-line {
    display: flex;
    align-items: center;
    margin-bottom: 1px;
    padding: 6px 8px;
    border-left: 4px solid transparent;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.log-line.info {
    border-left-color: var(--primary-200);
    background: rgba(77, 100, 141, 0.08);
}

.log-line.error {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.08);
}

.log-line.success {
    border-left-color: #4CAF50;
    background: rgba(76, 175, 80, 0.08);
}

.log-line.warning {
    border-left-color: #ff9800;
    background: rgba(255, 152, 0, 0.08);
}

.log-timestamp {
    color: var(--text-200);
    min-width: 160px;
    margin-right: 12px;
    font-size: 12px;
    font-family: monospace;
}

.log-level {
    min-width: 60px;
    margin-right: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    text-align: center;
}

.log-level.info {
    color: var(--primary-200);
    background: rgba(77, 100, 141, 0.1);
}

.log-level.error {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.log-level.warning {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.log-level.success {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.log-level.debug {
    color: var(--accent-200);
    background: rgba(206, 232, 255, 0.1);
}

.log-category {
    min-width: 50px;
    margin-right: 8px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 2px;
    text-align: center;
    white-space: nowrap;
}

.log-category.debug {
    color: white;
    background: linear-gradient(135deg, #9C27B0, #673AB7);
}

.log-category.server {
    color: white;
    background: linear-gradient(135deg, #607D8B, #455A64);
}

.log-category.client {
    color: white;
    background: linear-gradient(135deg, #00BCD4, #0097A7);
}

.log-message {
    color: var(--text-100);
    flex: 1;
    font-size: 13px;
}

.log-line:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* New log highlighting */
.log-line.new-log {
    animation: newLogHighlight 2s ease-in-out;
    border-left-width: 6px !important;
    box-shadow: 0 0 15px rgba(77, 100, 141, 0.4);
}

.logs-empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #8FA8B2;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.logs-empty-state.show {
    display: flex;
}

.logs-empty-state .empty-icon {
    font-size: 48px;
    color: #4D648D;
    margin-bottom: 16px;
    opacity: 0.7;
}

.logs-empty-state .empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #B8C5D1;
    margin-bottom: 8px;
}

.logs-empty-state .empty-subtitle {
    font-size: 14px;
    color: #8FA8B2;
    line-height: 1.5;
    max-width: 400px;
}

.logs-empty-state .empty-filters {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(77, 100, 141, 0.1);
    border-radius: 8px;
    border-left: 3px solid #4D648D;
}

.logs-empty-state .filter-tag {
    display: inline-block;
    background: rgba(77, 100, 141, 0.2);
    color: #B8C5D1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px 4px;
    font-weight: 500;
}

@keyframes newLogHighlight {
    0% {
        background: rgba(77, 100, 141, 0.3);
        transform: translateX(5px);
    }
    50% {
        background: rgba(77, 100, 141, 0.2);
        transform: translateX(2px);
    }
    100% {
        background: rgba(255, 255, 255, 0.05);
        transform: translateX(0);
    }
}

/* Scrollbar styling for logs */
.logs-body::-webkit-scrollbar {
    width: 8px;
}

.logs-body::-webkit-scrollbar-track {
    background: var(--bg-200);
}

.logs-body::-webkit-scrollbar-thumb {
    background: var(--bg-300);
    border-radius: 4px;
}

.logs-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-200);
}

/* Pagination Styles */
.logs-pagination {
    background: var(--bg-200);
    border-top: 1px solid var(--bg-300);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-200);
    font-size: 13px;
}

.pagination-select {
    background: var(--bg-300);
    color: var(--text-100);
    border: 1px solid var(--bg-300);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.pagination-select:focus {
    outline: none;
    border-color: var(--primary-200);
    box-shadow: 0 0 0 2px rgba(77, 100, 141, 0.1);
}

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

.pagination-btn {
    background: var(--bg-300);
    color: var(--text-200);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-200);
    color: var(--text-100);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.pagination-page {
    background: var(--bg-300);
    color: var(--text-200);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.pagination-page:hover {
    background: var(--primary-200);
    color: var(--text-100);
    transform: translateY(-1px);
}

.pagination-page.active {
    background: var(--primary-200);
    color: var(--text-100);
    box-shadow: 0 2px 8px rgba(77, 100, 141, 0.3);
}

.pagination-ellipsis {
    color: var(--text-200);
    padding: 0 8px;
    font-size: 12px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .logs-pagination {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-info {
        order: 2;
        justify-content: center;
    }

    .pagination-controls {
        order: 1;
        justify-content: center;
    }

    .pagination-pages .pagination-page:not(.active) {
        display: none;
    }

    .pagination-pages .pagination-page.active ~ .pagination-page:first-of-type,
    .pagination-pages .pagination-page.active + .pagination-page {
        display: flex;
    }
}

.selection-btn {
    background-color: var(--bg-300);
    color: var(--text-200);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
}

.selection-btn:hover {
    background-color: var(--primary-200);
    color: var(--text-100);
    transform: translateY(-1px);
}

.selection-btn.active {
    background-color: var(--primary-200);
    color: var(--text-100);
}

.selection-btn:active {
    background-color: var(--accent-100);
    color: var(--text-100);
    transform: translateY(1px);
}





/* Toaster Notifications - Python Notification Style */
.toaster-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toaster {
    background-color: #2c3e50;
    border: 1px solid #34495e;
    border-radius: 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    width: 350px;
    height: 120px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.toaster.show {
    transform: translateX(0);
    opacity: 0.85;
}

.toaster-main-frame {
    background-color: #2c3e50;
    border: 1px solid #34495e;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 3px;
}

.toaster-title {
    color: #ecf0f1;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: bold;
    font-size: 12px;
    margin: 0;
    padding: 10px 12px 4px 12px;
    text-align: left;
}

.toaster-message {
    color: #bdc3c7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    margin: 0;
    padding: 0 12px;
    flex: 1;
    display: flex;
    align-items: flex-start;
    line-height: 1.3;
    text-align: left;
}

.toaster-status {
    background-color: #34495e;
    height: 24px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    margin-top: auto;
}

.toaster-status-text {
    color: #27ae60;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    margin: 0;
    text-align: left;
}

.toaster.error .toaster-status-text {
    color: #e74c3c;
}

.toaster.warning .toaster-status-text {
    color: #f39c12;
}

.toaster.success .toaster-status-text {
    color: #27ae60;
}

.toaster.info .toaster-status-text {
    color: #3498db;
}

.toaster-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 2px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.toaster-close:hover {
    background-color: #34495e;
    color: #ecf0f1;
    opacity: 1;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-200);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-200);
}

/* Calendar Styles */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.calendar-card {
    background-color: #1F2B3E;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bg-300);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 260px);
}

.calendar-controls-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}


.calendar-control-btn {
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    color: var(--text-100);
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    white-space: nowrap;
}

.calendar-control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.calendar-month-display h2 {
    color: var(--text-100);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    min-width: 200px;
    text-align: center;
}

.calendar-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.calendar-table-wrapper {
    flex: 1;
    overflow: auto;
    min-height: 400px;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-200);
    min-width: 800px;
    table-layout: auto;
}

.calendar-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-200);
}

.calendar-table th,
.calendar-table td {
    border: 1px solid var(--bg-300);
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
}

.calendar-header-computer {
    background: #4d648d !important;
    background-color: #4d648d !important;
    color: var(--text-100);
    font-weight: 600;
    font-size: 13px;
    width: auto;
    max-width: 250px;
    text-align: center !important;
    position: sticky;
    left: 0;
    z-index: 11;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 16px !important;
    border-right: 2px solid var(--bg-300) !important;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    user-select: none;
}

.calendar-header-computer:hover {
    background: var(--primary-200) !important;
}

.calendar-header-user {
    background: #4d648d !important;
    background-color: #4d648d !important;
    color: var(--text-100);
    font-weight: 600;
    font-size: 13px;
    width: auto;
    max-width: 200px;
    text-align: center !important;
    position: sticky;
    left: 0;
    z-index: 11;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    padding: 10px 16px !important;
    border-right: 1px solid var(--bg-300) !important;
}

.calendar-header-user:hover {
    background: var(--primary-200) !important;
}

.calendar-header-group {
    background: #4d648d !important;
    background-color: #4d648d !important;
    color: var(--text-100);
    font-weight: 600;
    font-size: 13px;
    width: auto;
    max-width: 200px;
    text-align: center !important;
    position: sticky;
    left: 0;
    z-index: 11;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    padding: 10px 16px !important;
    border-right: 1px solid var(--bg-300) !important;
}

.calendar-header-group:hover {
    background: var(--primary-200) !important;
}

.calendar-header-schedule {
    background: #4d648d !important;
    background-color: #4d648d !important;
    color: var(--text-100);
    font-weight: 600;
    font-size: 13px;
    width: auto;
    text-align: center !important;
    position: sticky;
    left: 0;
    z-index: 11;
    white-space: nowrap;
    padding: 10px 16px !important;
    border-right: 2px solid var(--bg-300) !important;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    user-select: none;
}

.calendar-header-schedule:hover {
    background: var(--primary-200) !important;
}

.calendar-header-day {
    background: var(--accent-100);
    color: var(--text-100);
    font-weight: 500;
    min-width: 40px;
    font-size: 12px;
}

.calendar-header-computer-weekday {
    background: var(--primary-100);
    color: var(--text-100);
    font-weight: 600;
    min-width: 150px;
    text-align: left !important;
    position: sticky;
    left: 0;
    z-index: 10;
}

.calendar-header-weekday {
    background: #08152b;
    color: var(--text-200);
    font-weight: 400;
    min-width: 40px;
    font-size: 11px;
    text-transform: uppercase;
}

.calendar-header-weekday.weekend {
    background: #4a5568;
    color: var(--text-100);
}

.calendar-header-day.weekend {
    background: #4a5568;
}

.calendar-cell.weekend {
    background: #2d3748;
}

.calendar-cell.weekend.has-tasks {
    background: #1a7f3d;
}

.calendar-cell.weekend:hover {
    background: #4a5568;
}

.calendar-cell.weekend.has-tasks:hover {
    background: #15803d;
}

.calendar-row-computer {
    background: #1a2332 !important;
    background-color: #1a2332 !important;
    color: rgb(255, 255, 255);
    font-weight: 400;
    font-size: 13px;
    text-align: left !important;
    position: sticky;
    left: 0;
    z-index: 6;
    border-right: 2px solid var(--bg-300) !important;
    white-space: nowrap;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 16px !important;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
}

.calendar-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.calendar-status-indicator.online {
    background-color: #4CAF50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
}

.calendar-status-indicator.offline {
    background-color: #f44336;
    box-shadow: 0 0 6px rgba(244, 67, 54, 0.4);
}

.calendar-row-user {
    background: #1a2332 !important;
    background-color: #1a2332 !important;
    color: rgb(255, 255, 255);
    font-weight: 400;
    font-size: 13px;
    text-align: left !important;
    position: sticky;
    left: 0;
    z-index: 6;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 16px !important;
    border-right: 1px solid var(--bg-300) !important;
}

.calendar-row-group {
    background: #1a2332 !important;
    background-color: #1a2332 !important;
    color: rgb(255, 255, 255);
    font-weight: 400;
    font-size: 13px;
    text-align: left !important;
    position: sticky;
    left: 0;
    z-index: 6;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 16px !important;
    border-right: 1px solid var(--bg-300) !important;
}

.calendar-row-schedule {
    background: #1a2332 !important;
    background-color: #1a2332 !important;
    color: rgb(255, 255, 255);
    font-weight: 400;
    font-size: 13px;
    text-align: center !important;
    position: sticky;
    left: 0;
    z-index: 6;
    white-space: nowrap;
    border-right: 2px solid var(--bg-300) !important;
    padding: 10px 16px !important;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.3);
}

.calendar-cell {
    background: var(--bg-100);
    color: var(--text-200);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    height: 32px;
    min-width: 32px;
    font-size: 12px;
}

.calendar-cell:hover {
    background: var(--bg-300);
    transform: scale(1.05);
}

.calendar-cell.scheduled-day {
    background: #f97316;
    color: white;
    font-weight: 500;
}

.calendar-cell.scheduled-day:hover {
    background: #ea580c;
}

.calendar-cell.has-tasks {
    background: #22c55e;
    color: white;
    font-weight: 600;
}

.calendar-cell.has-tasks:hover {
    background: #16a34a;
}

.calendar-cell.scheduled-skipped {
    background: #ef4444;
    color: white;
    font-weight: 600;
}

.calendar-cell.scheduled-skipped:hover {
    background: #dc2626;
}

.calendar-cell.weekend.scheduled-day {
    background: #ea580c;
}

.calendar-cell.weekend.scheduled-day:hover {
    background: #c2410c;
}

.calendar-cell.weekend.scheduled-skipped {
    background: #dc2626;
}

.calendar-cell.weekend.scheduled-skipped:hover {
    background: #b91c1c;
}

.calendar-loading {
    text-align: center;
    color: var(--text-200);
    font-style: italic;
    padding: 40px;
}

.calendar-loading i {
    margin-right: 8px;
}

/* Calendar Pagination Styles */
.calendar-pagination {
    background: var(--bg-200);
    border-top: 1px solid var(--bg-300);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

.calendar-pagination-btn {
    background: var(--bg-300);
    color: var(--text-200);
    border: 1px solid var(--bg-300);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.calendar-pagination-btn:hover:not(:disabled) {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
}

.calendar-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-pagination-pages {
    display: flex;
    gap: 4px;
}

.calendar-pagination-page {
    background: var(--bg-300);
    color: var(--text-200);
    border: 1px solid var(--bg-300);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-pagination-page:hover {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
}

.calendar-pagination-page.active {
    background: var(--primary-200);
    color: var(--text-100);
    border-color: var(--primary-200);
}

.calendar-pagination-ellipsis {
    color: var(--text-200);
    padding: 6px 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.calendar-legend {
    background: var(--bg-200);
    border-top: 1px solid var(--bg-300);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-200);
    font-size: 14px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--bg-300);
}

.legend-success {
    background: #22c55e;
}

.legend-scheduled {
    background: #f97316;
}

.legend-skipped {
    background: #ef4444;
}

.legend-empty {
    background: var(--bg-100);
}


/* Calendar Task Details Modal */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100001;
    animation: fadeIn 0.3s ease;
}

.calendar-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-modal-content {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    max-height: 85vh;
    width: 90%;
    margin: 20px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.calendar-modal-header {
    background: var(--primary-100);
    color: var(--text-100);
    padding: 20px 24px;
    border-bottom: 1px solid var(--bg-300);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.calendar-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.calendar-modal-title i {
    flex-shrink: 0;
    margin-top: 2px;
}

.calendar-modal-title span {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.calendar-modal-close {
    background: none;
    border: none;
    color: var(--text-100);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.calendar-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.calendar-modal-summary {
    background: var(--accent-100);
    color: var(--text-100);
    padding: 16px 20px;
    margin: -24px -24px 24px -24px;
    border-bottom: 1px solid var(--bg-300);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.calendar-modal-summary i {
    color: var(--primary-100);
    font-size: 16px;
}

.calendar-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calendar-task-item {
    background: var(--bg-100);
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.calendar-task-item:hover {
    border-color: var(--accent-100);
    transform: translateY(-1px);
}

.calendar-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-task-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-100);
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-task-name .task-icon-disk-cleanup {
    color: #f59e0b; /* Amber for disk cleanup */
}

.calendar-task-name .task-icon-malware-scan {
    color: #ef4444; /* Red for malware scan */
}

.calendar-task-name .task-icon-cleanup-downloads {
    color: #10b981; /* Emerald for downloads cleanup */
}


.calendar-task-name .task-icon-default {
    color: #8b5cf6; /* Purple for other tasks */
}

.calendar-task-status {
    background: #22c55e;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.calendar-task-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.calendar-task-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-task-detail-label {
    font-size: 12px;
    color: var(--text-200);
    text-transform: uppercase;
    font-weight: 500;
}

.calendar-task-detail-value {
    font-size: 14px;
    color: var(--text-100);
    word-break: break-word;
}

.calendar-task-result {
    background: var(--bg-200);
    border: 1px solid var(--bg-300);
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.calendar-task-result-label {
    font-size: 12px;
    color: var(--text-200);
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 6px;
}

.calendar-task-result-text {
    font-size: 14px;
    color: var(--text-100);
    line-height: 1.4;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.calendar-modal-empty {
    text-align: center;
    color: var(--text-200);
    padding: 40px 20px;
}

.calendar-modal-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Calendar */
@media (max-width: 1024px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-controls-left,
    .calendar-controls-right {
        justify-content: center;
    }

    .calendar-month-display h2 {
        font-size: 18px;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .calendar-control-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

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

    .calendar-pagination {
        flex-direction: column;
        gap: 12px;
    }

    .calendar-card {
        height: calc(100vh - 280px);
    }

    .client-group-clients.grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }

    .dropdown-btn {
        min-width: 80px;
        font-size: 11px;
        padding: 5px 8px;
    }

    .dropdown-item {
        padding: 6px 8px;
        font-size: 11px;
    }

    .move-client-modal-content {
        width: 95%;
        margin: 10px;
    }

    .move-client-modal-body {
        padding: 16px;
    }

    .move-client-info {
        padding: 16px;
        margin-bottom: 16px;
    }

    .move-client-specs {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .move-client-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .move-client-name-section h4 {
        font-size: 14px;
    }

    .move-group-item {
        padding: 10px 12px;
    }

    .confirmation-modal-content {
        width: 95%;
        margin: 10px;
    }

    .confirmation-modal-body {
        padding: 16px;
    }

    .confirmation-modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .confirmation-btn {
        width: 100%;
    }


    .calendar-modal-content {
        max-width: 95%;
        max-height: 90vh;
        margin: 10px;
    }

    .calendar-modal-header {
        padding: 16px 20px;
    }

    .calendar-modal-title {
        font-size: 16px;
    }

    .calendar-modal-body {
        padding: 16px;
    }

    .calendar-task-details {
        grid-template-columns: 1fr;
    }
}

/* Profile Styles */
.profile-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1200px;
}

.profile-card {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card:hover {
    border-color: var(--primary-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-card-header {
    background: var(--bg-300);
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-300);
}

.profile-card-header h2 {
    font-size: 18px;
    color: var(--text-100);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-card-content {
    padding: 24px;
}

/* Avatar Section */
.avatar-section {
    display: flex;
    align-items: center;
    gap: 24px;
}

.avatar-preview {
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    background: var(--primary-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-100);
    border: 4px solid var(--bg-300);
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.profile-avatar-large.has-image {
    background-color: transparent;
}

.profile-avatar-large.has-image i {
    display: none;
}

.avatar-upload {
    flex: 1;
}

.avatar-upload .btn {
    margin-bottom: 12px;
}

.avatar-help {
    color: var(--text-200);
    font-size: 14px;
    margin: 0;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-100);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    background: var(--bg-100);
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-100);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-200);
    box-shadow: 0 0 0 3px rgba(77, 100, 141, 0.1);
}

.form-input[readonly] {
    background: var(--bg-300);
    color: var(--text-300);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-input:read-only {
    background: var(--bg-300);
    color: var(--text-200);
    cursor: not-allowed;
}

.form-input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-help {
    color: var(--text-200);
    font-size: 12px;
    margin-top: 4px;
}

/* Modal Alert Styles */
.modal-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
    position: relative;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-alert.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-left: 4px solid #4caf50;
}

.modal-alert.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(244, 67, 54, 0.05));
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-left: 4px solid #f44336;
}

.modal-alert.warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.05));
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-left: 4px solid #ff9800;
}

.modal-alert.info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.05));
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-left: 4px solid #2196f3;
}

.modal-alert-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.modal-alert.success .modal-alert-icon {
    color: #4caf50;
}

.modal-alert.error .modal-alert-icon {
    color: #f44336;
}

.modal-alert.warning .modal-alert-icon {
    color: #ff9800;
}

.modal-alert.info .modal-alert-icon {
    color: #2196f3;
}

.modal-alert-content {
    flex: 1;
}

.modal-alert-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-100);
    margin-bottom: 4px;
}

.modal-alert-message {
    font-size: 13px;
    color: var(--text-200);
    line-height: 1.5;
}

.modal-alert-close {
    background: none;
    border: none;
    color: var(--text-200);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.modal-alert-close:hover {
    opacity: 1;
    color: var(--text-100);
    transform: scale(1.1);
}

.role-description {
    padding: 8px 12px;
    background: rgba(77, 100, 141, 0.1);
    border-left: 3px solid var(--primary-200);
    border-radius: 4px;
    margin-top: 8px;
    line-height: 1.4;
}

.role-description.commander {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: #22c55e;
}

.role-description.troop {
    background: rgba(108, 117, 125, 0.1);
    border-left-color: #6c757d;
}

.form-group.full-width {
    width: 100%;
    flex: none;
}

.role-select {
    cursor: pointer !important;
}

.role-select:hover {
    cursor: pointer !important;
}

.role-select option {
    cursor: pointer !important;
}

select.role-select {
    cursor: pointer !important;
}

/* Loading states for buttons */
.user-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

.user-action-btn:disabled i.fa-spinner {
    animation: spin 1s linear infinite;
}

.btn:disabled i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Reset Password Modal Enhancements */
/* Portrait Modal Styles */
#reset-password-modal .modal-content {
    width: 90%;
    max-width: 500px;
    min-width: 400px;
}

#reset-password-modal .modal-body {
    flex-direction: column;
}

#create-user-modal .modal-content {
    width: 90%;
    max-width: 800px;
    min-width: 600px;
}

#create-user-modal .modal-body {
    flex-direction: column;
}

/* Create User Modal - 2 Column Layout */
#create-user-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.reset-password-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08), 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.reset-password-info:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.12), 0 3px 6px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.reset-password-icon {
    font-size: 24px;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    padding: 12px;
    border-radius: 10px;
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.reset-password-info p {
    margin: 0;
    color: var(--text-100);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.reset-password-info p strong {
    color: #3b82f6;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--bg-300);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    color: var(--text-200);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: var(--text-100);
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Profile */
@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .avatar-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Keep 2 columns for create user modal on tablets */
    #create-user-modal .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Reset Password Modal - smaller on mobile */
    #reset-password-modal .modal-content {
        width: 95%;
        min-width: unset;
        max-width: 450px;
    }

    /* Create User Modal - smaller on mobile */
    #create-user-modal .modal-content {
        width: 95%;
        min-width: unset;
        max-width: 500px;
    }

    /* Create User Modal - single column on mobile */
    #create-user-modal .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .profile-header h1 {
        font-size: 24px;
    }

    .profile-card-content {
        padding: 20px;
    }

    .profile-avatar-large {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Echo Tab Styles - Modern High-End Design */
.echo-container {
    width: 100%;
    height: 100%;
    padding: 24px;
    overflow: hidden;
}

.echo-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    height: 100%;
    max-height: calc(100vh - 140px);
}

.echo-left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 8px;
}

.echo-right-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modern Card Design */
.echo-card {
    background: linear-gradient(145deg, var(--bg-200), #1a2332);
    border: 1px solid rgba(77, 100, 141, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.echo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(77, 100, 141, 0.5), transparent);
}

.echo-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(77, 100, 141, 0.15);
    position: relative;
}

.echo-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-100));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-100);
    font-size: 16px;
}

.echo-card-header h3 {
    color: var(--text-100);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    letter-spacing: 0.5px;
}

.echo-char-counter {
    background: rgba(77, 100, 141, 0.2);
    border: 1px solid rgba(77, 100, 141, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--primary-300);
    font-weight: 500;
}

.echo-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-200);
    font-weight: 500;
}

.echo-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.echo-card-content {
    padding: 20px 24px 24px;
}

/* Client Selection Styles */
.echo-client-selection {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.echo-select {
    flex: 1;
    padding: 14px 18px;
    background: linear-gradient(145deg, var(--bg-100), #0a1219);
    border: 1px solid rgba(77, 100, 141, 0.3);
    border-radius: 12px;
    color: var(--text-100);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.echo-select:focus {
    outline: none;
    border-color: var(--primary-200);
    background: linear-gradient(145deg, var(--bg-100), #0f1a26);
}

.echo-select option {
    background: var(--bg-100);
    color: var(--text-100);
    padding: 12px;
}

.echo-refresh-btn {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(77, 100, 141, 0.3);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--bg-200), #1a2332);
    color: var(--primary-300);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.echo-refresh-btn:hover {
    background: linear-gradient(145deg, var(--primary-200), var(--accent-100));
    color: var(--text-100);
}

/* Message Textarea */
.echo-textarea {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(145deg, var(--bg-100), #0a1219);
    border: 1px solid rgba(77, 100, 141, 0.3);
    border-radius: 12px;
    color: var(--text-100);
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s ease;
    min-height: 160px;
}

.echo-textarea:focus {
    outline: none;
    border-color: var(--primary-200);
    background: linear-gradient(145deg, var(--bg-100), #0f1a26);
}

.echo-textarea::placeholder {
    color: var(--text-200);
    opacity: 0.7;
}

/* Action Buttons */
.echo-actions {
    display: flex;
    gap: 12px;
}

/* History Card - Full height */
.echo-history-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Response Card - Full Height (legacy) */
.echo-response-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.echo-response-card .echo-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
}

.echo-response {
    flex: 1;
    padding: 20px 24px;
    background: linear-gradient(145deg, #0a0f16, var(--bg-100));
    border: none;
    border-radius: 0 0 16px 16px;
    color: var(--text-100);
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-y: auto;
    position: relative;
}

.echo-response::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(77, 100, 141, 0.3), transparent);
}

.echo-response-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--text-200);
    text-align: center;
}

.echo-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(77, 100, 141, 0.2), rgba(61, 90, 128, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-300);
    margin-bottom: 16px;
    border: 1px solid rgba(77, 100, 141, 0.2);
}

.echo-placeholder-text h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-100);
}

.echo-placeholder-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.5;
}

.echo-response.has-content .echo-response-placeholder {
    display: none;
}

.echo-response-success {
    color: #4CAF50;
    font-weight: 600;
}

.echo-response-error {
    color: #f44336;
    font-weight: 600;
}

/* History Controls */
.echo-history-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.echo-select-small {
    padding: 6px 12px;
    background: linear-gradient(145deg, var(--bg-200), #1a2332);
    border: 1px solid rgba(77, 100, 141, 0.3);
    border-radius: 8px;
    color: var(--text-100);
    font-size: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.echo-select-small:focus {
    outline: none;
    border-color: var(--primary-200);
    background: linear-gradient(145deg, var(--primary-200), var(--accent-100));
}

/* History Container */
.echo-history {
    flex: 1;
    padding: 0;
    background: linear-gradient(145deg, #0a0f16, var(--bg-100));
    border: none;
    border-radius: 0 0 16px 16px;
    overflow-y: auto;
    position: relative;
    max-height: 600px; /* Make it scrollable */
    min-height: 300px;
}

/* Custom Scrollbar for Echo History */
.echo-history::-webkit-scrollbar {
    width: 8px;
}

.echo-history::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 16px 0;
}

.echo-history::-webkit-scrollbar-thumb {
    background: rgba(77, 100, 141, 0.5);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.echo-history::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 100, 141, 0.7);
}

.echo-history::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(77, 100, 141, 0.3), transparent);
}

.echo-history-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--text-200);
    text-align: center;
    padding: 20px;
}

.echo-history.has-content .echo-history-placeholder {
    display: none;
}

/* History Items */
.echo-history-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(77, 100, 141, 0.1);
    transition: background-color 0.2s ease;
}

.echo-history-item:hover {
    background: rgba(77, 100, 141, 0.05);
}

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

.echo-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.echo-history-client {
    font-weight: 600;
    color: var(--primary-200);
    font-size: 14px;
}

.echo-history-time {
    font-size: 12px;
    color: var(--text-200);
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

.echo-history-sender {
    font-size: 12px;
    color: var(--text-200);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.echo-source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(77, 100, 141, 0.15);
    border-radius: 4px;
    font-size: 11px;
}

.echo-history-message {
    background: rgba(77, 100, 141, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-200);
    margin-bottom: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-100);
}

.echo-duration {
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    font-weight: 600;
    font-size: 11px;
    margin-left: 8px;
}

.echo-broadcast-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
    font-weight: 600;
    font-size: 11px;
    margin-left: 8px;
}

.echo-history-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.echo-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.echo-status-sent {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.echo-status-acknowledged {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.echo-status-partial {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.echo-status-error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.echo-history-response {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    border-left: 2px solid #4CAF50;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    color: var(--text-100);
}

.echo-history-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 6px;
    border-left: 2px solid #f44336;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    color: var(--text-100);
}

/* Broadcast Option Checkbox */
.echo-broadcast-option {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(77, 100, 141, 0.2);
}

.echo-checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.echo-checkbox-container:hover {
    background: rgba(77, 100, 141, 0.05);
    border-radius: 6px;
    padding: 8px 8px;
    margin: 0 -8px;
}

.echo-checkbox-container input[type="checkbox"] {
    display: none;
}

.echo-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 4px;
    background: rgba(0, 30, 60, 0.3);
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.echo-checkbox-container input[type="checkbox"]:checked + .echo-checkmark {
    background: #00FFFF;
    border-color: #00FFFF;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.echo-checkbox-container input[type="checkbox"]:checked + .echo-checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #000000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.echo-checkbox-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-100);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.echo-checkbox-text i {
    color: var(--primary-200);
    font-size: 14px;
}

.echo-checkbox-container input[type="checkbox"]:checked ~ .echo-checkbox-text {
    color: var(--primary-200);
}

.echo-checkbox-container input[type="checkbox"]:checked ~ .echo-checkbox-text i {
    color: #00FFFF;
}

.echo-response-info {
    color: var(--primary-300);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .echo-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .echo-right-panel {
        min-height: 400px;
    }
}

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

    .echo-layout {
        gap: 16px;
    }

    .echo-card {
        border-radius: 12px;
    }

    .echo-card-header {
        padding: 16px 20px 12px;
    }

    .echo-card-content {
        padding: 16px 20px 20px;
    }

    .echo-actions {
        flex-direction: column;
    }

    .echo-btn {
        padding: 12px 20px;
    }

    .echo-client-selection {
        flex-direction: column;
        gap: 12px;
    }

    .echo-refresh-btn {
        width: 100%;
        height: 44px;
    }
}

/* Users Management Styles */
.users-header-simple {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.users-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 24px;
    gap: 20px;
}

.users-search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 600px;
}

.search-group {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.search-group i {
    position: absolute;
    left: 12px;
    color: var(--text-200);
    z-index: 1;
}

.search-group input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: var(--bg-200);
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    color: var(--text-100);
    font-size: 14px;
}

.search-group input:focus {
    outline: none;
    border-color: var(--primary-200);
    box-shadow: 0 0 0 3px rgba(77, 100, 141, 0.1);
}

.users-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

.users-filters select {
    padding: 10px 12px;
    background: var(--bg-200);
    border: 1px solid var(--bg-300);
    border-radius: 6px;
    color: var(--text-100);
    font-size: 14px;
}

.users-container {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    overflow: hidden;
}

.users-table-wrapper {
    overflow-x: auto;
}

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

.users-table th {
    background: var(--bg-300);
    color: var(--text-100);
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid var(--bg-300);
    font-size: 14px;
}

.users-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--bg-300);
    color: var(--text-100);
    font-size: 14px;
}

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

.users-table tr:hover {
    background: rgba(77, 100, 141, 0.1);
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-100);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--bg-300);
}

.user-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.user-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.user-status.blocked {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.user-status.pending {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.user-role {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.user-role.commander {
    color: #ffc107;
}

.user-role.troop {
    color: #9ca3af;
}

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

.users-pagination {
    background: var(--bg-200);
    border-top: 1px solid var(--bg-300);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.user-action-btn {
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-action-btn.reset {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.user-action-btn.reset:hover {
    background: rgba(59, 130, 246, 0.3);
}

.user-action-btn.resend {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.user-action-btn.resend:hover {
    background: rgba(16, 185, 129, 0.3);
}

.user-action-btn.block {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.user-action-btn.block:hover {
    background: rgba(239, 68, 68, 0.3);
}

.user-action-btn.unblock {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.user-action-btn.unblock:hover {
    background: rgba(34, 197, 94, 0.3);
}

.user-action-btn.delete {
    background: rgba(220, 38, 127, 0.2);
    color: #dc2626;
}

.user-action-btn.delete:hover {
    background: rgba(220, 38, 127, 0.3);
}

.user-action-btn.role-toggle {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    transition: all 0.3s ease;
}

.user-action-btn.role-toggle:hover {
    transform: scale(1.1);
}

.user-action-btn.role-toggle.commander {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.user-action-btn.role-toggle.commander:hover {
    background: rgba(34, 197, 94, 0.3);
}

.user-action-btn.role-toggle.troop {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.user-action-btn.role-toggle.troop:hover {
    background: rgba(108, 117, 125, 0.3);
}

.user-action-btn.role-toggle:hover i {
    animation: toggleBounce 0.6s ease-in-out;
}

@keyframes toggleBounce {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.users-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-200);
}

.users-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-200);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    color: var(--text-100);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-200);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-300);
    color: var(--text-100);
}

.modal-body {
    padding: 24px;
}

/* Responsive Users */
@media (max-width: 1024px) {
    .users-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .users-controls {
        flex-direction: column;
        gap: 16px;
    }

    .users-search {
        max-width: none;
    }

    .users-filters {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .users-table th,
    .users-table td {
        padding: 12px 8px;
        font-size: 12px;
    }

    .user-actions {
        flex-direction: column;
        gap: 4px;
    }

    .user-action-btn {
        font-size: 11px;
        padding: 4px 6px;
    }
}

/* ===== GROUP COLOR PICKER MODAL ===== */
.group-color-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.group-color-modal {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.group-color-modal-header {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.group-color-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-color-modal-header h3 i {
    color: #60a5fa;
}

.group-color-modal-body {
    padding: 24px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.group-color-modal-message {
    color: #cbd5e1;
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.6;
}

.group-color-input-section,
.group-color-picker-section,
.group-color-preview-section {
    margin-bottom: 24px;
}

.group-color-input-section label,
.group-color-picker-section label,
.group-color-preview-section label {
    display: block;
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.group-modal-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.group-modal-input:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(30, 41, 59, 0.7);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.group-modal-input::placeholder {
    color: #64748b;
}

.group-color-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-option i {
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.color-option.selected {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-option.selected i {
    opacity: 1;
}

.group-color-preview {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.preview-header {
    padding: 16px 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.preview-content {
    padding: 20px;
    color: #cbd5e1;
    font-size: 13px;
    min-height: 80px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-color-modal-footer {
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.group-modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.group-modal-btn-cancel {
    background: rgba(100, 116, 139, 0.2);
    color: #cbd5e1;
}

.group-modal-btn-cancel:hover {
    background: rgba(100, 116, 139, 0.3);
    color: #f1f5f9;
}

.group-modal-btn-confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.group-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Version Management Page Styles */
.versions-page {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.version-manager-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    flex: 1;
    overflow: hidden;
}

/* Left Panel - Version List */
.version-list-panel {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.version-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--bg-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-300);
}

.version-list-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-100);
}

.version-list-header .btn-primary {
    padding: 8px 16px;
    font-size: 13px;
}

.version-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.version-list-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-200);
}

.version-list-item {
    padding: 10px 12px;
    background: var(--bg-100);
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.version-list-item:hover {
    background: var(--bg-300);
    border-color: var(--primary-200);
    transform: translateX(4px);
}

.version-list-item.active {
    background: var(--primary-200);
    border-color: var(--primary-100);
}

.version-list-item.deleting {
    opacity: 0.7;
}

.version-list-item.deleting .version-list-item-actions {
    display: none;
}

.version-list-item.deleting::after {
    content: 'Deleting...';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-200);
    font-size: 12px;
    font-style: italic;
}

.version-list-item.active.deleting::after {
    color: rgba(255, 255, 255, 0.8);
}

.version-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.version-list-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.version-list-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.version-enhancement-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.version-list-item.active .version-enhancement-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.version-list-item-date {
    font-size: 11px;
    color: var(--text-200);
    display: flex;
    align-items: center;
    gap: 4px;
}

.version-list-item-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.version-list-item:hover .version-list-item-actions {
    opacity: 1;
}

.version-list-item.active .version-list-item-actions {
    opacity: 1;
}

.version-action-btn {
    background: none;
    border: none;
    color: var(--text-200);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.version-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.version-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-100);
}

.version-action-btn.edit:hover {
    color: #3b82f6;
}

.version-action-btn.delete:hover {
    color: #dc2626;
}

.version-list-item.active .version-action-btn {
    color: rgba(255, 255, 255, 0.7);
}

.version-list-item.active .version-action-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.version-list-item-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-100);
}

.version-list-item.active .version-list-item-number {
    color: white;
}

.version-latest-badge {
    background: linear-gradient(135deg, #f39c12, #d68910);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.version-list-item.active .version-latest-badge {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: var(--bg-100);
}

/* Right Panel - Details/Form */
.version-details-panel {
    background: transparent;
    padding: 0;
    overflow-y: auto;
}

.version-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-200);
    text-align: center;
}

.version-empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.version-empty-state h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-100);
}

.version-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Version Details View */
.version-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-300);
}

.version-details-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.version-details-title h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-100);
}

.version-details-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.version-details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.version-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.version-detail-item label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-200);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-detail-item p {
    margin: 0;
    font-size: 15px;
    color: var(--text-100);
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.s3-path-text {
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.enhancements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.enhancements-list li {
    padding: 8px 0;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--bg-300);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-100);
}

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

.enhancements-list li:before {
    content: '•';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--primary-200);
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

/* Upload Status Styles */
.upload-status-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-300);
    border-radius: 6px;
    border-left: 3px solid var(--bg-400);
    transition: all 0.2s ease;
}

.upload-status-item.uploaded {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.upload-status-item.not-uploaded {
    border-left-color: var(--bg-400);
}

.upload-status-item .status-icon {
    font-size: 8px;
    color: var(--text-300);
}

.upload-status-item.uploaded .status-icon {
    color: #10b981;
}

.upload-status-item .status-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-100);
    flex: 1;
}

.upload-status-item .status-text {
    font-size: 12px;
    color: var(--text-300);
    text-align: right;
    line-height: 1.4;
}

.upload-status-item.uploaded .status-text {
    color: #10b981;
    font-weight: 500;
}

.upload-status-item .status-details {
    font-size: 11px;
    color: var(--text-300);
    font-weight: 400;
}

/* Deployment Logs Styles - Compact List */
#deployment-logs-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.deployment-logs-loading,
.deployment-logs-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-300);
    font-size: 14px;
}

.deployment-log-item {
    background: var(--bg-200);
    border: 1px solid var(--bg-300);
    border-radius: 6px;
    padding: 10px 12px;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.deployment-log-item:hover {
    border-color: var(--primary-300);
}

.deployment-log-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.deployment-log-date {
    font-size: 12px;
    color: var(--text-200);
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}

.deployment-log-date i {
    font-size: 11px;
}

.deployment-log-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.deployment-stat-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.deployment-stat-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.deployment-stat-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.deployment-stat-badge i {
    font-size: 10px;
}

.show-computers-btn {
    padding: 6px 12px;
    background: var(--primary-200);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.show-computers-btn:hover {
    background: var(--primary-100);
    transform: translateY(-1px);
}

/* Deployment Details Drawer */
.deployment-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--bg-100);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 100000;
    display: flex;
    flex-direction: column;
}

.deployment-drawer.open {
    right: 0;
}

.deployment-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99999;
}

.deployment-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.deployment-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--bg-300);
    background: var(--bg-200);
}

.deployment-drawer-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-100);
    display: flex;
    align-items: center;
    gap: 10px;
}

.deployment-drawer-subtitle {
    font-size: 13px;
    color: var(--text-300);
    display: flex;
    align-items: center;
    gap: 6px;
}

.deployment-drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-200);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.deployment-drawer-close:hover {
    background: var(--bg-300);
    color: var(--text-100);
}

.deployment-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.deployment-drawer-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.drawer-stat-card {
    flex: 1;
    background: var(--bg-200);
    border: 1px solid var(--bg-300);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.drawer-stat-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.drawer-stat-number.success {
    color: #10b981;
}

.drawer-stat-number.error {
    color: #ef4444;
}

.drawer-stat-label {
    font-size: 11px;
    color: var(--text-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deployment-computer-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deployment-computer-item {
    background: var(--bg-200);
    border: 1px solid var(--bg-300);
    border-radius: 4px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.deployment-computer-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.deployment-computer-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.deployment-computer-icon.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.deployment-computer-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.deployment-computer-info {
    flex: 1;
    min-width: 0;
}

.deployment-computer-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-100);
    margin-bottom: 1px;
}

.deployment-computer-user {
    font-size: 10px;
    color: var(--text-300);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.deployment-computer-user i {
    font-size: 9px;
}

.deployment-computer-info-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    cursor: help;
    transition: all 0.2s ease;
    position: relative;
}

.deployment-computer-info-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.deployment-computer-info-icon.success:hover {
    background: rgba(16, 185, 129, 0.25);
}

.deployment-computer-info-icon.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.deployment-computer-info-icon.pending:hover {
    background: rgba(251, 191, 36, 0.25);
}

.deployment-computer-info-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.deployment-computer-info-icon.error:hover {
    background: rgba(239, 68, 68, 0.25);
}

.deployment-computer-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
    background: var(--bg-100);
    color: var(--text-100);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: normal;
    word-wrap: break-word;
    max-width: 288px;
    min-width: 173px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bg-300);
    z-index: 1000;
    line-height: 1.4;
}

.deployment-computer-info-icon:hover .deployment-computer-tooltip {
    opacity: 1;
    visibility: visible;
}

.deployment-computer-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--bg-300);
}

.deployment-computer-tooltip::before {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--bg-100);
    z-index: 1;
}

.deployment-computer-error {
    font-size: 10px;
    color: #ef4444;
    margin-top: 3px;
    padding: 4px 6px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 3px;
    border-left: 2px solid #ef4444;
}

/* Computer Selection Modal */
.computer-selection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 11000;
    animation: fadeIn 0.2s ease;
}

.computer-selection-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.computer-selection-modal-content {
    background: var(--bg-200);
    border-radius: 12px;
    border: 1px solid var(--bg-300);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    margin: 20px;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.2s ease;
    overflow: hidden;
}

.computer-selection-modal-header {
    background: var(--primary-100);
    color: var(--text-100);
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
}

.computer-selection-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.computer-selection-modal-close {
    background: transparent;
    border: none;
    color: var(--text-200);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.computer-selection-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-100);
}

.computer-selection-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.computer-selection-search {
    position: relative;
}

.computer-selection-search input {
    width: 100%;
    background: var(--bg-300);
    border: 1px solid var(--bg-300);
    color: var(--text-100);
    padding: 10px 12px 10px 36px;
    border-radius: 6px;
    font-size: 14px;
}

.computer-selection-search input:focus {
    outline: none;
    border-color: var(--primary-200);
    background: var(--bg-100);
}

.computer-selection-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-300);
    font-size: 14px;
}

.computer-selection-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.selection-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.computer-selection-stats {
    font-size: 13px;
    color: var(--text-200);
    text-align: right;
}

.selection-count {
    font-weight: 600;
    color: var(--primary-200);
}

.computer-selection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.computer-selection-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.computer-selection-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-100);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-100);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.computer-selection-section-header:hover {
    background: var(--bg-300);
}

.computer-selection-section-header.online {
    color: #10b981;
}

.computer-selection-section-header.offline {
    color: #fbbf24;
}

.computer-selection-section-header .fa-chevron-down {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.computer-selection-section-header.collapsed .fa-chevron-down {
    transform: rotate(-90deg);
}

.computer-selection-section-header .fa-wifi,
.computer-selection-section-header .fa-power-off {
    font-size: 12px;
}

.computer-selection-section-count {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.7;
}

.computer-selection-section-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 0;
}

.computer-selection-section-content.collapsed {
    display: none;
}

.computer-selection-item {
    display: grid;
    grid-template-columns: 32px minmax(150px, auto) minmax(120px, auto) minmax(80px, auto) minmax(100px, 120px);
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    background: var(--bg-300);
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.computer-selection-item:hover {
    background: var(--bg-100);
    border-color: var(--primary-200);
}

.computer-selection-item.selected {
    background: rgba(77, 100, 141, 0.15);
    border-color: var(--primary-200);
}

.computer-selection-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-200);
}

.computer-selection-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-100);
}

.computer-selection-item-user {
    font-size: 12px;
    color: var(--text-300);
    display: flex;
    align-items: center;
    gap: 6px;
}

.computer-selection-item-version {
    font-size: 11px;
    color: var(--text-300);
    font-family: 'Courier New', monospace;
}

.computer-selection-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.computer-selection-status.online {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.computer-selection-status.offline {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.computer-selection-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-300);
}

.computer-selection-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.computer-selection-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--bg-300);
    background: var(--bg-200);
    border-radius: 0 0 12px 12px;
    justify-content: flex-end;
}

.computer-selection-actions button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.computer-selection-btn-cancel {
    background: var(--bg-300);
    color: var(--text-100);
}

.computer-selection-btn-cancel:hover {
    background: var(--bg-100);
}

.computer-selection-btn-deploy {
    background: var(--primary-200);
    color: white;
}

.computer-selection-btn-deploy:hover:not(:disabled) {
    background: var(--primary-100);
}

.computer-selection-btn-deploy:disabled {
    background: var(--bg-300);
    color: var(--text-300);
    cursor: not-allowed;
    opacity: 0.6;
}

.select-all-btn, .select-online-btn {
    width: auto;
    padding: 7px 14px;
    background: var(--bg-100);
    border: 1px solid var(--bg-300);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-100);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.select-all-btn:hover, .select-online-btn:hover {
    background: var(--bg-300);
    border-color: var(--primary-200);
}

.select-all-btn.active, .select-online-btn.active {
    background: rgba(77, 100, 141, 0.15);
    border-color: var(--primary-200);
    color: var(--primary-200);
}

/* Version Form View */
.version-form-header {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-300);
}

.version-form-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-100);
    display: flex;
    align-items: center;
    gap: 8px;
}

#version-form .form-group {
    margin-bottom: 20px;
}

#version-form .form-group:last-of-type {
    margin-bottom: 0;
}

.enhancements-input-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#enhancements-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enhancement-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.enhancement-input-row input {
    flex: 1;
}

.enhancement-input-row button {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.enhancement-input-row button:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .version-manager-layout {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 900px) {
    .version-manager-layout {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 750px) {
    .version-manager-layout {
        grid-template-columns: 1fr;
    }

    .version-list-panel {
        max-height: 180px;
    }
}

/* Responsive fixes for client cards on small screens */
@media (max-width: 600px) {
    .system-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .performance-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .metric-card {
        height: auto;
        min-height: 200px;
    }

    .info-card {
        padding: 12px;
    }

    .client-card-header-section {
        padding: 12px;
    }
}

/* Additional responsive fixes for very small screens */
@media (max-width: 400px) {
    .client-cards-grid {
        gap: 16px;
    }

    .info-card {
        padding: 10px;
        gap: 8px;
    }

    .info-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .info-label {
        font-size: 10px;
    }

    .info-value {
        font-size: 12px;
    }
}

/* Drag and Drop Auto-Scroll Zones */
.main-content::before,
.main-content::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.main-content::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(77, 100, 141, 0.1), transparent);
}

.main-content::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(77, 100, 141, 0.1), transparent);
}

.main-content.dragging::before,
.main-content.dragging::after {
    opacity: 1;
}
