/* Cards */
.card {
    background-color: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed);
}

.card:hover {
    transform: translateY(-2px);
}

/* Table containers must NEVER have borders or edges on the sides */
#cpListView,
#cpListView.card,
#cpListView .card,
.card-themed-panel,
.table-card,
.data-table-container,
.table-responsive,
.table-container {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
}

#cpListView:hover,
#cpListView.card:hover,
#cpListView .card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 1px solid transparent;
    text-decoration: none !important;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn i {
    color: inherit !important;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light) !important;
}

.btn-secondary:hover {
    background-color: var(--border-color);
    color: #ffffff !important;
}

.btn-success {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff !important;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-outline-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444 !important;
}

.btn-outline-danger:hover {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff !important;
}

.btn-outline-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b !important;
}

.btn-outline-warning:hover {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff !important;
}

.btn-smart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-light) !important;
    min-width: 120px;
}

.btn-smart:last-child {
    border-right: none;
}

.btn-smart:hover {
    background-color: rgba(255,255,255,0.05);
}

.btn-smart i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.btn-smart span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-smart strong {
    font-size: 0.9rem;
}

.btn-danger {
    background-color: var(--danger);
    color: #fff !important;
}

.btn-danger:hover {
    background-color: #dc2626;
    color: #fff !important;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-danger { background-color: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-primary { background-color: rgba(249, 115, 22, 0.2); color: var(--primary); }
.badge-secondary { background-color: rgba(255, 255, 255, 0.1); color: var(--text-light); }
.badge-info { background-color: rgba(56, 189, 248, 0.2); color: #38bdf8; }

/* Novex-style Control Panel & Switcher Styles */
.novex-control-panel {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-panel);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body:has(.form-panel:not(.d-none)) .novex-control-panel,
body:has(.form-panel:not(.d-none)) .control-panel,
body.form-panel-active .novex-control-panel,
body.form-panel-active .control-panel {
    display: none !important;
}

/* Status Counters Grid Row */
.status-counters-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}
.status-counter-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-dark);
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    min-width: 0;
    box-sizing: border-box;
}
.status-counter-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.novex-cp-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.novex-cp-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.cp-title-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Car Wash Stage Pipeline 4-Column Grid (Full Width, No Gap on Right) */
.carwash-kanban-pipeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.kanban-stage-column {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.novex-cp-right {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    box-sizing: border-box;
}
.novex-breadcrumb {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
}
.novex-search-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    flex: 1 1 auto;
    min-width: 0;
}
.novex-search-input {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 16px 0 38px !important;
    border-radius: 20px !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--bg-dark) !important;
    color: var(--text-light) !important;
    font-size: 0.9rem !important;
    line-height: 36px !important;
    transition: border-color 0.2s ease, background-color 0.2s ease !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
}
.novex-search-input:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: none !important;
}
.novex-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
}
.novex-view-switchers {
    display: flex;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}
.novex-view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.novex-view-btn:hover {
    color: var(--text-light);
    background: rgba(255,255,255,0.05);
}
.novex-view-btn.active {
    color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

/* ── Unified System-Wide Stat Cards System ── */
.smart-cards-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 14px !important;
    width: 100% !important;
    margin-bottom: 24px !important;
}

.stat-card,
.top-stat-card,
.metric-card {
    flex: 1 1 0px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 12px 16px !important;
    background: var(--bg-panel, #ffffff) !important;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08)) !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06) !important;
    min-height: 64px !important;
}

.stat-card:hover,
.top-stat-card:hover,
.metric-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.2) !important;
    border-color: var(--primary, #f97316) !important;
    text-decoration: none !important;
}

.stat-card .stat-title,
.top-stat-card .stat-title,
.metric-card .metric-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: var(--text-muted, #64748b) !important;
    margin-bottom: 3px !important;
}

.stat-card .stat-val,
.top-stat-card .stat-val,
.metric-card .metric-value {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: var(--primary, #f97316) !important;
}

/* Global Card Header & Table Edge Padding Safeguards */
.card-header {
    padding: 16px 20px !important;
    background: var(--bg-card, #f8fafc) !important;
    border-bottom: 1px solid var(--border-color, #e2e8f0) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.card-header .card-title,
.card-header h3,
.card-header h4,
.card-header h5 {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--text-color) !important;
}

.table th:first-child,
.table td:first-child {
    padding-left: 20px !important;
}

.table th:last-child,
.table td:last-child {
    padding-right: 20px !important;
}

/* Kanban Cards Grid */
.kanban-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.kanban-card {
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kanban-card-title {
    font-weight: 600;
    color: var(--text-light);
    font-size: 1.15rem;
    margin: 0;
}

.kanban-card-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-card-subtitle i {
    color: var(--primary);
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
    margin-top: auto;
}

.kanban-card-stat {
    font-weight: bold;
    color: var(--warning);
    font-size: 1.1rem;
}

.kanban-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Smart Buttons (Novex-style) */
.btn-smart-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none !important;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-smart-action:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-smart-action i {
    font-size: 1.4rem;
}

.btn-smart-action .btn-smart-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-smart-action .btn-smart-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.btn-smart-action .btn-smart-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.btn-smart-action.primary-theme .btn-smart-value {
    color: var(--primary);
}

.btn-smart-action.success-theme .btn-smart-value {
    color: var(--success);
}


/* Password Toggle Component */
.password-group {
    position: relative;
    display: block;
}
.password-group input {
    padding-right: 40px !important;
}
.password-group .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px;
    z-index: 10;
    transition: color 0.2s;
}
.password-group .toggle-password:hover {
    color: var(--text-light);
}

/* Custom Modal System */
.modal-overlay,
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay.active,
.modal-overlay.show,
.custom-modal.active,
.custom-modal.show {
    display: flex !important;
}

.modal-card,
.custom-modal-content {
    background: var(--bg-panel, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    color: var(--text-color, #0f172a);
    margin: auto;
}

.modal-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card, #f8fafc);
}

.modal-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary, #ea580c);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted, #64748b);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.modal-close-btn:hover {
    color: var(--danger, #ef4444);
}

.modal-card-body {
    padding: 24px;
    display: grid;
    gap: 18px;
    background: var(--bg-panel, #ffffff);
    color: var(--text-color, #0f172a);
}

.modal-form-label,
.modal-card-body label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--text-color, #0f172a);
}

.modal-custom-input,
.modal-card-body .form-control:not(.ts-wrapper),
.modal-card-body select,
.modal-card-body textarea,
.modal-card-body input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--bg-panel, #ffffff) !important;
    border: 1px solid var(--border-color, #cbd5e1) !important;
    color: var(--text-color, #0f172a) !important;
    font-size: 0.9rem;
}
.modal-card-body .form-control:focus,
.modal-card-body select:focus,
.modal-card-body textarea:focus,
.modal-card-body input:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: var(--primary, #ea580c) !important;
    outline: none !important;
    box-shadow: none !important;
}

.modal-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-card, #f8fafc);
}

/* Light Theme Explicit Modal Rules */
[data-theme="light"] .modal-card,
[data-theme="light"] .custom-modal-content,
[data-theme="light"] .modal-card-body {
    background-color: #ffffff !important;
    color: #0f172a !important;
}
[data-theme="light"] .modal-card-header,
[data-theme="light"] .modal-card-footer {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
[data-theme="light"] .modal-card-title {
    color: #ea580c !important;
}
[data-theme="light"] .modal-form-label,
[data-theme="light"] .modal-card-body label {
    color: #0f172a !important;
}
[data-theme="light"] .modal-custom-input,
[data-theme="light"] .modal-card-body input:not([type="checkbox"]):not([type="radio"]),
[data-theme="light"] .modal-card-body select,
[data-theme="light"] .modal-card-body textarea {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Dark Theme Explicit Modal Rules */
[data-theme="dark"] .modal-card,
[data-theme="dark"] .custom-modal-content,
[data-theme="dark"] .modal-card-body {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
[data-theme="dark"] .modal-card-header,
[data-theme="dark"] .modal-card-footer {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .modal-card-title {
    color: #f97316 !important;
}
[data-theme="dark"] .modal-form-label,
[data-theme="dark"] .modal-card-body label {
    color: #f8fafc !important;
}
/* Global Modal Scroll Lock */
body.modal-open {
    overflow: hidden !important;
    touch-action: none;
}

/* TomSelect Theme Adaptive Styling */
.ts-wrapper,
.ts-wrapper.form-select,
.ts-wrapper.form-control,
.ts-wrapper.single,
.ts-wrapper.multi,
div.ts-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    background-image: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}
.ts-control,
.ts-wrapper .ts-control,
.ts-wrapper.form-control .ts-control,
.ts-wrapper.form-select .ts-control,
div.ts-control {
    background-color: var(--bg-panel, var(--bg-card, #1e293b)) !important;
    border: 1px solid var(--border-color, #334155) !important;
    color: var(--text-color, var(--text-light, #f8fafc)) !important;
    border-radius: 8px !important;
    padding: 0 28px 0 12px !important;
    margin: 0 !important;
    width: 100% !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.ts-wrapper.focus .ts-control {
    border-color: var(--primary, #F97316) !important;
    outline: none !important;
    box-shadow: none !important;
}
.ts-wrapper .ts-control input,
.ts-wrapper .ts-control .item {
    color: var(--text-color, var(--text-light, #f8fafc)) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 36px !important;
    display: inline-block !important;
}
.ts-wrapper .ts-dropdown {
    background-color: var(--bg-panel, var(--bg-card, #1e293b)) !important;
    border: 1px solid var(--border-color, #334155) !important;
    color: var(--text-color, var(--text-light, #f8fafc)) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    z-index: 999999 !important;
    width: auto !important;
    min-width: 100% !important;
    max-width: 320px !important;
    padding: 4px !important;
}
.ts-wrapper .ts-dropdown .option {
    color: var(--text-color, var(--text-light, #f8fafc)) !important;
    padding: 7px 12px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 6px !important;
}
.ts-wrapper .ts-dropdown .option.active, .ts-wrapper .ts-dropdown .option:hover {
    background-color: var(--primary, #F97316) !important;
    color: #ffffff !important;
}
.ts-wrapper .ts-dropdown .option.selected {
    background-color: rgba(249, 115, 22, 0.25) !important;
    color: var(--primary, #F97316) !important;
}

/* PWA Floating App Install Prompt Styling */
#pwaInstallPrompt {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: 99998;
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #E2E8F0;
    border-radius: 30px;
    padding: 10px 20px 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(249, 115, 22, 0.25);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    font-family: 'Inter', system-ui, sans-serif;
}

[data-theme="light"] #pwaInstallPrompt {
    background: #FFFFFF !important;
    border-color: rgba(249, 115, 22, 0.3) !important;
    color: #0F172A !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.15), 0 0 15px rgba(249, 115, 22, 0.15);
}

#pwaInstallPrompt.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-app-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.pwa-install-title {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.2;
}

.pwa-install-subtitle {
    font-size: 0.75rem;
    color: #94A3B8;
}

.pwa-install-btn {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pwa-install-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
}

.pwa-close-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.pwa-close-btn:hover {
    color: #F97316;
}

/* Alert Components */
.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius, 8px);
    margin-bottom: 20px;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger, #EF4444);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--success, #10B981);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--warning, #F59E0B);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #3B82F6;
}

/* Auth Modal Styles */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal-dialog {
    background: var(--bg-panel, #1E293B);
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.auth-modal-overlay.show .auth-modal-dialog {
    transform: translateY(0) scale(1);
}

.auth-modal-dialog.register-dialog {
    max-width: 640px;
}

[data-theme="light"] .auth-modal-dialog {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15) !important;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-muted, #94A3B8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 10;
    transition: all 0.2s ease;
}

[data-theme="light"] .auth-modal-close {
    background: #F1F5F9 !important;
    color: #64748B !important;
}

.auth-modal-close:hover {
    background: var(--primary, #F97316) !important;
    color: #FFFFFF !important;
}

.auth-modal-body {
    padding: 32px 30px;
    overflow-y: auto;
    flex: 1;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 22px;
}

.auth-modal-header img,
.auth-modal-logo-img {
    height: 58px;
    max-height: 65px;
    width: auto;
    margin-bottom: 12px;
    object-fit: contain;
}

.auth-modal-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color, var(--text-light, #E2E8F0));
    margin-bottom: 4px;
}

.auth-modal-header p {
    color: var(--text-muted, #94A3B8);
    font-size: 0.92rem;
}

.auth-modal-body .form-group {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    margin-bottom: 14px;
}

.auth-modal-body .form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-color, var(--text-light, #E2E8F0));
}

.auth-modal-body .form-control:not(.ts-wrapper) {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    min-height: 44px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    background-color: var(--bg-card, #0F172A) !important;
    border: 1px solid var(--border-color, #334155) !important;
    color: var(--text-light, #E2E8F0) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.auth-modal-body .ts-wrapper,
.auth-modal-body .ts-wrapper.form-control {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
    width: 100% !important;
}

.auth-modal-body .ts-control {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    min-height: 44px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    background-color: var(--bg-card, #0F172A) !important;
    border: 1px solid var(--border-color, #334155) !important;
    color: var(--text-light, #E2E8F0) !important;
}

[data-theme="light"] .auth-modal-body .ts-control,
[data-theme="light"] .auth-modal-body .form-control {
    background-color: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    color: #0F172A !important;
}

.auth-modal-body .form-control:focus {
    outline: none !important;
    border-color: var(--primary, #F97316) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2) !important;
}

.register-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 18px;
    width: 100%;
}

.grid-header {
    grid-column: span 2;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary, #F97316);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
    padding-bottom: 6px;
}

.grid-full {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .register-grid {
        grid-template-columns: 1fr;
    }
    .grid-header, .grid-full {
        grid-column: span 1;
    }
    .auth-modal-body {
        padding: 24px 20px;
    }
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px;
    background: #ffffff;
    color: #1f2937 !important;
    border-radius: var(--border-radius, 8px);
    font-weight: 700;
    text-decoration: none !important;
    font-size: 0.95rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease;
}

.btn-google:hover {
    background: #f9fafb;
    color: #111827 !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px 0;
    color: var(--text-muted, #94A3B8);
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.12);
}

.auth-divider-text {
    padding: 0 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-wrapper,
.password-field-wrapper,
.password-group {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

.password-wrapper .form-control,
.password-field-wrapper .form-control,
.password-group .form-control,
.password-wrapper input[type="password"],
.password-wrapper input[type="text"],
.password-field-wrapper input[type="password"],
.password-field-wrapper input[type="text"] {
    width: 100% !important;
    padding-right: 42px !important;
    box-sizing: border-box !important;
}

.password-eye-toggle,
.password-toggle-btn,
.toggle-password {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-muted, #94a3b8) !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    z-index: 5 !important;
    transition: color 0.2s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.password-eye-toggle:hover,
.password-toggle-btn:hover,
.toggle-password:hover {
    color: var(--primary, #f97316) !important;
    background: transparent !important;
}

.password-eye-toggle:focus,
.password-toggle-btn:focus,
.toggle-password:focus {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.password-eye-toggle i,
.password-toggle-btn i,
.toggle-password i {
    pointer-events: none;
    font-size: 0.95rem;
}

.auth-step-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.auth-step-badge-active {
    background: var(--primary, #F97316);
    color: #ffffff;
}

.auth-step-badge-inactive {
    background: rgba(255,255,255,0.08);
    color: var(--text-muted, #94A3B8);
}

.auth-step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.auth-step-icon-active {
    background: rgba(255,255,255,0.25);
}

.auth-step-icon-inactive {
    background: rgba(255,255,255,0.15);
}

.auth-step-line {
    width: 35px;
    height: 2px;
    background: var(--border-color, rgba(255,255,255,0.15));
    transition: all 0.3s ease;
}

/* Chatter Component Styles */
.chatter-card {
    border-radius: 12px;
    overflow: hidden;
}

.chatter-header {
    background: var(--bg-card, #1e293b);
}

.chatter-note-composer {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.chatter-container {
    border-left: 2px solid var(--border-color);
    margin-left: 15px;
    padding-left: 25px;
    margin-top: 10px;
}

.chatter-log-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.chatter-avatar-wrap {
    position: absolute;
    left: -43px;
    top: 0;
    background: var(--bg-panel, #1e293b);
    padding: 4px;
}

.chatter-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary, #f97316);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.chatter-log-content {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color, rgba(255,255,255,0.05));
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.chatter-log-details {
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Quick Communication Modal Components */
.comm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.comm-modal-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    color: var(--text-color, #f8fafc);
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.comm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #334155);
    background: rgba(255,255,255,0.02);
}

.comm-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.comm-tab-inactive {
    border: 1px solid var(--border-color, #334155);
    background: var(--bg-dark, #0f172a);
    color: var(--text-muted, #94a3b8);
}

.comm-tab-active-sms {
    border: 1px solid #0ea5e9;
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

.comm-tab-active-wa {
    border: 1px solid #10b981;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.comm-tab-active-email {
    border: 1px solid #f97316;
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.btn-ai-magic {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(168, 85, 247, 0.25);
}

.ai-quick-writer-box {
    display: none;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

/* Floating AI Assistant Chatbot Component Styles */
#aiChatbotLauncher {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 99990;
}

#aiChatbotLauncher button {
    position: relative;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px -3px rgba(234, 88, 12, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#aiChatbotLauncher button:hover {
    transform: scale(1.1);
}

.ai-launcher-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background: #10B981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

#aiChatbotWindow {
    position: fixed;
    bottom: 74px;
    right: 18px;
    width: 380px;
    max-width: calc(100vw - 30px);
    height: 520px;
    max-height: calc(100vh - 90px);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-color, #0f172a);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    z-index: 99991;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.ai-chatbot-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-dark, #f8fafc);
    font-size: 0.88rem;
    scroll-behavior: smooth;
}

[data-theme="light"] .ai-chatbot-messages {
    background: #f8fafc !important;
}

[data-theme="dark"] .ai-chatbot-messages {
    background: #0f172a !important;
}

.ai-msg-bubble {
    padding: 12px 14px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    border-radius: 12px;
}

.ai-msg-bubble.assistant {
    align-self: flex-start;
    max-width: 90%;
    background: var(--bg-card, #ffffff) !important;
    color: var(--text-color, #0f172a) !important;
    border: 1px solid var(--border-color, #cbd5e1) !important;
    border-radius: 12px 12px 12px 2px;
}

[data-theme="light"] .ai-msg-bubble.assistant {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="dark"] .ai-msg-bubble.assistant {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
}

.ai-msg-bubble.user {
    align-self: flex-end;
    max-width: 85%;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%) !important;
    color: #ffffff !important;
    border-radius: 12px 12px 2px 12px;
}

#aiChatbotInput {
    color: var(--text-color, #0f172a) !important;
    background: var(--bg-card, #ffffff) !important;
    border: 1px solid var(--border-color, #cbd5e1) !important;
}

#aiChatbotInput::placeholder {
    color: var(--text-muted, #64748b) !important;
    opacity: 0.85;
}

.ai-chatbot-footer {
    padding: 12px;
    background: var(--bg-card, #ffffff);
    border-top: 1px solid var(--border-color, #e2e8f0);
}

[data-theme="light"] .ai-chatbot-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
}

[data-theme="dark"] .ai-chatbot-footer {
    background: #1e293b !important;
    border-top: 1px solid #334155 !important;
}

.ai-chip-orange {
    background: rgba(249,115,22,0.12);
    border: 1px solid rgba(249,115,22,0.35);
    color: #EA580C;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.ai-chip-red {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.35);
    color: #EF4444;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.ai-chip-amber {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.35);
    color: #D97706;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.ai-chip-blue {
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.35);
    color: #2563EB;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

/* Public Floating AI Chatbot - Left Side Theme */
#publicAiChatbotLauncher {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99995;
}

#publicAiChatbotLauncher button {
    position: relative;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -3px rgba(249, 115, 22, 0.5);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

#publicAiChatbotLauncher button:hover {
    transform: scale(1.1);
    box-shadow: 0 14px 30px -2px rgba(249, 115, 22, 0.65);
}

.public-ai-pulse-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid #F97316;
    animation: publicAiPulse 2s infinite ease-out;
    pointer-events: none;
}

@keyframes publicAiPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

.public-ai-online-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #10B981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

#publicAiChatbotWindow {
    position: fixed;
    bottom: 84px;
    left: 24px;
    width: 390px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 100px);
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
    border-radius: 20px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.5);
    z-index: 99996;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] #publicAiChatbotWindow {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    color: #0F172A !important;
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.15);
}

.public-ai-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-ai-msg-container {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #0F172A;
    font-size: 0.9rem;
    scroll-behavior: smooth;
}

[data-theme="light"] .public-ai-msg-container {
    background: #F8FAFC !important;
}

.public-ai-msg {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.55;
    word-break: break-word;
    font-size: 0.9rem;
}

.public-ai-msg.assistant {
    align-self: flex-start;
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
    border-top-left-radius: 4px;
}

[data-theme="light"] .public-ai-msg.assistant {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    color: #0F172A !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.public-ai-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #ffffff;
    border-top-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.public-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.public-ai-chip {
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #F97316;
    border-radius: 20px;
    padding: 6px 13px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="light"] .public-ai-chip {
    color: #EA580C;
}

.public-ai-chip:hover {
    background: #F97316;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.public-ai-footer {
    padding: 14px 16px;
    background: #1E293B;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .public-ai-footer {
    background: #FFFFFF !important;
    border-top-color: #E2E8F0 !important;
}

#publicAiInput {
    flex: 1;
    background: #0F172A;
    color: #F8FAFC !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

[data-theme="light"] #publicAiInput {
    background: #F8FAFC !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
}

#publicAiInput:focus {
    border-color: #F97316 !important;
}

.public-ai-typing {
    display: none;
    padding: 8px 18px;
    font-size: 0.8rem;
    color: #F97316;
    background: transparent;
    font-weight: 600;
}

/* Global Notification Alert Modal Component */
.global-alert-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.global-alert-modal-box {
    max-width: 480px;
    width: 90%;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card, #1e293b);
    color: var(--text-color, #ffffff);
    border: 1px solid var(--border-color, #334155);
}

.global-alert-close-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color, #334155);
    color: var(--text-muted, #94a3b8);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.global-alert-close-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
}

/* Parallax Section Component Styles */
.parallax-outer-box {
    position: relative;
    overflow: hidden;
    padding: 130px 24px;
    text-align: center;
    color: #FFFFFF;
    margin: 40px 0;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.parallax-effect-fixed {
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.parallax-effect-fixed .parallax-layer-bg {
    display: none !important;
}

.parallax-effect-none {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.parallax-effect-none .parallax-layer-bg {
    display: none !important;
}

.parallax-effect-standard .parallax-layer-bg,
.parallax-effect-zoom_in .parallax-layer-bg,
.parallax-effect-zoom_out .parallax-layer-bg {
    display: block !important;
    position: absolute;
    top: -25%;
    left: 0;
    width: 100%;
    height: 150%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    will-change: transform;
    transition: transform 0.08s ease-out;
}

.parallax-layer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.parallax-content-box {
    position: relative;
    z-index: 3;
    max-width: 920px;
    margin: 0 auto;
}

.parallax-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 22px;
    line-height: 1.25;
    color: #FFFFFF !important;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
    letter-spacing: -0.5px;
}

.parallax-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92) !important;
    margin-bottom: 38px;
    line-height: 1.65;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.parallax-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    background: var(--primary, #F97316);
    color: #FFFFFF !important;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.parallax-cta-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.6);
    color: #FFFFFF !important;
}

@media (max-width: 768px) {
    .parallax-outer-box {
        padding: 80px 18px;
    }
    .parallax-title {
        font-size: 1.95rem;
    }
    .parallax-subtitle {
        font-size: 1.05rem;
    }
}

/* Farm Management Offline Engine Banner */
.farm-offline-banner {
    display: none;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(16,185,129,0.25);
}

.btn-sync-cloud {
    font-weight: 700 !important;
    color: #059669 !important;
    border-radius: 16px !important;
    padding: 4px 14px !important;
    font-size: 0.85rem !important;
}

/* Kanban Board & Task Tag Badges */
.kanban-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
}

.kanban-lane {
    flex: 1;
    min-width: 280px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}

.kanban-lane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.kanban-drop-zone {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
}

.kanban-card {
    background: var(--bg-panel, #1e293b);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.kanban-card-body {
    padding: 12px;
}

.badge-tag-blue {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.pill-filter-btn {
    border-radius: 20px !important;
}

/* Auth Modal Grid & Form Helpers */
.auth-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

.auth-btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1.05rem;
    border-radius: var(--border-radius, 8px);
    font-weight: 700;
    margin-top: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249,115,22,0.35);
}

.auth-btn-back {
    flex: 1;
    justify-content: center;
    padding: 12px;
    border-radius: var(--border-radius, 8px);
    font-weight: 600;
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    color: var(--text-light, #E2E8F0);
}

.auth-btn-submit {
    flex: 2;
    justify-content: center;
    padding: 12px;
    font-size: 1.05rem;
    border-radius: var(--border-radius, 8px);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249,115,22,0.35);
}

.step-num-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* WhatsApp Floating Widget Components */
.whatsapp-float-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: #ffffff !important;
    font-size: 30px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.08);
}

.whatsapp-dropdown {
    display: none;
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 280px;
    background-color: var(--bg-panel, #1E293B);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    overflow: hidden;
}

.whatsapp-header {
    background-color: #25D366;
    padding: 15px;
    color: #ffffff;
    text-align: left;
}

.whatsapp-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-light, #E2E8F0);
    text-decoration: none;
    transition: background 0.2s ease;
}

.whatsapp-item:hover {
    background: rgba(255,255,255,0.05);
}

.whatsapp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #25D366;
    margin-right: 15px;
}

/* Error Page & Maintenance Page Styles */
.error-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-dark);
    text-align: center;
    padding: 20px;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.error-message {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn-home {
    padding: 12px 25px;
    background-color: var(--primary);
    color: #fff;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn-home:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.maintenance-card {
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 45px 35px;
    max-width: 620px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.maint-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid #F97316;
    color: #F97316;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.maint-icon {
    font-size: 4rem;
    color: #F97316;
    margin-bottom: 20px;
}

.maint-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.maint-desc {
    color: #94A3B8;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
}

.countdown-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    min-width: 85px;
}

.countdown-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #F97316;
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    color: #94A3B8;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 6px;
}

.admin-login-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s;
}

.admin-login-link:hover {
    color: #F97316;
}

[data-theme="dark"] .modal-custom-input,
[data-theme="dark"] .modal-card-body input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] .modal-card-body select,
[data-theme="dark"] .modal-card-body textarea {
    background-color: #0b1120 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* Impersonation Banner */
.impersonation-bar {
    background: linear-gradient(90deg, #EA580C, #F97316);
    color: #fff;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10001;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.btn-exit-impersonation {
    background: #fff;
    color: #EA580C;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-exit-impersonation:hover {
    background: #fff;
    color: #c2410c;
}

/* Topbar Sticky Wrapper & Dropdown Components */
.topbar-sticky {
    position: sticky;
    z-index: 10000;
}

.header-attendance-btn {
    cursor: pointer;
    height: 34px;
    padding: 0 12px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.06);
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    color: var(--text-color, #ffffff);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.header-att-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    transition: all 0.3s ease;
}

.header-att-dot.att-dot-in {
    background: #10b981 !important;
    box-shadow: 0 0 10px #10b981, 0 0 4px #10b981 !important;
}

.header-att-dot.att-dot-out {
    background: #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5) !important;
}

.attendance-card-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-panel, #1e293b);
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    border-radius: 12px;
    width: 290px;
    z-index: 1000;
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
    margin-top: 10px;
    overflow: hidden;
    padding: 0;
    font-size: 0.85rem;
}

[data-theme="light"] .attendance-card-menu {
    background: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12) !important;
}

.attendance-card-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
    background: rgba(0,0,0,0.06);
}

.attendance-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.btn-shadow-success {
    box-shadow: 0 4px 12px rgba(16,185,129,0.3) !important;
}

.btn-shadow-danger {
    box-shadow: 0 4px 12px rgba(239,68,68,0.3) !important;
}

.ai-assistant-toggle {
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(249,115,22,0.15) 0%, rgba(234,88,12,0.15) 100%);
    border: 1px solid rgba(249,115,22,0.4);
    color: #F97316;
    transition: all 0.2s ease;
}

.pwa-install-header-btn {
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #F97316;
    transition: all 0.2s ease;
}

.theme-toggle {
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    transition: all 0.2s ease;
}

.notifications {
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light, #FFFFFF);
    transition: color 0.2s ease, transform 0.15s ease;
    position: relative;
    font-size: 1.25rem;
    padding: 6px;
    box-shadow: none !important;
}

.notifications:hover {
    background: transparent !important;
    color: var(--primary, #F97316);
    transform: scale(1.05);
}

.notifications-badge {
    position: absolute !important;
    top: -2px !important;
    right: -4px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    border-radius: 999px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    line-height: 17px !important;
    background-color: #EF4444 !important;
    color: #FFFFFF !important;
    border: none !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45) !important;
    z-index: 2 !important;
}

[data-theme="light"] .notifications {
    background: transparent !important;
    border: none !important;
    color: #475569;
}

[data-theme="light"] .notifications:hover {
    background: transparent !important;
    color: #F97316;
}

[data-theme="light"] .notifications-badge {
    border: none !important;
}

.notifications-dropdown-menu {
    position: absolute;
    top: 100%;
    right: -10px;
    background: var(--bg-panel, #1e293b);
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    border-radius: 12px;
    width: 300px;
    max-width: 90vw;
    z-index: 1000;
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
    margin-top: 10px;
    overflow: hidden;
    font-size: 0.85rem;
}

[data-theme="light"] .notifications-dropdown-menu {
    background: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12) !important;
}

.profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-panel, #1e293b);
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    border-radius: 10px;
    min-width: 225px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    margin-top: 10px;
    overflow: hidden;
    font-size: 0.85rem;
}

[data-theme="light"] .profile-dropdown-menu {
    background: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12) !important;
}

.profile-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
    background: rgba(0,0,0,0.06);
}

.profile-menu-item {
    display: block;
    padding: 9px 16px;
    color: var(--text-light, #0f172a);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.05));
    font-size: 0.85rem;
}

.profile-menu-item.d-flex {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
}

.profile-menu-item:hover {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--primary);
}

.profile-menu-item-danger {
    display: block;
    padding: 9px 16px;
    color: var(--danger, #ef4444);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-menu-item-danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Light Theme Button Overrides & Filter Pills */
[data-theme="light"] .btn-secondary {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

[data-theme="light"] .btn-secondary:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .btn-outline-secondary {
    background-color: transparent !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

[data-theme="light"] .btn-outline-secondary:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.pill-filter-btn {
    border-radius: 20px !important;
    padding: 4px 14px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

/* Global Dropdown Visibility & Animations */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
    font-size: 0.85rem;
}

.dropdown-menu.show,
.nav-dropdown:hover > .dropdown-menu,
.nav-plus-wrapper:hover > .dropdown-menu,
.topbar-item:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
}

.sidebar-collapsed .sidebar { transform: translateX(-100%); width: 0; overflow: hidden; }
.sidebar-collapsed .main-content { margin-left: 0; }
.sidebar-hidden .sidebar { display: none; }
.sidebar-hidden .main-content { margin-left: 0; }

/* App Launcher Grid System */
.launcher-container {
    min-height: calc(100vh - 70px);
    background: url('../images/launcher-bg.svg') center/cover no-repeat;
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.launcher-search-wrapper {
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
    position: relative;
}
.app-search-input {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 24px !important;
    padding: 0 20px 0 44px !important;
    font-size: 0.95rem !important;
    line-height: 40px !important;
    box-sizing: border-box !important;
    border: 1px solid var(--border-color) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease !important;
}
.app-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted) !important;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}
:root:not([data-theme="light"]) .app-search-input {
    border: 1px solid var(--border-color) !important;
    background: rgba(15, 23, 42, 0.88) !important;
    color: #E2E8F0 !important;
    outline: none !important;
    box-shadow: none !important;
}
:root:not([data-theme="light"]) .app-search-input:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: none !important;
}
:root:not([data-theme="light"]) .app-search-input::placeholder {
    color: #94A3B8 !important;
}
:root:not([data-theme="light"]) .launcher-search-wrapper:focus-within .app-search-icon {
    color: var(--primary) !important;
}
[data-theme="light"] .app-search-input {
    background: #FFFFFF !important;
    border: 1px solid var(--border-color) !important;
    color: #0F172A !important;
    outline: none !important;
    box-shadow: none !important;
}
[data-theme="light"] .app-search-input:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: none !important;
}
[data-theme="light"] .app-search-input::placeholder {
    color: #64748B !important;
}
[data-theme="light"] .launcher-search-wrapper:focus-within .app-search-icon {
    color: var(--primary) !important;
}
.launcher-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 16px;
    max-width: 820px;
    width: 100%;
}
.launcher-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
    padding: 4px;
}
.launcher-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}
:root:not([data-theme="light"]) .launcher-icon-wrapper {
    background-color: #1E293B !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}
:root:not([data-theme="light"]) .launcher-item:hover .launcher-icon-wrapper {
    border-color: var(--primary) !important;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3) !important;
    transform: translateY(-3px);
}
[data-theme="light"] .launcher-icon-wrapper {
    background-color: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
}
[data-theme="light"] .launcher-item:hover .launcher-icon-wrapper {
    border-color: var(--primary) !important;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.2) !important;
    transform: translateY(-3px);
}
[data-theme="light"] .launcher-item span {
    color: #0F172A !important;
    text-shadow: none !important;
}
.launcher-icon-wrapper i {
    font-size: 1.65rem;
}
.launcher-item span {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.25;
    max-width: 95px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.launcher-item:nth-child(odd) .launcher-icon-wrapper i {
    color: var(--primary) !important;
}
:root:not([data-theme="light"]) .launcher-item:nth-child(even) .launcher-icon-wrapper i {
    color: #FFFFFF !important;
}
[data-theme="light"] .launcher-item:nth-child(even) .launcher-icon-wrapper i {
    color: #0F172A !important;
}
.launcher-item:hover {
    transform: translateY(-3px);
}
@media (max-width: 900px) {
    .launcher-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 18px 14px !important;
    }
}
@media (max-width: 640px) {
    .launcher-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px 10px !important;
    }
    .launcher-icon-wrapper {
        width: 52px !important;
        height: 52px !important;
        border-radius: 14px !important;
        margin-bottom: 6px !important;
    }
    .launcher-icon-wrapper i {
        font-size: 1.35rem !important;
    }
    .launcher-item span {
        font-size: 0.75rem !important;
        max-width: 80px;
    }
}
@media (max-width: 400px) {
    .launcher-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px 8px !important;
    }
}

/* Odoo Status Ribbon Styling */
.odoo-status-chevron {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 4px;
    overflow: hidden;
}
.chevron-step {
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    background: transparent;
    position: relative;
    border-right: 1px solid var(--border-color, rgba(255,255,255,0.12));
}
.chevron-step:last-child {
    border-right: none;
}
.chevron-step.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.btn-purple {
    background-color: #714b67;
    color: #ffffff;
    border: none;
}
.btn-purple:hover {
    background-color: #5d3d55;
    color: #ffffff;
}

/* ==========================================================================
   GLOBAL SAAS & BILLING PORTAL COMPONENTS
   (Standardized spacing, controls bars, ribbons, chips & pricing cards)
   ========================================================================== */

/* Duration & Filter Controls Card (Global Toolbar) */
.duration-controls-card,
.portal-controls-card {
    background-color: var(--bg-card, rgba(0, 0, 0, 0.2));
    border: 1px solid var(--border-color);
    padding: 14px 22px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    margin-bottom: 35px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.duration-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.duration-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.duration-select {
    width: auto !important;
    min-width: 230px !important;
    max-width: 300px !important;
    height: 42px !important;
    padding: 6px 14px !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: var(--text-light) !important;
    background-color: var(--bg-panel) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    cursor: pointer;
    transition: border-color var(--transition-speed);
}
.duration-select:focus {
    border-color: var(--primary) !important;
    outline: none;
}
.duration-select option {
    background-color: var(--bg-panel);
    color: var(--text-light);
    padding: 8px;
    font-weight: 600;
}

/* Segmented Toggle Control (Cycle Buttons) */
.cycle-group,
.segmented-control-group {
    display: inline-flex;
    background: var(--bg-panel, rgba(0, 0, 0, 0.25));
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    gap: 4px;
}
.cycle-btn,
.segmented-control-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 18px;
    font-size: 0.86rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.cycle-btn:hover,
.segmented-control-btn:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}
.cycle-btn.active,
.segmented-control-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.4);
}

/* Plans Cards Grid */
.plans-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 28px;
    padding-top: 16px !important; /* Ample clearance for top ribbons */
    margin-bottom: 30px;
}

/* Plan Card */
.plan-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.plan-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.16);
}
.plan-card.is-current-plan {
    border: 2px solid var(--primary) !important;
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.05) 0%, var(--bg-panel) 100%);
    box-shadow: 0 8px 28px rgba(249, 115, 22, 0.18) !important;
}

/* Ribbons & Badges */
.current-plan-ribbon {
    position: absolute;
    top: -14px;
    right: 24px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.6px;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.45);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 5;
}

.plan-card-header {
    margin-bottom: 18px;
}
.plan-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-light);
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}
.plan-card-users {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.plan-card-price-box {
    margin: 0 0 24px 0;
    padding: 18px 14px;
    background-color: var(--bg-card, rgba(0, 0, 0, 0.2));
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.price-display {
    font-size: 2.3rem;
    font-weight: 900;
    color: var(--text-light);
    line-height: 1.1;
}
.currency-sign {
    font-size: 1.25rem;
    color: var(--primary);
    vertical-align: super;
    margin-right: 2px;
}
.price-period {
    font-size: 0.84rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 4px;
    font-weight: 700;
}
.multi-year-note {
    font-size: 0.82rem;
    margin-top: 6px;
    font-weight: 700;
}

/* Features & Modules Sections with Safeguard Spacing */
.plan-card-features {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.features-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 22px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.features-title:first-child {
    margin-top: 0 !important;
}

.modules-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px !important;
}
.mod-pill {
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 6px;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.mod-pill:hover {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.08);
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.features-list li {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}
.features-list li i {
    font-size: 0.95rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.plan-card-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.btn-upgrade-action {
    height: 44px;
    font-size: 0.94rem;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==========================================================================
   GLOBAL SWITCH TOGGLE COMPONENT (Dropdowns, Settings, Profile)
   ========================================================================== */
.switch-toggle-sm {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
}
.switch-toggle-sm input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.switch-slider-sm {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color, #475569);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
}
.switch-slider-sm:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.switch-toggle-sm input:checked + .switch-slider-sm {
    background-color: var(--primary, #F97316);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.35);
}
.switch-toggle-sm input:checked + .switch-slider-sm:before {
    transform: translateX(18px);
}
.switch-toggle-sm input:focus + .switch-slider-sm {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
}

/* ==========================================================================
   Universal Top-Right Action Controls (Cloud Save & X Close)
   ========================================================================== */
.top-page-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    z-index: 5;
}

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-decoration: none !important;
    position: relative;
    padding: 0;
    line-height: 1;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Primary Cloud Save / Update Button */
.btn-action-cloud {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.38);
    border: 1px solid rgba(249, 115, 22, 0.5) !important;
}

.btn-action-cloud:hover {
    background: linear-gradient(135deg, #FB923C 0%, #F97316 100%) !important;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.55);
    transform: translateY(-2px);
    color: #FFFFFF !important;
}

.btn-action-cloud:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-action-cloud i {
    color: #FFFFFF !important;
    font-size: 1.2rem;
}

/* Secondary / Ghost X Close Button */
.btn-action-close {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-muted, #94A3B8) !important;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12)) !important;
    backdrop-filter: blur(4px);
}

.btn-action-close:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #EF4444 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

.btn-action-close:active {
    transform: translateY(0);
}

.btn-action-close i {
    color: inherit !important;
    font-size: 1.15rem;
}

/* Light Mode Overrides */
[data-theme="light"] .btn-action-close {
    background: #F1F5F9 !important;
    color: #64748B !important;
    border-color: #CBD5E1 !important;
}

[data-theme="light"] .btn-action-close:hover {
    background: #FEE2E2 !important;
    color: #EF4444 !important;
    border-color: #FCA5A5 !important;
}

/* ==========================================================================
   Full Interactive Calendar View Component
   ========================================================================== */
.cal-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 24px;
}

.cal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.cal-month-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-nav-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-nav-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s, border-color 0.2s;
    outline: none !important;
    box-shadow: none !important;
}

.cal-nav-btn:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: var(--primary);
    color: var(--primary);
}

.cal-nav-btn:active {
    background: rgba(249, 115, 22, 0.2);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.cal-weekday {
    padding: 10px 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.cal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--border-color);
    gap: 1px;
}

.cal-days-grid .cal-day-cell {
    background: var(--bg-card);
    min-height: 115px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    transition: background-color 0.15s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.cal-days-grid .cal-day-cell:hover {
    background: rgba(249, 115, 22, 0.05);
}

.cal-days-grid .cal-day-cell.other-month {
    background: rgba(15, 23, 42, 0.45);
    opacity: 0.4;
}

.cal-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cal-day-num {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cal-day-cell.is-today .cal-day-num {
    background: var(--primary);
    color: #ffffff !important;
    font-weight: 700;
}

.cal-event-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(249, 115, 22, 0.15);
    border-radius: 10px;
    padding: 1px 6px;
}

.cal-events-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    max-height: 85px;
}

.cal-event-chip {
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(249, 115, 22, 0.15);
    border-left: 3px solid var(--primary);
    color: var(--text-light);
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.cal-event-chip:hover {
    background: rgba(249, 115, 22, 0.28);
    transform: translateX(2px);
}

.cal-event-chip-time {
    font-weight: 700;
    color: var(--primary);
    margin-right: 4px;
}

.cal-event-chip-title {
    font-weight: 500;
}

/* Universal Rich Tooltip System */
.dash-info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer !important;
    font-size: 0.92rem;
    transition: color 0.15s ease;
    vertical-align: middle;
}
.dash-info-tip:hover {
    color: var(--primary, #f97316);
}
.dash-info-tip .dash-tooltip-box {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f172a;
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 290px;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}
.dash-info-tip .dash-tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 5px 0 5px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}
.dash-info-tip:hover .dash-tooltip-box {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
[data-theme="dark"] .dash-info-tip .dash-tooltip-box {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .dash-info-tip .dash-tooltip-box::after {
    border-color: #1e293b transparent transparent transparent;
}





