
:root {
    --primary-color: #00008b;
    --secondary-color: #ed941e;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;

    --green-50: #f0fdf4;
    --green-200: #bbf7d0;
    --green-600: #16a34a;
    --green-700: #15803d;

    --red-600: #dc2626;
}

.bg-primary { 
    background-color: var(--primary-color); 
}

.bg-secondary { 
    background-color: var(--secondary-color); 
}

.text-blue-100 { 
    color: var(--blue-100); 
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #007bff;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #007bff;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px) translateY(-50%);
}

header .toggle-slider {
    background-color: rgba(255, 255, 255, 0.3);
}

header input:checked + .toggle-slider {
    background-color: rgba(255, 255, 255, 0.6);
}

header .toggle-slider:before {
    background-color: white;
}

.status {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    margin: 20px 0;
}

.status.connected {
    background: #10b981;
    color: white;
}

.status.disconnected {
    background: #ef4444;
    color: white;
}

.error-message,
.success-message,
.info-message {
    animation: slideInRight 0.3s ease-out;
}

.error-message.translate-x-full,
.success-message.translate-x-full,
.info-message.translate-x-full {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

#toast-container {
    width: 100%;
    max-width: 28rem;
}

@media (max-width: 640px) {
    #toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

.client-btn.selected {
    border-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    color: white !important;
}

.client-btn.selected .client-name,
.client-btn.selected .client-desc {
    color: white !important;
}

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

.spinner {
    animation: spin 1s linear infinite;
}

.btn.processing {
    opacity: 0.7;
    cursor: wait;
}
