:root {
    /* Light Mode (Default) */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #93c5fd;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --provider-hetzner: #d90429;
    --provider-contabo: #0077b6;
    --provider-proxmox: #ff9e00;
    --primary-color: #0077b6;
    --primary-light-color: #caf0f8;
    --secondary-color: #457b9d;
    --success-color: #2dc653;
    --warning-color: #ffb703;
    --error-color: #d00000;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-dark: #1e293b;
    --card-bg: #fff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --top-nav-height: 60px;
    --sidebar-width: 240px;
    --content-padding: 1.25rem;
    --text-dark: #1e293b;
    --text-light: #f1f5f9;
    --primary-color: #0284c7;
    --border-color: #e5e7eb;
    --bg-dark: #1e293b;
    --content-top-margin: 70px; /* Increased margin */
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode */
        --primary: #60a5fa;
        --primary-dark: #3b82f6;
        --primary-light: #1e3a8a;
        --secondary: #94a3b8;
        --success: #34d399;
        --warning: #fbbf24;
        --error: #f87171;
        --text: #f1f5f9;
        --text-light: #94a3b8;
        --bg: #0f172a;
        --border: #334155;
        --card-bg: #1e293b;
        --primary-color: #48cae4;
        --primary-light-color: #023e8a;
        --secondary-color: #90e0ef;
        --success-color: #34d399;
        --warning-color: #fbbf24;
        --error-color: #f87171;
        --text-dark: #f1f5f9;
        --text-light: #94a3b8;
        --bg-light: #0f172a;
        --bg-dark: #020617;
        --card-bg: #1e293b;
        --border-color: #1e293b;
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    }
}

/* Custom theme selection */
body.light-theme {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #93c5fd;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --primary-color: #0077b6;
    --primary-light-color: #caf0f8;
    --secondary-color: #457b9d;
    --success-color: #2dc653;
    --warning-color: #ffb703;
    --error-color: #d00000;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-dark: #1e293b;
    --card-bg: #fff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body.dark-theme {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #1e3a8a;
    --secondary: #94a3b8;
    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --bg: #0f172a;
    --border: #334155;
    --card-bg: #1e293b;
    --primary-color: #48cae4;
    --primary-light-color: #023e8a;
    --secondary-color: #90e0ef;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --text-dark: #f1f5f9;
    --text-light: #94a3b8;
    --bg-light: #0f172a;
    --bg-dark: #020617;
    --card-bg: #1e293b;
    --border-color: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    padding-top: calc(var(--top-nav-height) + var(--content-top-margin)) !important;
    overflow-x: hidden;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--top-nav-height));
    position: relative;
}

/* Top Navigation - fixed with higher z-index */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--top-nav-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.top-nav .logo-container {
    flex: 0 0 auto;
    margin-right: 2rem;
}

.top-nav .main-nav {
    flex: 1 1 auto;
}

.top-nav .nav-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-nav a {
    height: var(--top-nav-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: #475569;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

.main-nav a.active {
    color: #0284c7;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0284c7;
}

.main-nav a:hover:not(.active) {
    color: #0284c7;
}

.main-nav a i {
    margin-right: 0.5rem;
}

.logo-container {
    padding: 0.5rem;
    margin-right: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.top-menu {
    display: flex;
    flex: 1;
    margin-left: 2rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    height: var(--top-nav-height);
    cursor: pointer;
    position: relative;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.menu-item i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.menu-item.active {
    color: var(--primary);
}

.menu-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
}

.menu-item:hover {
    color: var(--primary);
}

.user-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    gap: 0.75rem;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 0.75rem;
}

.user-name {
    font-weight: 500;
    margin-right: 0.75rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(var(--top-nav-height) - 10px);
    right: 0;
    width: 220px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    transition: background-color 0.2s;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-item i {
    width: 20px;
    margin-right: 0.75rem;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

.organization-dropdown {
    padding: 0.5rem;
    min-width: 220px;
    z-index: 9999;
}

.organization-option {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.organization-option:hover {
    background-color: #f3f4f6;
}

.organization-option.active {
    background-color: #f3f4f6;
    font-weight: 500;
}

/* Organization selector styling */
.org-selector {
    position: relative;
    display: flex;
    align-items: center;
}

.org-selector span {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-right: 0.375rem;
    white-space: nowrap;
}

.org-selector select {
    appearance: none;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.25rem 1.25rem 0.25rem 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    background-size: 0.75rem;
}

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

/* Dark mode adjustments for organization selector */
body.dark-mode .org-selector span {
    color: var(--text-light);
}

body.dark-mode .org-selector select {
    background-color: rgba(15, 23, 42, 0.5);
    border-color: #334155;
    color: #f1f5f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
}

/* User dropdown styling */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.user-dropdown-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 220px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
    display: none;
}

.user-dropdown.active .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f9fafb;
}

.dropdown-item i {
    width: 20px;
    margin-right: 0.75rem;
    color: #64748b;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Top Navigation User Menu */
.user-menu {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0.75rem;
}

/* Sidebar styling */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--top-nav-height);
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-dark);
    padding-top: 0.25rem;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.sidebar .nav-list {
    padding: 0.5rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    text-align: center;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.nav-section {
    margin-top: 0.5rem;
    padding: 0 0.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.sidebar-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0.5rem;
}

/* Light mode sidebar overrides */
body:not(.dark-mode) .sidebar {
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

body:not(.dark-mode) .sidebar .nav-link {
    color: #334155;
}

body:not(.dark-mode) .sidebar .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .sidebar .nav-link.active {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

body:not(.dark-mode) .nav-section-title {
    color: #64748b;
}

body:not(.dark-mode) .sidebar-divider {
    background-color: #e2e8f0;
}

/* Main Content - increased padding and proper positioning */
.main-content {
    position: relative;
    padding-top: var(--content-padding);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1.5rem;
    margin-left: 240px;
    min-height: calc(100vh - var(--top-nav-height));
    background-color: #f9fafb;
    z-index: 1;
}

.content-header {
    position: relative;
    z-index: 10;
    margin-bottom: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.left-section h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-right: 2rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.view-tabs {
    display: flex;
    margin-bottom: 0.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    color: #6b7280;
}

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

.tab:hover:not(.active) {
    background-color: #f3f4f6;
    color: #111827;
}

.right-section {
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    margin-right: 1rem;
}

.search-container i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-container input {
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    width: 250px;
    background-color: white;
    color: #111827;
    transition: all 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.action-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button i {
    margin-right: 0.5rem;
}

.action-button:hover {
    background-color: var(--primary-dark);
}

/* Server Statistics */
.server-statistics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Server Filters */
.server-filters {
    display: flex;
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.filter {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.filter span {
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
    color: #4b5563;
}

.filter select {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    background-color: white;
    color: #111827;
    transition: all 0.2s ease;
}

.filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Servers Container */
.servers-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Server Card */
.server-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.server-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.server-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.server-status.running {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.server-status.stopped {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.server-status.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.card-body {
    padding: 1rem;
}

.provider-badge {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    background-color: #f9fafb;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.provider-badge img {
    margin-right: 0.5rem;
}

.provider-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

.provider-badge.hetzner {
    border-left: 3px solid var(--provider-hetzner);
}

.provider-badge.hetzner .provider-icon {
    background-color: var(--provider-hetzner);
}

.provider-badge.contabo {
    border-left: 3px solid var(--provider-contabo);
}

.provider-badge.contabo .provider-icon {
    background-color: var(--provider-contabo);
}

.provider-badge.proxmox {
    border-left: 3px solid var(--provider-proxmox);
}

.provider-badge.proxmox .provider-icon {
    background-color: var(--provider-proxmox);
}

.server-details {
    margin-bottom: 1rem;
}

.detail-group {
    margin-bottom: 0.75rem;
}

.detail-item {
    display: flex;
    margin-bottom: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: #6b7280;
    width: 120px;
}

.detail-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
}

.server-resources {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resource {
    display: flex;
    align-items: center;
}

.resource-icon {
    width: 32px;
    height: 32px;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.resource-icon i {
    color: #4b5563;
}

.resource-info {
    flex: 1;
}

.resource-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
}

.resource-usage {
    display: flex;
    align-items: center;
}

.usage-bar {
    flex: 1;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-right: 0.5rem;
}

.usage-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 9999px;
}

.usage-fill.high {
    background-color: var(--error);
}

.usage-fill.medium {
    background-color: var(--warning);
}

.usage-fill.low {
    background-color: var(--success);
}

.usage-text {
    font-size: 0.75rem;
    color: #6b7280;
}

.server-actions {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.server-action {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.server-action:hover:not(.disabled) {
    background-color: #f3f4f6;
    color: #111827;
}

.server-action.primary {
    background-color: var(--primary);
    color: white;
}

.server-action.primary:hover {
    background-color: var(--primary-dark);
}

.server-action.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.server-action.success:hover {
    background-color: rgba(16, 185, 129, 0.2);
}

.server-action.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.page-button {
    width: 36px;
    height: 36px;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    background-color: white;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-button:hover:not(.active) {
    background-color: #f3f4f6;
    color: #111827;
}

.page-button.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-button.next {
    width: auto;
    padding: 0 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.theme-toggle-icon {
    color: var(--text-dark);
    font-size: 1rem;
    margin-right: 0.375rem;
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border-radius: 0.375rem;
    color: var(--text-dark);
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Mobile Responsive Adjustments */
@media (max-width: 1200px) {
    .server-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .server-detail-columns {
        flex-direction: column;
    }
    
    .server-detail-column {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .server-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .stat-card {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .server-detail-tabs {
        flex-wrap: wrap;
    }
    
    .server-detail-tab {
        margin-bottom: 0.5rem;
    }
    
    .server-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .server-card-badges {
        margin-top: 0.5rem;
    }
}

/* User dropdown styling */
.user-dropdown {
    position: relative;
    margin-left: 1rem;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.user-dropdown-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 240px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
    display: none;
}

.user-dropdown.active .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f9fafb;
}

.dropdown-item i {
    width: 20px;
    margin-right: 0.75rem;
    color: #64748b;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Apply animations to transitions */
body, .top-nav, .sidebar, .main-content, 
.card, .server-card, .network-card, .stat-card,
.user-dropdown-menu, .org-dropdown, .menu-item,
.nav-link, .dropdown-item, .org-option {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark mode styles */
body.dark-mode {
    --text-dark: #f1f5f9;
    --text-light: #e2e8f0;
    --border-color: #334155;
    --bg-dark: #0f172a;
    background-color: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .top-nav {
    background-color: #0f172a;
    border-bottom-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .main-content {
    background-color: #1e293b;
}

body.dark-mode .sidebar {
    background-color: #0f172a;
    border-right-color: #334155;
}

body.dark-mode .nav-link {
    color: #e2e8f0;
}

body.dark-mode .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .nav-link.active {
    background-color: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

body.dark-mode .nav-section-title {
    color: #94a3b8;
}

body.dark-mode .sidebar-divider {
    background-color: #334155;
}

body.dark-mode .card,
body.dark-mode .server-card,
body.dark-mode .network-card,
body.dark-mode .stat-card {
    background-color: #0f172a;
    border-color: #334155;
}

body.dark-mode .stat-number {
    color: #f1f5f9;
}

body.dark-mode .stat-label {
    color: #94a3b8;
}

body.dark-mode .search-input {
    background-color: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .user-dropdown-menu {
    background-color: #0f172a;
    border-color: #334155;
}

body.dark-mode .dropdown-item {
    color: #f1f5f9;
}

body.dark-mode .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .dropdown-divider {
    background-color: #334155;
}

body.dark-mode .menu-item a {
    color: #e2e8f0;
}

body.dark-mode .menu-item.active {
    background-color: rgba(14, 165, 233, 0.15);
}

body.dark-mode .menu-item.active a {
    color: #0ea5e9;
}

body.dark-mode .theme-toggle-icon {
    color: #f1f5f9;
}

body.dark-mode .org-selector-btn {
    color: #f1f5f9;
    border-color: #334155;
}

body.dark-mode .org-dropdown {
    background-color: #0f172a;
    border-color: #334155;
}

body.dark-mode .org-option {
    color: #f1f5f9;
}

body.dark-mode .org-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Organization selector styling - updated to match user button */
.org-selector {
    position: relative;
}

.org-selector-btn {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    color: var(--text-dark);
    min-width: 140px;
}

.org-selector-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.org-selector-btn i {
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.org-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 200px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
    display: none;
}

.org-selector.active .org-dropdown {
    display: block;
}

.org-option {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
}

.org-option:hover {
    background-color: #f9fafb;
}

.org-option.active {
    font-weight: 500;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Theme toggle styling - fixed */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

.theme-toggle-icon {
    color: var(--text-dark);
    font-size: 1rem;
    margin-right: 0.375rem;
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border-radius: 0.375rem;
    color: var(--text-dark);
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Main content area */
.main-content {
    background-color: var(--bg-light);
}

/* Content header */
.content-header {
    background-color: var(--card-bg);
    border-bottom-color: var(--border-color);
}

/* Inputs */
input, select, textarea {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-dark);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-secondary {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

/* Tables */
table {
    border-color: var(--border-color);
    color: var(--text-dark);
}

table th {
    background-color: rgba(0, 0, 0, 0.05);
}

table td {
    border-top: 1px solid var(--border-color);
}

/* Dark mode specific adjustments */
body.dark-mode .card {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

body.dark-mode input::placeholder {
    color: var(--text-light);
}

/* Status indicators */
.status-running {
    color: #10b981;
}

.status-stopped {
    color: #6b7280;
}

.status-warning {
    color: #f59e0b;
}

.status-error {
    color: #ef4444;
}

/* Apply consistent animations to transitions */
body, .top-nav, .sidebar, .main-content, 
.card, .server-card, .network-card, .stat-card,
.user-dropdown-menu, .org-dropdown, .menu-item,
.nav-link, .dropdown-item, .org-option {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Light mode specific styling */
body:not(.dark-mode) {
    --primary-color: #0284c7;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --border-color: #e5e7eb;
    --hover-bg: #f1f5f9;
    --active-bg: rgba(2, 132, 199, 0.1);
    --active-color: #0284c7;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Enhance dark mode styling */
body.dark-mode {
    --primary-color: #38bdf8;
    --secondary-color: #94a3b8;
    --background-color: #1e293b;
    --card-bg: #0f172a;
    --text-color: #f1f5f9;
    --border-color: #334155;
    --hover-bg: rgba(255, 255, 255, 0.05);
    --active-bg: rgba(14, 165, 233, 0.15);
    --active-color: #38bdf8;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Global styles */
body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Top navigation enhancements */
.top-nav {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.menu-item a {
    color: var(--text-color);
}

.menu-item:hover:not(.active) {
    background-color: var(--hover-bg);
}

.menu-item.active {
    background-color: var(--active-bg);
}

.menu-item.active a {
    color: var(--active-color);
}

/* Sidebar enhancements */
.sidebar {
    background-color: var(--background-color);
    border-right: 1px solid var(--border-color);
}

.sidebar .nav-link {
    color: var(--text-color);
}

.sidebar .nav-link:hover {
    background-color: var(--hover-bg);
}

.sidebar .nav-link.active {
    background-color: var(--active-bg);
    color: var(--active-color);
}

.nav-section-title {
    color: var(--secondary-color);
}

.sidebar-divider {
    background-color: var(--border-color);
}

/* Cards and content */
.card, .server-card, .network-card, .stat-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}

.stat-number {
    color: var(--text-color);
}

.stat-label {
    color: var(--secondary-color);
}

/* Dropdowns */
.user-dropdown-menu, .org-dropdown {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item, .org-option {
    color: var(--text-color);
}

.dropdown-item:hover, .org-option:hover {
    background-color: var(--hover-bg);
}

.dropdown-divider {
    background-color: var(--border-color);
}

/* Organization selector button */
.org-selector-btn {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.org-selector-btn:hover {
    background-color: var(--hover-bg);
}

/* User dropdown button */
.user-dropdown-btn:hover {
    background-color: var(--hover-bg);
}

/* Theme toggle button */
.theme-toggle-btn {
    color: var(--text-color);
}

.theme-toggle-btn:hover {
    background-color: var(--hover-bg);
}

body.dark-mode .theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Main content area */
.main-content {
    background-color: var(--background-color);
}

/* Content header */
.content-header {
    background-color: var(--card-bg);
    border-bottom-color: var(--border-color);
}

/* Inputs */
input, select, textarea {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

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

/* Tables */
table {
    border-color: var(--border-color);
    color: var(--text-color);
}

table th {
    background-color: var(--hover-bg);
}

table td {
    border-top: 1px solid var(--border-color);
}

/* Dark mode specific adjustments */
body.dark-mode .card {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

body.dark-mode input::placeholder {
    color: var(--text-light);
}

/* Status indicators */
.status-running {
    color: #10b981;
}

.status-stopped {
    color: #6b7280;
}

.status-warning {
    color: #f59e0b;
}

.status-error {
    color: #ef4444;
}
