/* STEPS - Custom Styles */

/* ============================================
   THEME SYSTEM — CSS Custom Properties
   ============================================ */
:root,
[data-theme="blue"] {
    --primary-50:  #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-rgb: 37, 99, 235;
    --sidebar-accent: #2563eb;
}
[data-theme="indigo"] {
    --primary-50:  #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-rgb: 79, 70, 229;
    --sidebar-accent: #4f46e5;
}
[data-theme="violet"] {
    --primary-50:  #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-500: #8b5cf6;
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    --primary-rgb: 124, 58, 237;
    --sidebar-accent: #7c3aed;
}
[data-theme="emerald"] {
    --primary-50:  #ecfdf5;
    --primary-100: #d1fae5;
    --primary-200: #a7f3d0;
    --primary-500: #10b981;
    --primary-600: #059669;
    --primary-700: #047857;
    --primary-rgb: 5, 150, 105;
    --sidebar-accent: #059669;
}
[data-theme="rose"] {
    --primary-50:  #fff1f2;
    --primary-100: #ffe4e6;
    --primary-200: #fecdd3;
    --primary-500: #f43f5e;
    --primary-600: #e11d48;
    --primary-700: #be123c;
    --primary-rgb: 225, 29, 72;
    --sidebar-accent: #e11d48;
}
[data-theme="amber"] {
    --primary-50:  #fffbeb;
    --primary-100: #fef3c7;
    --primary-200: #fde68a;
    --primary-500: #f59e0b;
    --primary-600: #d97706;
    --primary-700: #b45309;
    --primary-rgb: 217, 119, 6;
    --sidebar-accent: #d97706;
}
[data-theme="slate"] {
    --primary-50:  #f8fafc;
    --primary-100: #f1f5f9;
    --primary-200: #e2e8f0;
    --primary-500: #64748b;
    --primary-600: #475569;
    --primary-700: #334155;
    --primary-rgb: 71, 85, 105;
    --sidebar-accent: #475569;
}
[data-theme="teal"] {
    --primary-50:  #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-rgb: 13, 148, 136;
    --sidebar-accent: #0d9488;
}

/* ============================================
   DARK MODE — Eye-friendly, works with all theme colors
   ============================================ */
[data-mode="dark"] {
    color-scheme: dark;
}

/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}

[data-mode="dark"] body {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
[data-mode="dark"] ::-webkit-scrollbar-track { background: #0f172a; }
[data-mode="dark"] ::-webkit-scrollbar-thumb { background: #334155; }
[data-mode="dark"] ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Tables */
.steps-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.rounded-xl:has(.steps-table) {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}
[data-mode="dark"] .rounded-xl:has(.steps-table) {
    background: #0f172a;
    border: 1px solid #334155;
}
.steps-table thead th {
    background-color: #f8fafc; padding: 12px 16px; text-align: left;
    font-size: 12px; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e2e8f0;
}
.steps-table tbody td { padding: 12px 16px; font-size: 14px; color: #334155; border-bottom: 1px solid #f1f5f9; }
.steps-table tbody tr:hover { background-color: #f8fafc; }

/* Table search bar */
.table-search-bar {
    padding: 12px 16px; border-bottom: 1px solid #e2e8f0; background: #fafbfc;
}
.table-search-bar .table-search-input {
    max-width: 280px; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 12px center; background-size: 18px;
}
.table-search-bar .table-search-input::placeholder { color: #94a3b8; }

/* Stat Cards */
.stat-card {
    background: white; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 24px; transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }

[data-mode="dark"] .stat-card {
    background: #0f172a;
    border-color: #334155;
}

/* Badge */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 12px; font-weight: 500; }
.badge-red   { background-color: #fef2f2; color: #dc2626; }
.badge-amber { background-color: #fffbeb; color: #d97706; }
.badge-green { background-color: #f0fdf4; color: #16a34a; }
.badge-blue  { background-color: var(--primary-50); color: var(--primary-600); }

/* Form elements */
.form-input {
    width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
    font-family: 'Poppins', sans-serif; font-size: 14px; color: #334155; background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.form-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #475569; }
.form-select {
    width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
    font-family: 'Poppins', sans-serif; font-size: 14px; color: #334155; background: white;
    cursor: pointer; transition: border-color 0.2s;
}
.form-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px;
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.2s; border: none; text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background-color: var(--primary-600); color: white; }
.btn-primary:hover { background-color: var(--primary-700); }
.btn-secondary { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background-color: #e2e8f0; }
.btn-danger { background-color: #dc2626; color: white; }
.btn-danger:hover { background-color: #b91c1c; }
.btn-success { background-color: #16a34a; color: white; }
.btn-success:hover { background-color: #15803d; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 50; display: flex; justify-content: center; align-items: flex-start;
    padding-top: 6vh; opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: white; border-radius: 20px; padding: 32px;
    max-width: 560px; width: 92%; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.03), 0 24px 68px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
    transform: translateY(24px) scale(0.97); opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.25s ease;
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); opacity: 1; }
.modal-content::-webkit-scrollbar { width: 5px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

[data-mode="dark"] .modal-content {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
}
[data-mode="dark"] .modal-close:hover { background: #334155; color: #cbd5e1; }
[data-mode="dark"] .modal-content .text-gray-900 { color: #cbd5e1 !important; }
[data-mode="dark"] .modal-content .text-gray-500 { color: #94a3b8 !important; }
[data-mode="dark"] .modal-content .border-gray-200 { border-color: #334155 !important; }
[data-mode="dark"] .modal-content .border-gray-100 { border-color: #1e293b !important; }
[data-mode="dark"] .modal-content .bg-blue-50 { background-color: rgba(var(--primary-rgb), 0.15) !important; }

.modal-overlay.active .modal-icon {
    animation: modalIconPop 0.4s cubic-bezier(0.16,1,0.3,1) 0.15s both;
}
@keyframes modalIconPop {
    0%   { transform: scale(0.5); opacity: 0; }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}
.modal-close {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; background: transparent; border: none; cursor: pointer;
    transition: all 0.15s ease;
}
.modal-close:hover { background: #f1f5f9; color: #475569; }
.modal-divider { border: none; border-top: 1px solid #f1f5f9; margin: 20px 0; }

.modal-overlay.active .modal-content form > div > div,
.modal-overlay.active .modal-content form > div.space-y-4 > div,
.modal-overlay.active .modal-content form > div.grid > div {
    animation: fieldSlideIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
}
.modal-overlay.active .modal-content form > div > div:nth-child(1),
.modal-overlay.active .modal-content form > div.space-y-4 > div:nth-child(1),
.modal-overlay.active .modal-content form > div.grid > div:nth-child(1) { animation-delay: 0.08s; }
.modal-overlay.active .modal-content form > div > div:nth-child(2),
.modal-overlay.active .modal-content form > div.space-y-4 > div:nth-child(2),
.modal-overlay.active .modal-content form > div.grid > div:nth-child(2) { animation-delay: 0.12s; }
.modal-overlay.active .modal-content form > div > div:nth-child(3),
.modal-overlay.active .modal-content form > div.space-y-4 > div:nth-child(3),
.modal-overlay.active .modal-content form > div.grid > div:nth-child(3) { animation-delay: 0.16s; }
.modal-overlay.active .modal-content form > div > div:nth-child(4),
.modal-overlay.active .modal-content form > div.space-y-4 > div:nth-child(4),
.modal-overlay.active .modal-content form > div.grid > div:nth-child(4) { animation-delay: 0.20s; }
.modal-overlay.active .modal-content form > div > div:nth-child(5),
.modal-overlay.active .modal-content form > div.space-y-4 > div:nth-child(5),
.modal-overlay.active .modal-content form > div.grid > div:nth-child(5) { animation-delay: 0.24s; }
.modal-overlay.active .modal-content form > div > div:nth-child(n+6),
.modal-overlay.active .modal-content form > div.space-y-4 > div:nth-child(n+6),
.modal-overlay.active .modal-content form > div.grid > div:nth-child(n+6) { animation-delay: 0.28s; }

@keyframes fieldSlideIn {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 12px;
    margin-top: 24px; padding-top: 20px; border-top: 1px solid #f1f5f9;
}
.modal-icon { transition: transform 0.2s ease; }
.modal-icon:hover { transform: scale(1.05); }

/* ============================================
   THEME PICKER
   ============================================ */
.theme-picker {
    position: relative;
}
.theme-picker-btn {
    width: 36px; height: 36px; border-radius: 8px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; transition: all 0.2s; color: #64748b;
}
.theme-picker-btn:hover { background: #e2e8f0; color: #334155; }
.theme-picker-btn .swatch-dot {
    width: 18px; height: 18px; border-radius: 6px;
    background-color: var(--primary-600); border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    transition: background-color 0.3s ease;
}
[data-mode="dark"] .theme-picker-btn .swatch-dot {
    border-color: #1e293b;
}

.theme-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: white; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 16px; width: 240px; z-index: 60;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16,1,0.3,1), visibility 0.2s ease;
}
.theme-dropdown.active {
    opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.theme-dropdown-title {
    font-size: 12px; font-weight: 600; color: #94a3b8; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 12px; padding: 0 4px;
}
.theme-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.theme-swatch {
    width: 100%; aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent;
    cursor: pointer; position: relative; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.theme-swatch:hover { transform: scale(1.1); }
.theme-swatch.active {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}
.theme-swatch.active::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    color: white; font-size: 10px;
}
.theme-swatch-label {
    text-align: center; font-size: 10px; color: #94a3b8; margin-top: 4px;
    font-weight: 500; line-height: 1;
}

[data-mode="dark"] .theme-picker-btn {
    background: #0f172a;
    color: #94a3b8;
}
[data-mode="dark"] .theme-dropdown {
    background: #0f172a;
    border-color: #334155;
}
[data-mode="dark"] .theme-dropdown-title {
    color: #94a3b8;
}
[data-mode="dark"] .theme-swatch-label {
    color: #94a3b8;
}

/* ============================================
   SIDEBAR - Collapsible & Scrollable
   ============================================ */
.sidebar-aside {
    overflow: hidden;
}
.sidebar-nav {
    -webkit-overflow-scrolling: touch;
}
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}
.sidebar-aside.sidebar-collapsed {
    width: 5rem !important; /* w-20 */
}
.sidebar-aside.sidebar-collapsed .sidebar-brand,
.sidebar-aside.sidebar-collapsed .sidebar-link-text,
.sidebar-aside.sidebar-collapsed .sidebar-label,
.sidebar-aside.sidebar-collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    visibility: hidden;
}
.sidebar-aside.sidebar-collapsed .sidebar-header {
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem;
}
.sidebar-aside.sidebar-collapsed .sidebar-header .flex.items-center.gap-3 {
    justify-content: center;
}
.sidebar-aside.sidebar-collapsed .sidebar-collapse-btn {
    margin-top: 0.5rem;
}
.sidebar-aside.sidebar-collapsed .sidebar-footer .flex.items-center.gap-3 {
    justify-content: center;
}
.sidebar-aside.sidebar-collapsed .sidebar-footer a.sidebar-link {
    justify-content: center;
}
.sidebar-aside.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.sidebar-aside.sidebar-collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}
/* Main content margin */
.main-content-area {
    margin-left: 0;
}
@media (min-width: 1024px) {
    .main-content-area {
        margin-left: 16rem; /* lg:ml-64 */
    }
    body.sidebar-collapsed .main-content-area {
        margin-left: 5rem; /* w-20 */
    }
    body.sidebar-collapsed .expand-sidebar-btn {
        display: flex;
    }
}

/* ============================================
   SIDEBAR THEME INTEGRATION
   ============================================ */
.sidebar-logo { background: none; }
.sidebar-logo-img {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
    transition: filter 0.25s ease;
}
.sidebar-logo:hover .sidebar-logo-img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)) drop-shadow(0 4px 12px rgba(var(--primary-rgb), 0.25));
}
[data-mode="dark"] .sidebar-logo-img {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}
[data-mode="dark"] .sidebar-logo:hover .sidebar-logo-img {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 12px rgba(var(--primary-rgb), 0.2));
}
.sidebar-link-active {
    background-color: var(--primary-50) !important;
    color: var(--primary-700) !important;
}
.navbar-avatar { background-color: var(--sidebar-accent); }

[data-mode="dark"] .sidebar-aside {
    background-color: #0f172a;
    border-color: #334155;
}
[data-mode="dark"] .sidebar-header,
[data-mode="dark"] .sidebar-footer {
    border-color: #334155;
}
[data-mode="dark"] .sidebar-brand h1,
[data-mode="dark"] .sidebar-aside h1.text-gray-900 {
    color: #cbd5e1 !important;
}
[data-mode="dark"] .sidebar-link {
    color: #94a3b8;
}
[data-mode="dark"] .sidebar-link:hover {
    background-color: #1e293b;
    color: #cbd5e1;
}
[data-mode="dark"] .sidebar-label {
    color: #64748b;
}
[data-mode="dark"] .sidebar-user-info p:first-child {
    color: #cbd5e1;
}
[data-mode="dark"] .sidebar-user-info p:last-child {
    color: #94a3b8;
}
[data-mode="dark"] .sidebar-aside .bg-gray-200 {
    background-color: #334155 !important;
}
[data-mode="dark"] .sidebar-aside .text-gray-600 {
    color: #94a3b8 !important;
}
[data-mode="dark"] .sidebar-collapse-btn {
    color: #94a3b8;
}
[data-mode="dark"] .sidebar-collapse-btn:hover {
    background-color: #1e293b;
    color: #e2e8f0;
}
[data-mode="dark"] .sidebar-link-active {
    background-color: rgba(var(--primary-rgb), 0.2) !important;
    color: var(--primary-500) !important;
}
[data-mode="dark"] #main-wrapper > header {
    background-color: #0f172a;
    border-color: #334155;
}
[data-mode="dark"] #main-wrapper > header h2 {
    color: #cbd5e1;
}
[data-mode="dark"] #main-wrapper > header p {
    color: #94a3b8;
}
[data-mode="dark"] #main-wrapper > header span.text-gray-400 {
    color: #64748b;
}
[data-mode="dark"] #main-wrapper > header button:not(.mode-toggle-btn) {
    color: #94a3b8;
}
[data-mode="dark"] #main-wrapper > header button:not(.mode-toggle-btn):hover {
    background-color: #1e293b;
    color: #cbd5e1;
}
[data-mode="dark"] #main-wrapper > footer {
    background-color: #0f172a;
    border-color: #334155;
}
[data-mode="dark"] #main-wrapper > footer p {
    color: #94a3b8;
}
[data-mode="dark"] .steps-table thead th {
    background-color: #0f172a;
    border-bottom-color: #334155;
    color: #94a3b8;
}
[data-mode="dark"] .steps-table tbody td {
    border-bottom-color: #1e293b;
    color: #cbd5e1;
}
[data-mode="dark"] .steps-table tbody tr:hover {
    background-color: #1e293b;
}
[data-mode="dark"] .table-search-bar {
    background: #0f172a;
    border-bottom-color: #334155;
}
[data-mode="dark"] .table-search-bar .table-search-input {
    background-color: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}
[data-mode="dark"] .form-input,
[data-mode="dark"] .form-select {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
[data-mode="dark"] .form-input::placeholder {
    color: #64748b;
}
[data-mode="dark"] .form-label {
    color: #94a3b8;
}
[data-mode="dark"] main {
    color: #cbd5e1;
}
[data-mode="dark"] .badge-blue {
    background-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-500);
}
[data-mode="dark"] .btn-secondary {
    background-color: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}
[data-mode="dark"] .btn-secondary:hover {
    background-color: #334155;
}
.mode-toggle-btn {
    background: #f1f5f9;
    color: #64748b;
}
.mode-toggle-btn:hover {
    background: #e2e8f0;
    color: #334155;
}
[data-mode="dark"] .mode-toggle-btn {
    background: #0f172a;
    color: #94a3b8;
}
[data-mode="dark"] .mode-toggle-btn:hover {
    background: #1e293b;
    color: #cbd5e1;
}
[data-mode="dark"] .mode-toggle-btn .fa-sun {
    color: #fbbf24;
}
[data-mode="dark"] .login-mode-btn {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
    color: #94a3b8 !important;
}
[data-mode="dark"] .login-mode-btn:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #cbd5e1 !important;
}

/* ============================================
   SWEETALERT2
   ============================================ */
.swal-poppins { font-family: 'Poppins', sans-serif !important; border-radius: 16px !important; padding: 28px 24px !important; }
.swal-title { font-family: 'Poppins', sans-serif !important; font-weight: 600 !important; font-size: 18px !important; color: #1e293b !important; }
.swal-text { font-family: 'Poppins', sans-serif !important; font-size: 14px !important; color: #64748b !important; }
.swal-btn-confirm {
    font-family: 'Poppins', sans-serif !important;
    background-color: var(--primary-600) !important; color: #fff !important;
    border: none !important; border-radius: 8px !important; padding: 10px 24px !important;
    font-size: 14px !important; font-weight: 500 !important; cursor: pointer !important;
    transition: background-color 0.2s !important;
}
.swal-btn-confirm:hover { background-color: var(--primary-700) !important; }
.swal-btn-confirm:focus { box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2) !important; }
.swal-btn-cancel {
    font-family: 'Poppins', sans-serif !important;
    background-color: #f1f5f9 !important; color: #475569 !important;
    border: 1px solid #e2e8f0 !important; border-radius: 8px !important;
    padding: 10px 24px !important; font-size: 14px !important; font-weight: 500 !important;
    cursor: pointer !important; transition: background-color 0.2s !important;
}
.swal-btn-cancel:hover { background-color: #e2e8f0 !important; }
.swal2-actions {
    gap: 16px !important;
}
.swal2-popup:not(.swal2-toast) .swal2-icon {
    margin: 0 auto 16px !important;
    width: 56px !important;
    height: 56px !important;
}
.swal2-toast {
    border-radius: 10px !important;
    padding: 12px 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}
.swal2-toast .swal2-icon {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    border-width: 2px !important;
}
.swal2-toast .swal2-icon .swal2-success-line-tip {
    top: 17px !important;
    left: 4px !important;
    width: 8px !important;
}
.swal2-toast .swal2-icon .swal2-success-line-long {
    top: 14px !important;
    right: 3px !important;
    width: 14px !important;
}
.swal2-toast .swal2-icon .swal2-success-ring {
    width: 28px !important;
    height: 28px !important;
}
.swal2-toast .swal2-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    margin: 0 0 0 10px !important;
}

/* Print */
@media print {
    aside, header, footer, .no-print, .sidebar-aside, #sidebar-overlay,
    .modal-overlay, .btn, button, .theme-picker, .mode-toggle-btn,
    #expand-sidebar-btn, [onclick*="openModal"], [onclick*="toggle"],
    .flex.gap-2, .flex.items-center.gap-2, .stat-card:has(.fa-exclamation),
    .stat-card:has(.fa-check-circle), form[onsubmit*="confirmDelete"] {
        display: none !important;
    }
    body, #main-wrapper, main { 
        margin: 0 !important; 
        padding: 0 !important; 
        background: white !important;
    }
    .stat-card { 
        break-inside: avoid; 
        page-break-inside: avoid;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
    }
    .steps-table { 
        font-size: 12px !important; 
        border: 1px solid #e2e8f0 !important;
    }
    .steps-table th, .steps-table td {
        padding: 8px !important;
        border: 1px solid #e2e8f0 !important;
    }
    h2, h3 { 
        font-size: 16px !important; 
        color: #000 !important;
    }
    .badge { 
        border: 1px solid currentColor !important;
        background: transparent !important;
    }
    a { text-decoration: none !important; color: inherit !important; }
}

/* Online/Offline Indicator */
#online-indicator {
    transition: all 0.3s ease;
}
#online-indicator.online {
    background-color: #f0fdf4;
    border-color: #dcfce7;
}
#online-indicator.offline {
    background-color: #fef2f2;
    border-color: #fee2e2;
}
#online-indicator.online .status-dot {
    background-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}
#online-indicator.offline .status-dot {
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
    animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
#online-indicator.offline #online-status-text {
    color: #dc2626;
}

/* Login page */
.login-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.login-bg {
    position: absolute; inset: 0; z-index: 0;
    background: url('../img/steps.jpeg') center/cover no-repeat;
}
.login-card {
    position: relative; z-index: 1;
    background: rgba(255, 255, 255, 0.45); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 20px;
    padding: 48px; width: 100%; max-width: 420px;
    box-shadow: 0 30px 60px -18px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.15);
    animation: loginCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-card .text-gray-900 { color: #0f172a !important; }
.login-card .text-gray-500 { color: #64748b !important; }
.login-card .text-gray-400 { color: #94a3b8 !important; }
.login-logo-wrap {
    display: inline-block;
    transition: transform 0.35s ease;
    animation: logoReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-logo-wrap:hover {
    transform: scale(1.04);
}
.login-logo-img {
    display: block;
    width: 100px;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2)) drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15)) drop-shadow(0 0 24px rgba(var(--primary-rgb), 0.2));
    transition: filter 0.3s ease;
}
.login-logo-wrap:hover .login-logo-img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)) drop-shadow(0 8px 28px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 32px rgba(var(--primary-rgb), 0.35));
}
@keyframes logoReveal {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
[data-mode="dark"] .login-logo-img {
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4)) drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 28px rgba(var(--primary-rgb), 0.25));
}
[data-mode="dark"] .login-logo-wrap:hover .login-logo-img {
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 36px rgba(var(--primary-rgb), 0.4));
}
.login-card .form-input { background: rgba(255, 255, 255, 0.9); border-color: rgba(226, 232, 240, 0.9); }
.login-card .form-input:focus { background: white; }

[data-mode="dark"] .login-bg {
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)), url('../img/steps.jpeg') center/cover no-repeat !important;
}
[data-mode="dark"] .login-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.6);
    box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(51, 65, 85, 0.5);
}
[data-mode="dark"] .login-card .text-gray-900 {
    color: #cbd5e1 !important;
}
[data-mode="dark"] .login-card .text-gray-500 {
    color: #94a3b8 !important;
}
[data-mode="dark"] .login-card .text-gray-400 {
    color: #64748b !important;
}
[data-mode="dark"] .login-card .form-input {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
}
[data-mode="dark"] .login-card .form-input::placeholder {
    color: #64748b;
}
