/* Atos Brand Guidelines - Custom Styles for Workflow Editor */

/* ============================================
   ATOS BRAND COLORS (Reference)
   - Atos Blue: #0073E6
   - Deep Blue: #00005C
   - Light Blue: #3DC7FF
   - Pink: #EF5E82
   - Green: #4AA82D
   - Purple: #663894
   - Orange: #F56A00
   - White: #FFFFFF
   ============================================ */

/* Typography - Inter */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    zoom: 0.8;
    min-height: 125vh; /* compensate for zoom: 0.8 (1/0.8 = 1.25) */
}

/* Compensate viewport heights for body zoom: 0.8 */
body.h-screen {
    height: 125vh;
}
body.min-h-screen {
    min-height: 125vh;
}

/* ============================================
   DARK THEME
   ============================================ */
html.dark body {
    background-color: #080C18;
    color: #EDF2FF;
}

html.dark header.glass-nav::after,
html.dark aside.glass-nav::after,
html.dark nav.glass-nav::after {
    background: rgba(14, 19, 36, 0.85);
}

html.dark #canvas-container {
    background: #0C1220;
}

html.dark .text-gray-900 { color: #EDF2FF !important; }
html.dark .text-gray-700 { color: #8B9EC0 !important; }
html.dark .text-gray-500 { color: #4E6285 !important; }
html.dark .text-gray-400 { color: #2A3A55 !important; }
html.dark .text-atos-deep { color: #8B9EC0 !important; }

html.dark .bg-white\/60,
html.dark .bg-white\/50,
html.dark .bg-white\/40,
html.dark .bg-white\/30 { background-color: rgba(255,255,255,0.06) !important; }

html.dark .border-gray-200,
html.dark .border-gray-300 { border-color: rgba(255,255,255,0.10) !important; }

html.dark [class*="border-[rgba(180"] { border-color: rgba(255,255,255,0.10) !important; }

html.dark [class*="bg-gray-200/60"]:hover { background-color: rgba(255,255,255,0.08) !important; }

html.dark .node-item {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.10);
}
html.dark .node-item:hover {
    background-color: rgba(0,104,225,0.12);
    border-color: rgba(0,104,225,0.4);
}
html.dark .node-item .node-name,
html.dark .node-item > span:last-child {
    color: #8B9EC0;
}

html.dark .node-category h3 {
    color: #8B9EC0;
    border-bottom-color: rgba(0,115,230,0.3);
}

html.dark .main-section-header {
    background-color: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #8B9EC0 !important;
}

html.dark .subcategory-header {
    color: #4E6285 !important;
}
html.dark .subcategory-header:hover {
    background-color: rgba(255,255,255,0.05) !important;
}

html.dark #user-dropdown {
    background-color: rgba(16,22,42,0.95) !important;
    border-color: rgba(255,255,255,0.11) !important;
}
html.dark #user-dropdown a,
html.dark #user-dropdown button {
    color: #8B9EC0 !important;
}
html.dark #user-dropdown a:hover,
html.dark #user-dropdown button:hover {
    background-color: rgba(255,255,255,0.08) !important;
}

/* ============================================
   DARK THEME - Admin Panel
   ============================================ */
html.dark .admin-section h1,
html.dark .admin-section h2 {
    color: #EDF2FF !important;
}
html.dark .admin-section p {
    color: #4E6285 !important;
}

/* Admin main content area */
html.dark main.flex-1 {
    background-color: #111827;
}

/* Cards and tables */
html.dark .admin-section .bg-white {
    background-color: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

/* Table headers */
html.dark .admin-section thead.bg-atos-deep {
    background-color: rgba(14,19,36,0.9) !important;
}
html.dark .admin-section thead th {
    color: #8B9EC0 !important;
    border-color: rgba(255,255,255,0.07) !important;
}

/* Table rows */
html.dark .admin-section tbody tr {
    border-color: rgba(255,255,255,0.07) !important;
}
html.dark .admin-section tbody tr:hover {
    background-color: rgba(255,255,255,0.04) !important;
}
html.dark .admin-section tbody td {
    color: #8B9EC0 !important;
}
html.dark .admin-section .divide-gray-200 > :not(:last-child) {
    border-color: rgba(255,255,255,0.07) !important;
}

/* Admin sidebar links */
html.dark .admin-section a,
html.dark aside.glass-nav a {
    color: #8B9EC0 !important;
}
html.dark aside.glass-nav a:hover {
    background-color: rgba(255,255,255,0.06) !important;
    color: #EDF2FF !important;
}
html.dark aside.glass-nav a.bg-atos-blue {
    background-color: #0073E6 !important;
    color: #ffffff !important;
}

/* Card borders and dividers */
html.dark .admin-section .border-gray-200,
html.dark .admin-section .border-b {
    border-color: rgba(255,255,255,0.07) !important;
}

/* Inputs and selects in admin */
html.dark .admin-section input,
html.dark .admin-section select,
html.dark .admin-section textarea {
    background-color: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #EDF2FF !important;
}
html.dark .admin-section select option {
    background-color: #0E1324 !important;
    color: #EDF2FF !important;
}

/* All select dropdowns globally in dark mode */
html.dark select option {
    background-color: #0E1324;
    color: #EDF2FF;
}

/* Info banners */
html.dark .admin-section .bg-blue-50 {
    background-color: rgba(0,104,225,0.08) !important;
    border-color: rgba(0,104,225,0.25) !important;
}
html.dark .admin-section .text-blue-800,
html.dark .admin-section .text-blue-700,
html.dark .admin-section .text-blue-600 {
    color: #6AABFF !important;
}

/* All white cards/containers in admin */
html.dark .admin-section .bg-white,
html.dark .admin-section .bg-gray-50,
html.dark .admin-section [class*="bg-white"] {
    background-color: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

/* Rounded card containers */
html.dark .admin-section .rounded-lg {
    border-color: rgba(255,255,255,0.10) !important;
}

/* Buttons */
html.dark .admin-section .text-atos-deep {
    color: #8B9EC0 !important;
}

/* Modals */
html.dark .modal .bg-white,
html.dark [id^="modal"] .bg-white {
    background-color: rgba(14,19,36,0.95) !important;
    border-color: rgba(255,255,255,0.10) !important;
}
html.dark .modal .border-gray-200,
html.dark [id^="modal"] .border-gray-200 {
    border-color: rgba(255,255,255,0.07) !important;
}
html.dark .modal label,
html.dark [id^="modal"] label {
    color: #8B9EC0 !important;
}

/* Modal form inputs and labels */
html.dark [id^="modal"] .atos-input {
    background-color: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #EDF2FF !important;
}
html.dark [id^="modal"] .atos-input:disabled {
    background-color: rgba(255,255,255,0.03) !important;
    color: #4E6285 !important;
}
html.dark [id^="modal"] .atos-input::placeholder {
    color: #4E6285 !important;
}
html.dark [id^="modal"] .atos-label {
    color: #EDF2FF !important;
}
html.dark [id^="modal"] .text-atos-deep {
    color: #8B9EC0 !important;
}
html.dark [id^="modal"] p.text-gray-500,
html.dark [id^="modal"] .text-xs.text-gray-500 {
    color: #4E6285 !important;
}
html.dark [id^="modal"] select option {
    background-color: #0E1324 !important;
    color: #EDF2FF !important;
}

/* Node Settings Modal - Dark Theme */
html.dark #node-settings-modal .bg-white {
    background-color: rgba(14,19,36,0.95) !important;
    border-color: rgba(255,255,255,0.10) !important;
}
html.dark #node-settings-modal .bg-gray-50 {
    background-color: rgba(14,19,36,0.98) !important;
}
html.dark #node-settings-modal .border-gray-200 {
    border-color: rgba(255,255,255,0.07) !important;
}
html.dark #node-settings-modal label {
    color: #8B9EC0 !important;
}
html.dark #node-settings-modal .text-gray-600 {
    color: #8B9EC0 !important;
}
html.dark #node-settings-modal .text-gray-700 {
    color: #B0C4DE !important;
}
html.dark #node-settings-modal .text-gray-800 {
    color: #EDF2FF !important;
}
html.dark #node-settings-modal .text-gray-400 {
    color: #4E6285 !important;
}
html.dark #node-settings-modal .text-gray-500 {
    color: #6B7FA0 !important;
}
html.dark #node-settings-modal p {
    color: #8B9EC0 !important;
}
html.dark #node-settings-modal input[type="text"],
html.dark #node-settings-modal input[type="number"],
html.dark #node-settings-modal textarea,
html.dark #node-settings-modal select {
    background-color: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #EDF2FF !important;
}
html.dark #node-settings-modal input::placeholder,
html.dark #node-settings-modal textarea::placeholder {
    color: #4E6285 !important;
}
html.dark #node-settings-modal select option {
    background-color: #0E1324 !important;
    color: #EDF2FF !important;
}
html.dark #node-settings-modal .settings-tab-btn {
    color: #8B9EC0 !important;
}
html.dark #node-settings-modal .settings-tab-btn.border-blue-500 {
    color: #60A5FA !important;
}

/* Execution Input Dialog (Upload File modal) - Dark Theme: keep light backgrounds, ensure text contrast */
html.dark #execution-dialog-container .bg-white {
    background-color: #ffffff !important;
}
html.dark #execution-dialog-container .bg-gray-50 {
    background-color: #f9fafb !important;
}
html.dark #execution-dialog-container .text-gray-700,
html.dark #execution-dialog-container .text-gray-600 {
    color: #374151 !important;
}
html.dark #execution-dialog-container .text-gray-500 {
    color: #6b7280 !important;
}
html.dark #execution-dialog-container label {
    color: #374151 !important;
}
html.dark #execution-dialog-container p,
html.dark #execution-dialog-container span {
    color: #4b5563 !important;
}
html.dark #execution-dialog-container .border-gray-200 {
    border-color: #e5e7eb !important;
}
html.dark #execution-dialog-container .border-dashed {
    border-color: #d1d5db !important;
}
html.dark #execution-dialog-container input[type="file"],
html.dark #execution-dialog-container input[type="text"],
html.dark #execution-dialog-container textarea,
html.dark #execution-dialog-container select {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
}

/* Workflow Result / Human Review modal - Dark Theme: keep light backgrounds, ensure text contrast */
html.dark #workflow-result-modal .bg-white {
    background-color: #ffffff !important;
}
html.dark #workflow-result-modal .bg-gray-50,
html.dark #workflow-result-modal .bg-slate-50\/50,
html.dark #workflow-result-modal .bg-slate-50 {
    background-color: #f8fafc !important;
}
html.dark #workflow-result-modal .text-gray-700,
html.dark #workflow-result-modal .text-gray-600,
html.dark #workflow-result-modal .text-slate-700,
html.dark #workflow-result-modal .text-slate-600 {
    color: #374151 !important;
}
html.dark #workflow-result-modal .text-gray-500,
html.dark #workflow-result-modal .text-slate-500 {
    color: #6b7280 !important;
}
html.dark #workflow-result-modal .text-gray-900,
html.dark #workflow-result-modal .text-slate-900 {
    color: #111827 !important;
}
html.dark #workflow-result-modal .text-gray-400 {
    color: #9ca3af !important;
}
html.dark #workflow-result-modal p,
html.dark #workflow-result-modal span,
html.dark #workflow-result-modal li {
    color: #374151 !important;
}
html.dark #workflow-result-modal .text-white {
    color: #ffffff !important;
}
html.dark #workflow-result-modal .bg-gradient-to-r *,
html.dark #workflow-result-modal [class*="from-atos"] .text-white {
    color: #ffffff !important;
}
html.dark #workflow-result-modal label {
    color: #374151 !important;
}
html.dark #workflow-result-modal .border-gray-200,
html.dark #workflow-result-modal .border-slate-200 {
    border-color: #e5e7eb !important;
}
html.dark #workflow-result-modal #result-content,
html.dark #workflow-result-modal [contenteditable] {
    background-color: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #1f2937 !important;
}
html.dark #workflow-result-modal textarea,
html.dark #workflow-result-modal pre,
html.dark #workflow-result-modal #human-review-display,
html.dark #workflow-result-modal #human-review-editor,
html.dark #workflow-result-modal #human-review-editor-inline,
html.dark #workflow-result-modal #human-review-text-edit {
    color: #1f2937 !important;
    background-color: #ffffff !important;
    border-color: #e5e7eb !important;
}
html.dark #workflow-result-modal #human-review-display * {
    color: #1f2937 !important;
}
html.dark #workflow-result-modal .whitespace-pre-wrap {
    color: #1f2937 !important;
}
html.dark #workflow-result-modal #scenario-checkbox-tree {
    background-color: #ffffff !important;
    border-color: #e5e7eb !important;
}
html.dark #workflow-result-modal #scenario-checkbox-tree .bg-gray-50 {
    background-color: #f9fafb !important;
}
html.dark #workflow-result-modal #scenario-checkbox-tree .border-gray-200,
html.dark #workflow-result-modal #scenario-checkbox-tree .border-gray-100 {
    border-color: #e5e7eb !important;
}
html.dark #workflow-result-modal .bg-yellow-50 {
    background-color: #fefce8 !important;
}
html.dark #workflow-result-modal .border-yellow-200 {
    border-color: #fef08a !important;
}

/* Admin Dashboard link at bottom of sidebar */
html.dark aside.glass-nav .text-atos-blue {
    color: #6AABFF !important;
}

/* Tooltips and hover states */
html.dark [title]:hover::after,
html.dark .hover\:bg-gray-100:hover {
    background-color: rgba(255,255,255,0.06) !important;
}
html.dark .hover\:bg-gray-200:hover {
    background-color: rgba(255,255,255,0.08) !important;
}

/* Browser native tooltips - override via custom tooltip styling */
html.dark .admin-section button:hover,
html.dark .admin-section a:hover {
    color: #EDF2FF !important;
}
html.dark .admin-section button.bg-atos-blue:hover {
    color: #ffffff !important;
}

/* ============================================
   GLASS NAV BACKGROUND - Frosted glass effect
   Background image on header & sidebar only
   ============================================ */
header.glass-nav,
aside.glass-nav,
nav.glass-nav {
    position: relative;
}
header.glass-nav::before,
aside.glass-nav::before,
nav.glass-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/images/nav-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: -2;
    pointer-events: none;
}
header.glass-nav::after,
aside.glass-nav::after,
nav.glass-nav::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(246, 250, 255, 0.78);
    backdrop-filter: blur(48px) saturate(210%) brightness(1.03);
    -webkit-backdrop-filter: blur(48px) saturate(210%) brightness(1.03);
    z-index: -1;
    pointer-events: none;
}

/* Ensure dropdowns inside glass-nav are not clipped */
header.glass-nav #user-dropdown,
header.glass-nav .prof-dd,
nav.glass-nav #user-dropdown {
    z-index: 9999;
}

/* Canvas container */
#canvas-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #F8F9FA;
}

#canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Node status indicators - Using Atos colors */
.node-status-running {
    box-shadow: 0 0 10px 2px #0073E6;
    animation: pulse 1s infinite;
}

.node-status-completed {
    box-shadow: 0 0 10px 2px #4AA82D;
}

.node-status-failed {
    box-shadow: 0 0 10px 2px #EF5E82;
}

.node-status-waiting {
    box-shadow: 0 0 10px 2px #F56A00;
    animation: pulse 2s infinite;
}

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

/* Node palette items - Sharp corners (Atos) */
.node-item {
    padding: 0.625rem 0.75rem;
    background-color: rgba(255,255,255,0.5);
    border: 1px solid rgba(180,200,235,0.42);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    user-select: none;
    margin-bottom: 0.25rem;
}

.node-item:hover {
    background-color: #f0f7ff;
    border-color: #0073E6;
    transform: translateX(2px);
}

.node-item:active {
    background-color: #0073E6;
    color: white;
}

.node-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.node-item .node-color,
.node-item > span:first-child {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

.node-item .node-name,
.node-item > span:last-child {
    color: #00005C;
    font-weight: 500;
}

/* Category toggle */
.node-category {
    margin-bottom: 0.5rem;
}

.node-category h3 {
    user-select: none;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #00005C;
    padding: 0.5rem 0;
    border-bottom: 2px solid rgba(0,115,230,0.4);
    margin-bottom: 0.5rem;
}

.node-category h3:hover {
    color: #0073E6;
}

.node-category.collapsed .category-nodes {
    display: none;
}

.node-category.collapsed h3 [data-lucide="chevron-down"] {
    transform: rotate(-90deg);
}

/* Main section header (Configurations / Agents) */
.main-section-header {
    font-size: 0.8rem;
    border-bottom: none;
    margin-bottom: 0;
    padding: 0.5rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-section-header:hover {
    background-color: #e5e7eb;
}

/* Sub-category styles */
.node-subcategory {
    margin-bottom: 0.25rem;
}

.subcategory-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    transition: background-color 0.15s;
}

.subcategory-header:hover {
    background-color: #f3f4f6;
}

.subcategory-nodes {
    padding: 0.25rem 0;
}

.subcategory-nodes .node-item {
    padding-left: 0.5rem;
}

/* Section content */
.section-content {
    padding: 0.25rem 0;
}

/* Tab switching - Sharp underline */
[data-tab].active {
    border-color: #0073E6;
    color: #0073E6;
}

/* Execution log items - Sharp corners */
.log-item {
    padding: 0.5rem;
    border-left: 3px solid;
}

.log-item.pending {
    border-color: #6b7280;
    background-color: #f3f4f6;
}

.log-item.running {
    border-color: #0073E6;
    background-color: #e0f2fe;
}

.log-item.completed {
    border-color: #4AA82D;
    background-color: #dcfce7;
}

.log-item.failed {
    border-color: #EF5E82;
    background-color: #fce7f3;
}

.log-item.waiting {
    border-color: #F56A00;
    background-color: #ffedd5;
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Workflow list items - Sharp corners */
.workflow-item {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.15s ease;
}

.workflow-item:hover {
    background-color: #e5e7eb;
    border-color: #0073E6;
}

.workflow-item.sidebar-active {
    background-color: #dbeafe !important;
    border-color: #0073E6 !important;
    border-left: 3px solid #0073E6 !important;
    font-weight: 600;
}

.workflow-item .workflow-name {
    font-weight: 600;
    color: #00005C;
}

.workflow-item .workflow-date {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Property field styles - Sharp corners */
.prop-field {
    margin-bottom: 1rem;
}

.prop-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #00005C;
    margin-bottom: 0.25rem;
}

.prop-field input,
.prop-field select,
.prop-field textarea {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #00005C;
}

.prop-field input:focus,
.prop-field select:focus,
.prop-field textarea:focus {
    outline: none;
    border-color: #0073E6;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
}

.prop-field textarea {
    min-height: 80px;
    resize: vertical;
}

/* Scrollbar styling - Atos colors */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #0073E6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00005C;
}

/* Toast notifications - Sharp corners */
.toast {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 100;
    animation: slideUp 0.3s ease;
}

.toast.success {
    background-color: #4AA82D;
    color: white;
}

.toast.error {
    background-color: #EF5E82;
    color: white;
}

.toast.warning {
    background-color: #F56A00;
    color: white;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Toolbar buttons - Sharp, flat design */
.toolbar-btn {
    padding: 0.5rem;
    color: #00005C;
    transition: all 0.15s ease;
    background: transparent;
    border: 1px solid transparent;
}

.toolbar-btn:hover {
    background-color: #e5e7eb;
    border-color: #0073E6;
}

/* Atos Primary Button */
.btn-primary {
    background-color: #0073E6;
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-primary:hover {
    background-color: #005bb5;
}

/* Atos Secondary Button */
.btn-secondary {
    background-color: #00005C;
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-secondary:hover {
    background-color: #000040;
}

/* Atos Ghost Button */
.btn-ghost {
    background-color: transparent;
    color: #0073E6;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border: 1px solid #0073E6;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ghost:hover {
    background-color: #0073E6;
    color: white;
}

/* Cards - Flat design, no rounded corners */
.atos-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.atos-card-header {
    border-bottom: 2px solid #0073E6;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

/* Form inputs - Sharp corners, visible labels */
.atos-input {
    width: 100%;
    background-color: white;
    border: 1px solid #d1d5db;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: #00005C;
    transition: border-color 0.15s ease;
}

.atos-input:focus {
    outline: none;
    border-color: #0073E6;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
}

.atos-input::placeholder {
    color: #9ca3af;
}

/* Atos Label */
.atos-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #00005C;
    margin-bottom: 0.375rem;
}

/* Toggle switch - Atos style */
.atos-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #d1d5db;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.atos-toggle.active {
    background-color: #0073E6;
}

.atos-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    transition: transform 0.15s ease;
}

.atos-toggle.active::after {
    transform: translateX(20px);
}

/* Animation for fade in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { 
    animation: fadeIn 0.3s ease-out; 
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}
.animate-scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Alert Modal Styles */
#alert-modal .bg-white {
    border-radius: 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Atos Curves of Progress - Decorative element */
.atos-curve {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid #3DC7FF;
    border-radius: 0 0 100% 0;
    border-top: none;
    border-left: none;
}

.atos-curve.top-right {
    top: 0;
    right: 0;
    transform: rotate(0deg);
}

.atos-curve.bottom-left {
    bottom: 0;
    left: 0;
    transform: rotate(180deg);
}

/* ============================================
   ATOS BRANDED LOADING SYSTEM
   Unified loading indicators across the app
   ============================================ */

/* Global Loading Overlay */
.atos-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.atos-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.atos-loading-content {
    text-align: center;
    color: #00005C;
}

/* Atos Branded Spinner - Triple Ring */
.atos-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.atos-spinner-ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: atos-spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.atos-spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    border-top-color: #0073E6;
    border-right-color: #0073E6;
    animation-delay: 0s;
}

.atos-spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: #3DC7FF;
    border-right-color: #3DC7FF;
    animation-delay: -0.2s;
    animation-direction: reverse;
}

.atos-spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: #663894;
    border-right-color: #663894;
    animation-delay: -0.4s;
}

/* Center dot with pulse */
.atos-spinner-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #0073E6, #3DC7FF);
    border-radius: 50%;
    animation: atos-pulse 1s ease-in-out infinite;
}

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

@keyframes atos-pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.7;
    }
}

/* Loading text */
.atos-loading-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #00005C;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.atos-loading-subtext {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    color: #0073E6;
    opacity: 0.9;
}

/* Progress bar variant */
.atos-loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    margin: 16px auto 0;
    overflow: hidden;
}

.atos-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073E6, #3DC7FF, #663894);
    background-size: 200% 100%;
    animation: atos-progress 1.5s ease-in-out infinite;
}

@keyframes atos-progress {
    0% { 
        width: 0%;
        background-position: 0% 0%;
    }
    50% {
        width: 70%;
        background-position: 100% 0%;
    }
    100% { 
        width: 100%;
        background-position: 0% 0%;
    }
}

/* Canvas-specific loading (lighter variant) */
.atos-canvas-loading {
    position: absolute;
    inset: 0;
    background: rgba(248, 249, 250, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.atos-canvas-loading .atos-spinner-ring:nth-child(1) {
    border-top-color: #00005C;
    border-right-color: #00005C;
}

.atos-canvas-loading .atos-loading-text {
    color: #00005C;
}

.atos-canvas-loading .atos-loading-subtext {
    color: #0073E6;
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-right-color: currentColor;
    border-radius: 50%;
    animation: atos-spin 0.8s linear infinite;
}

.btn-loading.btn-primary::after {
    border-top-color: white;
    border-right-color: white;
}

/* Inline spinner for text */
.atos-inline-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-right-color: currentColor;
    border-radius: 50%;
    animation: atos-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
