/*
 * XeneBox — Page-Level Styles
 * Page-specific enhancements on top of Metronic demo36 + custom.css
 * Version: 1.0  |  2026-03-12
 */

/* =============================================================================
   1. INLINE TOOLBAR PATTERN
   All pages embed their own toolbar within RenderBody.
   These ensure the toolbar renders cleanly even when not in the layout section.
============================================================================= */

.app-toolbar {
    background-color: var(--kt-app-toolbar-base-bg-color, transparent);
}

.app-toolbar-wrapper {
    width: 100%;
}

/* =============================================================================
   2. DASHBOARD — STAT CARDS
============================================================================= */

/* Dashboard stat cards: add stat-card modifier for hover effects */
.card-flush.h-md-100 {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.card-flush.h-md-100:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .card-flush.h-md-100:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Stat card icon containers */
.w-50px.h-50px.rounded-3 {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Dashboard big numbers */
.fw-bolder.fs-2x {
    line-height: 1;
}

/* Responsive stat card grid */
@media (max-width: 575px) {
    .fw-bolder.fs-2x {
        font-size: 1.75rem !important;
    }
}

/* =============================================================================
   3. DATA TABLES — PAGINATION & EMPTY STATE
============================================================================= */

/* Empty state containers */
.text-center.py-12 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.text-center.py-10 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.text-center.py-8 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Pagination row */
.d-flex.align-items-center.justify-content-between.pt-4 {
    border-top: 1px solid var(--bs-border-color, #eff2f5);
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .d-flex.align-items-center.justify-content-between.pt-4 {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Filter bar card */
.card.card-flush.mb-6 .card-body form .form-label {
    margin-bottom: 0.25rem;
}

/* =============================================================================
   4. JOB LIST — TRADE BADGE WITH COLOUR STRIP
============================================================================= */

/* Trade badge with left border colour strip */
.badge.badge-light[style*="border-left"] {
    display: inline-flex;
    align-items: center;
    padding-left: 0.6em;
}

/* Job number link */
#kt_jobs_table .text-gray-800.fw-bold {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* =============================================================================
   5. JOB DETAIL — TIMELINE
============================================================================= */

.timeline {
    position: relative;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    position: relative;
}

/* Vertical connector line between timeline items */
.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(70px + 0.5rem + 6px); /* label width + gap + half-icon */
    top: 1.25rem;
    bottom: -0.5rem;
    width: 2px;
    background-color: var(--bs-border-color, #eff2f5);
}

[data-bs-theme="dark"] .timeline-item:not(:last-child)::before {
    background-color: rgba(255, 255, 255, 0.08);
}

.timeline-label {
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    padding-top: 2px;
    font-size: 0.75rem;
    color: var(--bs-gray-600);
}

.timeline-badge {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
    z-index: 1;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

/* =============================================================================
   6. CERTIFICATE DETAIL & PRINT STYLES
============================================================================= */

/* Signature box */
.border.border-gray-200.rounded.p-5 {
    min-height: 80px;
    display: flex;
    flex-direction: column;
}

/* Certificate data table */
.table.table-row-dashed.fs-6.gy-3 tbody td:first-child {
    font-weight: 600;
    white-space: nowrap;
}

/* =============================================================================
   7. PRINT STYLES — CERTIFICATES
============================================================================= */

@media print {
    /* Certificate-specific print layout */
    .cert-print-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #000;
    }

    .cert-print-logo {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .cert-print-number {
        font-size: 0.875rem;
        text-align: right;
        color: #555;
    }

    .cert-signature-box {
        border: 1px solid #999;
        padding: 0.75rem;
        min-height: 80px;
        border-radius: 4px;
    }

    /* Ensure status badges print clearly */
    .badge {
        border: 1px solid #999 !important;
        color: #000 !important;
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Keep certificate card together */
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
    }

    /* Toolbar action buttons not needed in print */
    .app-toolbar-wrapper .btn {
        display: none !important;
    }

    /* Show inline status badge in print */
    .app-toolbar-wrapper .badge {
        display: inline-flex !important;
    }
}

/* =============================================================================
   8. STATUS BADGE COLOUR MAPPING
   Consistent application of status-to-colour across all entities
============================================================================= */

/* Job statuses */
.badge-status-draft,
.badge-status-pending      { color: #6c757d; background-color: #f8f9fa; border: 1px solid #dee2e6; }
.badge-status-scheduled    { color: #0369a1 !important; background-color: #e0f2fe !important; }
.badge-status-inprogress   { color: #0958d9 !important; background-color: #dbeafe !important; }
.badge-status-completed    { color: #198754 !important; background-color: #d1fae5 !important; }
.badge-status-cancelled    { color: #dc3545 !important; background-color: #fee2e2 !important; }
.badge-status-onhold       { color: #856404 !important; background-color: #fef9c3 !important; }

/* Certificate statuses */
.badge-cert-draft          { color: #6c757d; background-color: #f8f9fa; border: 1px solid #dee2e6; }
.badge-cert-pending        { color: #0369a1 !important; background-color: #e0f2fe !important; }
.badge-cert-approved       { color: #0958d9 !important; background-color: #dbeafe !important; }
.badge-cert-issued         { color: #198754 !important; background-color: #d1fae5 !important; }
.badge-cert-expired        { color: #856404 !important; background-color: #fef9c3 !important; }
.badge-cert-voided         { color: #dc3545 !important; background-color: #fee2e2 !important; }

[data-bs-theme="dark"] .badge-status-draft,
[data-bs-theme="dark"] .badge-cert-draft          { color: #9ca3af !important; background-color: rgba(156,163,175,0.12) !important; border-color: transparent; }
[data-bs-theme="dark"] .badge-status-scheduled,
[data-bs-theme="dark"] .badge-cert-pending        { color: #38bdf8 !important; background-color: rgba(56,189,248,0.15) !important; }
[data-bs-theme="dark"] .badge-status-inprogress,
[data-bs-theme="dark"] .badge-cert-approved       { color: #60a5fa !important; background-color: rgba(96,165,250,0.15) !important; }
[data-bs-theme="dark"] .badge-status-completed,
[data-bs-theme="dark"] .badge-cert-issued         { color: #4ade80 !important; background-color: rgba(74,222,128,0.15) !important; }
[data-bs-theme="dark"] .badge-status-cancelled,
[data-bs-theme="dark"] .badge-cert-voided         { color: #f87171 !important; background-color: rgba(248,113,113,0.15) !important; }
[data-bs-theme="dark"] .badge-status-onhold,
[data-bs-theme="dark"] .badge-cert-expired        { color: #fbbf24 !important; background-color: rgba(251,191,36,0.15) !important; }

/* =============================================================================
   9. SCHEDULE — FULLCALENDAR METRONIC SKIN
============================================================================= */

/* Calendar container */
#kt_schedule_calendar,
#kt_dashboard_calendar {
    min-height: 500px;
}

#kt_dashboard_calendar {
    min-height: 350px;
}

/* FullCalendar toolbar */
.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc .fc-toolbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bs-gray-900);
}

[data-bs-theme="dark"] .fc .fc-toolbar-title {
    color: #e1e3ea;
}

/* FullCalendar buttons — match Metronic btn-sm btn-light-primary */
.fc .fc-button {
    background-color: var(--kt-light-primary, rgba(0,158,247,0.1)) !important;
    border-color: transparent !important;
    color: #009ef7 !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 0.45rem !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

.fc .fc-button:hover,
.fc .fc-button:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: #009ef7 !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .fc .fc-button {
    background-color: rgba(0,158,247,0.15) !important;
    color: #00b2ff !important;
}

[data-bs-theme="dark"] .fc .fc-button:hover,
[data-bs-theme="dark"] .fc .fc-button-primary:not(:disabled).fc-button-active,
[data-bs-theme="dark"] .fc .fc-button-primary:not(:disabled):active {
    background-color: #009ef7 !important;
    color: #fff !important;
}

/* Calendar grid */
.fc-theme-standard td,
.fc-theme-standard th {
    border-color: var(--bs-border-color, #eff2f5) !important;
}

[data-bs-theme="dark"] .fc-theme-standard td,
[data-bs-theme="dark"] .fc-theme-standard th {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Calendar header days */
.fc .fc-col-header-cell-cushion {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bs-gray-600);
    text-decoration: none !important;
    padding: 0.5rem 0;
}

[data-bs-theme="dark"] .fc .fc-col-header-cell-cushion {
    color: #a1a5b7;
}

/* Today column highlight */
.fc .fc-day-today {
    background-color: rgba(0, 158, 247, 0.04) !important;
}

[data-bs-theme="dark"] .fc .fc-day-today {
    background-color: rgba(0, 158, 247, 0.08) !important;
}

/* Time axis */
.fc .fc-timegrid-slot-label-cushion {
    font-size: 0.7rem;
    color: var(--bs-gray-500);
}

/* Calendar body background */
.fc .fc-view-harness {
    background: transparent;
}

/* Events */
.fc .fc-event {
    border-radius: 4px !important;
    border: none !important;
    padding: 2px 5px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.fc .fc-event:hover {
    filter: brightness(1.1);
}

.fc .fc-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Day grid month view */
.fc .fc-daygrid-event {
    border-radius: 3px !important;
}

.fc .fc-daygrid-day-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bs-gray-700);
    text-decoration: none !important;
}

[data-bs-theme="dark"] .fc .fc-daygrid-day-number {
    color: #a1a5b7;
}

/* Schedule page filter card */
.card.mb-5 .card-body.py-4 label.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* =============================================================================
   10. ONBOARDING WIZARD — STEP INDICATOR
============================================================================= */

.wizard-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wizard-step-icon.completed {
    background: #50cd89;
    color: #fff;
}

.wizard-step-icon.active {
    background: #009ef7;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 158, 247, 0.2);
}

.wizard-step-icon.pending {
    background: #e4e6ef;
    color: #7e8299;
}

[data-bs-theme="dark"] .wizard-step-icon.pending {
    background: #2d2d44;
    color: #a1a5b7;
}

.wizard-connector {
    flex: 1;
    height: 2px;
    background: #e4e6ef;
    margin: 0 0.5rem;
    margin-bottom: 1rem; /* align with icon centre */
    align-self: flex-start;
    margin-top: 1.1rem; /* half of icon height = 18px */
}

[data-bs-theme="dark"] .wizard-connector {
    background: #2d2d44;
}

.wizard-connector.completed {
    background: #50cd89;
}

/* Onboarding trade selection cards */
.trade-card {
    cursor: pointer;
    border: 2px solid var(--bs-border-color, #eff2f5) !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    border-radius: 0.65rem !important;
}

.trade-card:hover {
    border-color: #009ef7 !important;
}

.trade-card.selected {
    border-color: #009ef7 !important;
    background-color: rgba(0, 158, 247, 0.05) !important;
}

[data-bs-theme="dark"] .trade-card.selected {
    background-color: rgba(0, 158, 247, 0.08) !important;
}

/* Onboarding plan selection cards */
.plan-card {
    cursor: pointer;
    border: 2px solid var(--bs-border-color, #eff2f5) !important;
    transition: border-color 0.15s ease, transform 0.15s ease;
    border-radius: 0.65rem !important;
}

.plan-card:hover {
    border-color: #009ef7 !important;
    transform: translateY(-2px);
}

.plan-card.selected {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 3px rgba(0, 158, 247, 0.15);
}

/* Onboarding step card */
.card.shadow-sm.border-0 {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.06) !important;
    border-radius: 0.85rem !important;
}

[data-bs-theme="dark"] .card.shadow-sm.border-0 {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25) !important;
}

/* =============================================================================
   11. TRADES — CUSTOM BUILDER WIZARD
============================================================================= */

/* Builder step tabs */
.builder-tabs .nav-link {
    color: var(--bs-gray-700);
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.builder-tabs .nav-link.active {
    background-color: rgba(0, 158, 247, 0.1);
    color: #009ef7;
}

/* Colour picker grid */
.colour-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 0.5rem;
}

.colour-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.colour-swatch:hover {
    transform: scale(1.15);
}

.colour-swatch.selected {
    border-color: var(--bs-gray-800);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .colour-swatch.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Drag-and-drop list for job types */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bs-border-color, #eff2f5);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bs-card-bg, #fff);
    cursor: grab;
    transition: box-shadow 0.15s ease;
}

.sortable-item:active {
    cursor: grabbing;
}

.sortable-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .sortable-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: var(--bs-card-bg, #1e1e2d);
}

.sortable-handle {
    color: var(--bs-gray-500);
    cursor: grab;
    flex-shrink: 0;
}

/* Quote edit — drag lines into sections */
.quote-line-list {
    min-height: 3.5rem;
    padding: 0.5rem;
    border: 1px dashed var(--bs-border-color, #e4e6ef);
    border-radius: 0.5rem;
    background: var(--bs-gray-100, #f9f9f9);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.quote-line-list.is-drop-target {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb, 0, 158, 247), 0.06);
}

.quote-line-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--bs-border-color, #eff2f5);
    border-radius: 0.5rem;
    background: var(--bs-card-bg, #fff);
    cursor: grab;
}

.quote-line-fields {
    display: grid;
    grid-template-columns: minmax(10rem, 2fr) 4.5rem 5.5rem 5.5rem 4.5rem;
    gap: 0.5rem 0.75rem;
    align-items: end;
    flex: 1 1 auto;
    min-width: 0;
}

.quote-line-field-desc {
    min-width: 0;
}

.quote-line-value {
    display: block;
    min-height: calc(1.5em + 1.1rem + 2px);
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--bs-border-color, #eff2f5);
    border-radius: 0.425rem;
    background-color: var(--bs-gray-100, #f5f8fa);
    color: var(--bs-gray-900, #071437) !important;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-line-fields input[readonly] {
    pointer-events: none;
    background-color: var(--bs-gray-100, #f5f8fa);
    opacity: 1;
    color: var(--bs-gray-900, #071437) !important;
    -webkit-text-fill-color: var(--bs-gray-900, #071437);
}

.quote-line-value-solid {
    background-color: var(--bs-gray-200, #f1f1f4);
}

[data-bs-theme="dark"] .quote-line-value {
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(255, 255, 255, 0.12);
    color: #f5f8fa !important;
    -webkit-text-fill-color: #f5f8fa;
}

[data-bs-theme="dark"] .quote-line-fields input[readonly] {
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(255, 255, 255, 0.12);
    color: #f5f8fa !important;
    -webkit-text-fill-color: #f5f8fa;
}

[data-bs-theme="dark"] .quote-line-value-solid {
    background-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 991.98px) {
    .quote-line-fields {
        grid-template-columns: 1fr 1fr;
    }
    .quote-line-field-desc {
        grid-column: 1 / -1;
    }
}

.quote-line-item:last-child {
    margin-bottom: 0;
}

.quote-line-item.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.quote-line-handle {
    padding-top: 0.15rem;
}

[data-bs-theme="dark"] .quote-line-list {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .quote-line-item {
    border-color: rgba(255, 255, 255, 0.08);
}

.quote-margin-card {
    z-index: 50;
}

@media (min-width: 992px) {
    .quote-margin-card.is-pinned {
        position: fixed;
        top: 6.5rem;
        max-height: calc(100vh - 7.5rem);
        overflow: auto;
    }
}

.quote-line-composer {
    display: grid;
    grid-template-columns: minmax(14rem, 2.2fr) 5.5rem 6.5rem 6rem minmax(8rem, 1fr) auto 5.5rem;
    gap: 0.75rem;
    align-items: end;
}

.quote-composer-suggest {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    max-height: 16rem;
    overflow: auto;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e4e6ef);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.quote-composer-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 0.85rem;
}

.quote-composer-option:hover,
.quote-composer-option.is-active {
    background: var(--bs-gray-100, #f5f8fa);
}

@media (max-width: 991.98px) {
    .quote-line-composer {
        grid-template-columns: 1fr 1fr;
    }
    .quote-composer-desc {
        grid-column: 1 / -1;
    }
}

/* Trade icon picker */
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--bs-border-color, #eff2f5);
    border-radius: 0.5rem;
}

.icon-option {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0.4rem;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-size: 1.25rem;
    color: var(--bs-gray-600);
}

.icon-option:hover {
    background-color: rgba(0, 158, 247, 0.08);
    border-color: rgba(0, 158, 247, 0.3);
    color: #009ef7;
}

.icon-option.selected {
    background-color: rgba(0, 158, 247, 0.12);
    border-color: #009ef7;
    color: #009ef7;
}

/* Available trades grid in Trades/Index */
.card.border.border-dashed.border-gray-300.p-5 {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card.border.border-dashed.border-gray-300.p-5:hover {
    border-color: #009ef7 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* =============================================================================
   12. ADMIN SETTINGS — LAYOUT CONSISTENCY
============================================================================= */

/* Section dividers */
.separator.separator-dashed {
    border-top: 1px dashed var(--bs-border-color, #eff2f5);
    margin: 1.5rem 0;
}

[data-bs-theme="dark"] .separator.separator-dashed {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Settings section headings */
h5.fw-bold.text-gray-700.mb-4 {
    color: var(--bs-gray-800) !important;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* Subscription plan cards */
.card.card-bordered {
    border: 2px solid var(--bs-border-color, #eff2f5);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card.card-bordered.border-primary {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 3px rgba(0, 158, 247, 0.12);
}

.card.card-bordered:not(.border-primary):hover {
    border-color: #009ef7 !important;
}

/* Usage progress bar */
.progress.h-6px {
    height: 6px !important;
    border-radius: 3px;
    background-color: var(--bs-gray-200);
}

/* =============================================================================
   13. ENGINEER PROFILE — AVATAR SYMBOL
============================================================================= */

.symbol.symbol-50px .symbol-label,
.symbol.symbol-40px .symbol-label,
.symbol.symbol-35px .symbol-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Symbol sizes */
.symbol-50px {
    width: 50px;
    height: 50px;
}

.symbol-50px .symbol-label {
    width: 50px;
    height: 50px;
    border-radius: 0.475rem;
}

.symbol-40px {
    width: 40px;
    height: 40px;
}

.symbol-40px .symbol-label {
    width: 40px;
    height: 40px;
    border-radius: 0.475rem;
}

.symbol-35px {
    width: 35px;
    height: 35px;
}

.symbol-35px .symbol-label {
    width: 35px;
    height: 35px;
    border-radius: 0.475rem;
}

/* =============================================================================
   14. FORM PAGES — FIELD GROUPS & VALIDATION
============================================================================= */

/* Required field marker */
.form-label.required::after {
    content: " *";
    color: #f1416c;
}

/* Form row groups */
.fv-row {
    position: relative;
}

/* Validation error inline */
.text-danger.fs-7 {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #f1416c !important;
}

/* Form check switch (large) */
.form-switch.form-switch-lg .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

/* Inline form hint text */
.text-muted.fs-7.ms-10.mt-1 {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* =============================================================================
   15. AUDIT LOG — TABLE COLUMN WIDTHS
============================================================================= */

/* Audit log table: timestamp column fixed width */
.table .text-nowrap {
    white-space: nowrap;
}

/* =============================================================================
   16. RESPONSIVE ADJUSTMENTS (PAGE-LEVEL)
============================================================================= */

/* 1024px — tighten filter bars */
@media (max-width: 1024px) {
    .app-toolbar-wrapper {
        gap: 0.5rem;
    }

    #kt_schedule_calendar {
        min-height: 400px;
    }
}

/* 768px — stack toolbar buttons, hide secondary table columns */
@media (max-width: 991px) {
    .app-toolbar-wrapper.d-flex.flex-stack {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Ensure action buttons stay on same row for small screens */
    .app-toolbar-wrapper > .d-flex.align-items-center.gap-2 {
        align-self: flex-start;
    }

    /* Wizard step labels: hide on very narrow */
    .wizard-connector {
        margin: 0 0.25rem;
        margin-top: 1.1rem;
    }
}

/* 375px mobile */
@media (max-width: 575px) {
    /* Schedule nav controls */
    #calPrev, #calToday, #calNext {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

    /* Trade cards in available grid */
    .card.border.border-dashed.border-gray-300.p-5 {
        padding: 0.75rem !important;
    }

    /* Cert detail: signatures stack */
    .cert-signatures .col-md-6 {
        margin-bottom: 1rem;
    }

    /* Timeline: compress label width */
    .timeline-label {
        width: 50px;
        font-size: 0.65rem;
    }

    .timeline-item:not(:last-child)::before {
        left: calc(50px + 0.5rem + 6px);
    }
}

/* =============================================================================
   17. COLLAPSIBLE CARD (Available Trades)
============================================================================= */

/* Collapsible card header */
.card-header.collapsible.cursor-pointer.rotate {
    cursor: pointer;
    user-select: none;
}

.card-header.collapsible .card-toolbar.rotate-180 {
    transition: transform 0.3s ease;
}

.card-header.collapsible.collapsed .card-toolbar.rotate-180 {
    transform: rotate(180deg);
}

/* =============================================================================
   18. SCHEDULE PAGE — FILTER BAR
============================================================================= */

/* Inline nav controls row */
.d-flex.gap-2.mb-5 {
    flex-wrap: wrap;
}

#calendarViewSelect[style*="width:auto"] {
    min-width: 120px;
}

/* =============================================================================
   19. DARK MODE CALENDAR OVERRIDES
============================================================================= */

[data-bs-theme="dark"] .fc-theme-standard .fc-list-day-cushion,
[data-bs-theme="dark"] .fc .fc-list-sticky .fc-list-day > * {
    background-color: #1e1e2d;
}

[data-bs-theme="dark"] .fc .fc-list-event:hover td {
    background-color: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .fc .fc-timegrid-now-indicator-line {
    border-color: #f1416c;
}

[data-bs-theme="dark"] .fc .fc-timegrid-now-indicator-arrow {
    border-top-color: #f1416c;
    border-bottom-color: #f1416c;
}

/* =============================================================================
   20. ALERT ENHANCEMENTS
============================================================================= */

/* Alerts with flex icon alignment */
.alert.d-flex.align-items-center {
    gap: 0;
}

.alert.d-flex.align-items-center > i {
    flex-shrink: 0;
}

/* =============================================================================
   21. CARD HEADER TOOLBAR ALIGNMENT
============================================================================= */

/* Ensure card toolbar buttons don't overflow on small screens */
.card-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-toolbar .btn {
    white-space: nowrap;
}

.quote-add-section-form {
    max-width: 22rem;
    width: 50%;
    min-width: 12rem;
}

.quote-add-section-form .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

/* =============================================================================
   22. QUOTE WORKFLOW & SHARE LINKS
============================================================================= */

.quote-workflow-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}

.quote-workflow-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-gray-500, #a1a5b7);
    font-size: 0.8125rem;
    font-weight: 600;
}

.quote-workflow-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 2px solid var(--bs-gray-300, #e4e6ef);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.quote-workflow-step.active {
    color: var(--bs-primary, #009ef7);
}

.quote-workflow-step.active .quote-workflow-dot {
    border-color: var(--bs-primary, #009ef7);
    background: var(--bs-primary, #009ef7);
    color: #fff;
}

.quote-workflow-step.done {
    color: var(--bs-success, #50cd89);
}

.quote-workflow-step.done .quote-workflow-dot {
    border-color: var(--bs-success, #50cd89);
    background: var(--bs-success, #50cd89);
    color: #fff;
}

.share-link-card .font-monospace {
    font-size: 0.75rem;
}

.public-quote-page .card {
    border-radius: 0.75rem;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
}

.public-quote-total {
    background: var(--bs-gray-100, #f5f8fa);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

[data-bs-theme="dark"] .public-quote-total {
    background: rgba(255, 255, 255, 0.05);
}

