:root {
    --primary-blue: #2563eb;
    --secondary-blue: #1d4ed8;
    --light-gray: #f8fafc;
    --medium-gray: #64748b;
    --dark-gray: #334155;
    --border-color: #e2e8f0;
    --success-green: #059669;
    --warning-orange: #d97706;
    --bg-color: #f8fafc;
    --card-bg: white;
    --text-color: #334155;
    --text-muted: #64748b;
    --transition-speed: 0.3s;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg-color: #0a0a0a;
        --card-bg: #1a1a1a;
        --light-gray: #333333;
        --medium-gray: #a0a0a0;
        --dark-gray: #f5f5f5;
        --border-color: #404040;
        --text-color: #f5f5f5;
        --text-muted: #a0a0a0;
    }
}

[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --light-gray: #333333;
    --medium-gray: #a0a0a0;
    --dark-gray: #f5f5f5;
    --border-color: #404040;
    --text-color: #f5f5f5;
    --text-muted: #a0a0a0;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --card-bg: white;
    --light-gray: #f8fafc;
    --medium-gray: #64748b;
    --dark-gray: #334155;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-muted: #64748b;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-bottom: 3rem;
    position: relative;
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

/* Modern Theme Toggle Switch */
.theme-toggle-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-speed) ease;
}

.theme-switch {
    position: relative;
    width: 60px;
    height: 32px;
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    border-radius: 32px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    padding: 2px;
}

.theme-switch:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.theme-switch-handle {
    width: 24px;
    height: 24px;
    background: var(--card-bg);
    border-radius: 50%;
    position: absolute;
    left: 2px;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.theme-switch-handle i {
    font-size: 12px;
    color: var(--text-muted);
    transition: color var(--transition-speed) ease;
}

/* Dark mode active state */
[data-theme="dark"] .theme-switch {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

[data-theme="dark"] .theme-switch-handle {
    transform: translateX(28px);
    background: white;
    border-color: var(--primary-blue);
}

[data-theme="dark"] .theme-switch-handle i {
    color: var(--primary-blue);
}

/* Hide label text on mobile */
@media (max-width: 768px) {
    .theme-toggle-label {
        display: none;
    }

    .theme-toggle-container {
        top: 0.5rem;
        right: 0.5rem;
    }
}

.logo-section {
    text-align: center;
}

.company-logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 1rem;
}

.company-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    transition: color var(--transition-speed) ease;
}

.company-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0;
    transition: color var(--transition-speed) ease;
}

.main-content {
    flex: 1;
}

.section-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    height: 100%;
    transition: all var(--transition-speed) ease;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: border-color var(--transition-speed) ease;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
}

.clients .section-icon {
    background-color: var(--primary-blue);
}

.employees .section-icon {
    background-color: var(--success-green);
}

.social .section-icon {
    background-color: var(--warning-orange);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    transition: color var(--transition-speed) ease;
}

.link-item {
    display: block;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}

.link-item:hover {
    background: var(--card-bg);
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    text-decoration: none;
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.link-content {
    display: flex;
    align-items: center;
}

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.link-item:hover .link-icon {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.link-details h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    font-size: 1rem;
    transition: color var(--transition-speed) ease;
}

.link-details small {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--transition-speed) ease;
}

.external-indicator {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--transition-speed) ease;
}

.link-item:hover .external-indicator {
    color: var(--primary-blue);
}

.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    flex-shrink: 0;
    transition: all var(--transition-speed) ease;
}

.footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--transition-speed) ease;
}

@media (max-width: 768px) {
    .company-name {
        font-size: 2rem;
    }

    .section-card {
        padding: 1.5rem;
    }
}

/* Loading state for theme switching */
.theme-switching * {
    transition: none !important;
}