
/* ===== TICKET PRIORITY BADGES (P0-P3) ===== */
/* ===== DIALOG COMMON STYLES ===== */

/* ===== Basra & Wasit Buttons ===== */
.fxct-btn-basra {
    background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    font-size: 12px !important;
    box-shadow: 0 6px 18px rgba(14,165,233,.30) !important;
    text-transform: uppercase !important;
}

.fxct-btn-basra:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(14,165,233,.40) !important;
}

.fxct-btn-wasit {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    font-size: 12px !important;
    box-shadow: 0 6px 18px rgba(139,92,246,.30) !important;
    text-transform: uppercase !important;
}

.fxct-btn-wasit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(139,92,246,.40) !important;
}


.fxcz-dialog .mud-dialog-content {
    padding: 0 !important;
}

.fxcz-dialog-header {
    background: linear-gradient(135deg, #2D2350 0%, #4B3E7B 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 12px 12px 0 0;
}

.fxcz-dialog-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fxcz-dialog-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.fxcz-dialog-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 4px;
}

.fxcz-dialog-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.fxcz-dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== FILTER SECTION ===== */

.fxcz-filter-section {
    margin-bottom: 20px;
}

.fxcz-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== INFO ROW ===== */

.fxcz-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.fxcz-info-label {
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
}

.fxcz-priority-p0 {
    color: #B91C1C;
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.25);
}

.fxcz-priority-p1 {
    color: #C2410C;
    background: rgba(249,115,22,.12);
    border-color: rgba(249,115,22,.25);
}

.fxcz-priority-p2 {
    color: #B45309;
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.25);
}

.fxcz-priority-p3 {
    color: #15803D;
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.25);
}

.fxcz-ticket-status-new {
    color: #1E40AF;
    background: rgba(59,130,246,.12);
    border-color: rgba(59,130,246,.25);
}

.fxcz-ticket-status-inprogress {
    color: #B45309;
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.25);
}

.fxcz-ticket-status-onhold {
    color: #7C2D12;
    background: rgba(249,115,22,.12);
    border-color: rgba(249,115,22,.25);
}

.fxcz-ticket-status-resolved {
    color: #15803D;
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.25);
}

.fxcz-ticket-status-closed {
    color: #6B7280;
    background: rgba(156,163,175,.12);
    border-color: rgba(156,163,175,.25);
}

/* ===== TICKET PRIORITY BADGES ===== */

.fxcz-priority-low {
    color: #15803D;
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.25);
}

.fxcz-priority-medium {
    color: #B45309;
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.25);
}

.fxcz-priority-high {
    color: #C2410C;
    background: rgba(249,115,22,.12);
    border-color: rgba(249,115,22,.25);
}

.fxcz-priority-critical {
    color: #B91C1C;
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.25);
}

/* ===== SLA STATUS BADGES ===== */

.fxcz-sla-normal {
    color: #15803D;
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.25);
}

.fxcz-sla-responsebreach {
    color: #C2410C;
    background: rgba(249,115,22,.12);
    border-color: rgba(249,115,22,.25);
}

.fxcz-sla-completionbreach {
    color: #B91C1C;
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.25);
}

.fxcz-sla-bothbreach {
    color: #7F1D1D;
    background: rgba(220,38,38,.15);
    border-color: rgba(220,38,38,.30);
}

/* ===== SLA BREACH FILTER BUTTONS ===== */

.fx-sla-btn {
    font-weight: 700 !important;
    font-size: 11px !important;
    letter-spacing: .4px !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
}

.fx-sla-btn-all-active {
    background: linear-gradient(135deg, #4B3E7B 0%, #2D2350 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(45,35,80,.25) !important;
}

.fx-sla-btn-response {
    color: #C2410C !important;
    border-color: rgba(249,115,22,.4) !important;
}

.fx-sla-btn-response:hover {
    background: rgba(249,115,22,.08) !important;
}

.fx-sla-btn-response-active {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(249,115,22,.30) !important;
}

.fx-sla-btn-completion {
    color: #B91C1C !important;
    border-color: rgba(239,68,68,.4) !important;
}

.fx-sla-btn-completion:hover {
    background: rgba(239,68,68,.08) !important;
}

.fx-sla-btn-completion-active {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(239,68,68,.30) !important;
}

/* ===== TICKET STATS CARDS ===== */

.fxtk-stat-card {
    background: white;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
}

.fxtk-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #2D2350;
    line-height: 1;
    margin-bottom: 6px;
}

.fxtk-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== EDIT BUTTON ===== */

.fx-btn-edit {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    font-weight: 700;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
}

.fx-btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.fxtk-page {
    padding-bottom: 60px;
    min-height: 100vh;
    font-family: 'Inter', 'Poppins', -apple-system, sans-serif;
}

/* ===== Stats Card (Standalone Widget) ===== */
.fxtk-stats-card {
    background: #fff !important;
    border: 1px solid rgba(0,0,0,.04) !important;
    border-radius: 22px !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 18px 55px rgba(0,0,0,.08) !important;
}

.fxtk-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
}

.fxtk-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    border-radius: 14px;
    background: #F8F7FF;
    border: 1.5px solid transparent;
    transition: all .2s;
}

.fxtk-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.fxtk-stat-item .fxtk-stat-num {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 24px;
    line-height: 1;
}

.fxtk-stat-item .fxtk-stat-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.fxtk-stat-total { border-color: rgba(45,35,80,.15); }
.fxtk-stat-total .fxtk-stat-num { color: #2D2350; }

.fxtk-stat-new { border-color: rgba(59,130,246,.15); }
.fxtk-stat-new .fxtk-stat-num { color: #3B82F6; }

.fxtk-stat-inprogress { border-color: rgba(234,179,8,.15); }
.fxtk-stat-inprogress .fxtk-stat-num { color: #EAB308; }

.fxtk-stat-onhold { border-color: rgba(249,115,22,.15); }
.fxtk-stat-onhold .fxtk-stat-num { color: #F97316; }

.fxtk-stat-resolved { border-color: rgba(34,197,94,.15); }
.fxtk-stat-resolved .fxtk-stat-num { color: #22C55E; }

.fxtk-stat-closed { border-color: rgba(107,114,128,.15); }
.fxtk-stat-closed .fxtk-stat-num { color: #6B7280; }

/* ===== Toolbar ===== */
.fxtk-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 18px !important;
    flex-wrap: wrap !important;
    margin: 0 0 16px !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,.04) !important;
    box-shadow: 0 18px 55px rgba(0,0,0,.08) !important;
}

.fxtk-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F8F7FF;
    border: 1.5px solid rgba(75,62,123,.18);
    border-radius: 12px;
    padding: 0 14px;
    height: 44px;
    flex: 1;
    min-width: 220px;
    transition: border-color .2s, box-shadow .2s;
}

.fxtk-search-wrap:focus-within {
    border-color: #4B3E7B;
    box-shadow: 0 0 0 3px rgba(75,62,123,.10);
}

.fxtk-search-icon {
    flex-shrink: 0;
    color: #9CA3AF !important;
}

.fxtk-search {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #2D2350;
    flex: 1;
}

.fxtk-search::placeholder { color: #9CA3AF; }

.fxtk-search-clear {
    flex-shrink: 0;
    color: #9CA3AF !important;
}

.fxtk-search-clear:hover { color: #EF4444 !important; }

.fxtk-btn-filter {
    padding: 6px 18px !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(75,62,123,.25) !important;
    background: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #4B3E7B !important;
    cursor: pointer !important;
    transition: all .18s !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    height: 44px !important;
}

.fxtk-btn-filter:hover {
    background: rgba(75,62,123,.06) !important;
    border-color: #4B3E7B !important;
}

/* ===== Status Pills ===== */
.fxtk-status-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.fxtk-spill {
    padding: 6px 14px !important;
    border-radius: 999px !important;
    border: 1.5px solid rgba(75,62,123,.18) !important;
    background: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #6B7280 !important;
    cursor: pointer !important;
    transition: all .18s !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    height: auto !important;
    min-height: unset !important;
}

.fxtk-spill:hover {
    border-color: #4B3E7B !important;
    color: #4B3E7B !important;
}

.fxtk-spill-on {
    background: #4B3E7B !important;
    border-color: #4B3E7B !important;
    color: #fff !important;
}

.fxtk-spill-new.fxtk-spill-on { background: #3B82F6 !important; border-color: #3B82F6 !important; }
.fxtk-spill-inprogress.fxtk-spill-on { background: #EAB308 !important; border-color: #EAB308 !important; }
.fxtk-spill-onhold.fxtk-spill-on { background: #F97316 !important; border-color: #F97316 !important; }
.fxtk-spill-resolved.fxtk-spill-on { background: #22C55E !important; border-color: #22C55E !important; }
.fxtk-spill-closed.fxtk-spill-on { background: #6B7280 !important; border-color: #6B7280 !important; }

/* ===== Table Container & Wrapper ===== */
.fxuser-table-wrap {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.04);
    box-shadow: 0 18px 55px rgba(0,0,0,.08);
    margin-bottom: 16px;
}

.fxuser-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fxuser-scroll-x::-webkit-scrollbar {
    height: 8px;
}

.fxuser-scroll-x::-webkit-scrollbar-track {
    background: #F8F7FF;
    border-radius: 0 0 22px 22px;
}

.fxuser-scroll-x::-webkit-scrollbar-thumb {
    background: rgba(75,62,123,.2);
    border-radius: 4px;
}

.fxuser-scroll-x::-webkit-scrollbar-thumb:hover {
    background: rgba(75,62,123,.35);
}

/* ===== Table Styles ===== */
.fxcz-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Poppins', sans-serif;
    min-width: 900px;
}

.fxcz-table thead {
    background: linear-gradient(135deg, #F8F7FF 0%, #FAF9FF 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.fxcz-th {
    padding: 16px 12px !important;
    text-align: left !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    color: #FFF5F0 !important;
    text-transform: uppercase !important;
    letter-spacing: .6px !important;
    border-bottom: 2px solid rgba(75,62,123,.12) !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, #2D2350 0%, #4B3E7B 100%);
    /*background: transparent !important;*/
}

.fxcz-tr {
    transition: background-color .15s ease;
}

.fxcz-tr:hover {
    background: rgba(75,62,123,.03) !important;
}

.fxcz-tr:last-child .fxcz-td {
    border-bottom: none;
}

.fxcz-td {
    padding: 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #2D2350 !important;
    border-bottom: 1px solid rgba(0,0,0,.04) !important;
    vertical-align: middle !important;
}

/* Badge styles */
.fxcz-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Loading & Empty States */
.fxcz-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #9CA3AF;
}

.fxcz-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.fxcz-empty-icon {
    font-size: 64px !important;
    opacity: .3;
    color: #9CA3AF !important;
}

.fxcz-empty-title {
    font-weight: 800;
    font-size: 18px;
    color: #2D2350;
}

.fxcz-empty-sub {
    font-size: 13px;
    color: #9CA3AF;
    max-width: 360px;
}

/* ===== Table Specific Styles ===== */
.fxtk-th-num { width: 48px !important; }

.fxtk-row-p0 { background: rgba(239,68,68,.03) !important; }
.fxtk-row-p0:hover { background: rgba(239,68,68,.07) !important; }
.fxtk-row-p1 { background: rgba(249,115,22,.02) !important; }
.fxtk-row-p1:hover { background: rgba(249,115,22,.06) !important; }

.fxtk-num-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    font-weight: 800;
    color: #4B3E7B;
    padding: 3px 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .16s;
}

.fxtk-num-btn:hover { color: #7C3AED; }

.fxtk-customer-name {
    font-weight: 700;
    font-size: 13px;
    color: #2D2350;
}

.fxtk-customer-mobile {
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 600;
    margin-top: 1px;
    font-family: ui-monospace, monospace;
}

.fxtk-subject-cell {
    max-width: 220px;
}

.fxtk-sla-text {
    font-size: 11px;
    font-weight: 600;
    color: #7C3AED;
    font-family: ui-monospace, monospace;
}

.fxtk-mono {
    font-family: ui-monospace, monospace;
}

.fxtk-muted {
    color: #D1D5DB;
    font-style: italic;
}

/* Status badges */
.fxtk-s-new { color: #1D4ED8 !important; background: rgba(59,130,246,.10) !important; border-color: rgba(59,130,246,.22) !important; }
.fxtk-s-inprogress { color: #92400E !important; background: rgba(234,179,8,.12) !important; border-color: rgba(234,179,8,.28) !important; }
.fxtk-s-onhold { color: #C2410C !important; background: rgba(249,115,22,.10) !important; border-color: rgba(249,115,22,.22) !important; }
.fxtk-s-resolved { color: #15803D !important; background: rgba(34,197,94,.10) !important; border-color: rgba(34,197,94,.22) !important; }
.fxtk-s-closed { color: #374151 !important; background: rgba(107,114,128,.10) !important; border-color: rgba(107,114,128,.22) !important; }

/* Priority badges */
.fxtk-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid transparent;
}

.fxtk-p-p0 { color: #B91C1C; background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.22); }
.fxtk-p-p1 { color: #C2410C; background: rgba(249,115,22,.10); border-color: rgba(249,115,22,.22); }
.fxtk-p-p2 { color: #92400E; background: rgba(234,179,8,.12); border-color: rgba(234,179,8,.28); }
.fxtk-p-p3 { color: #166534; background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.22); }

/* Impact chips */
.fxtk-impact-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(0,0,0,.06);
}

.fxtk-impact-outage {
    background: rgba(249,115,22,.08);
    color: #C2410C;
    border-color: rgba(249,115,22,.20);
}

.fxtk-impact-single {
    background: rgba(59,130,246,.08);
    color: #1D4ED8;
    border-color: rgba(59,130,246,.18);
}

.fxtk-impact-unknown {
    background: #F3F4F6;
    color: #6B7280;
    border-color: rgba(0,0,0,.06);
}

.fxtk-outage-linked {
    color: #F97316 !important;
    font-weight: 800 !important;
}

/* Action buttons */
.fxtk-btn-view {
    border-color: rgba(75,62,123,.30) !important;
    color: #4B3E7B !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    border-radius: 9px !important;
    padding: 4px 12px !important;
    text-transform: uppercase !important;
    letter-spacing: .3px !important;
    height: auto !important;
    min-height: unset !important;
}

.fxtk-btn-view:hover {
    background: rgba(75,62,123,.07) !important;
}

.fxtk-btn-status {
    background: linear-gradient(135deg, #4B3E7B 0%, #7C3AED 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(75,62,123,.28) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    border-radius: 9px !important;
    padding: 5px 12px !important;
    text-transform: uppercase !important;
    height: auto !important;
    min-height: unset !important;
}

.fxtk-act-btn {
    font-size: 11px !important;
    font-weight: 800 !important;
    border-radius: 9px !important;
    padding: 5px 12px !important;
    text-transform: uppercase !important;
    letter-spacing: .3px !important;
    height: auto !important;
    min-height: unset !important;
}

/* Mobile meta row */
.fxtk-mobile-meta {
    margin-top: 4px;
}

/* Responsive column hiding */
.fxtk-hide-sm { }
.fxtk-hide-md { }
.fxtk-hide-lg { }
.fxtk-show-sm { display: none; }

@media (max-width: 1100px) {
    .fxtk-hide-lg { display: none !important; }
    .fxcz-table { min-width: 700px; }
}

@media (max-width: 900px) {
    .fxtk-hide-md { display: none !important; }
    .fxcz-table { min-width: 500px; }
}

@media (max-width: 640px) {
    .fxtk-hide-sm { display: none !important; }
    .fxtk-show-sm { display: block !important; }

    .fxcz-table { min-width: 100%; }

    .fxcz-th,
    .fxcz-td {
        padding: 8px 6px !important;
        font-size: 11px !important;
    }

    .fxtk-num-btn {
        font-size: 11px !important;
    }

    .fxtk-customer-name {
        font-size: 11px !important;
    }

    .fxtk-btn-view,
    .fxtk-btn-status {
        padding: 3px 8px !important;
        font-size: 10px !important;
    }

    .fxtk-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .fxtk-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .fxtk-stat-item {
        padding: 12px 8px;
    }

    .fxtk-stat-item .fxtk-stat-num {
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .fxtk-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   STATUS CHANGE DIALOG (fxtk-status-)
   ===================================================== */

.fxtk-status-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0,0,0,.40);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fxtk-fade .2s ease-out;
}

@keyframes fxtk-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fxtk-status-modal {
    background: #fff !important;
    border-radius: 22px !important;
    box-shadow: 0 30px 80px rgba(0,0,0,.22) !important;
    padding: 24px !important;
    width: 100% !important;
    max-width: 380px !important;
    animation: fxtk-pop .18s ease-out !important;
    position: relative !important;
}

@keyframes fxtk-pop {
    from { transform: scale(.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fxtk-sm-header {
    margin-bottom: 18px;
}

.fxtk-sm-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 17px;
    color: #2D2350;
}

.fxtk-sm-sub {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 600;
    margin-top: 2px;
}

.fxtk-sm-close {
    position: absolute;
    top: 18px;
    right: 20px;
    color: #9CA3AF !important;
}

.fxtk-sm-close:hover {
    color: #374151 !important;
}

.fxtk-sm-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fxtk-sm-opt {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 11px 16px !important;
    border-radius: 12px !important;
    border: 2px solid transparent !important;
    background: #F9FAFB !important;
    cursor: pointer !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: background .16s, border-color .16s !important;
    text-align: left !important;
    text-transform: none !important;
    height: auto !important;
    min-height: unset !important;
}

.fxtk-sm-opt:hover:not(:disabled) {
    background: #F3F4F6 !important;
    border-color: currentColor !important;
}

.fxtk-sm-opt:disabled {
    opacity: .5 !important;
    cursor: not-allowed !important;
}

.fxtk-sm-opt.fxtk-s-new { color: #1D4ED8 !important; }
.fxtk-sm-opt.fxtk-s-new:hover { background: rgba(59,130,246,.08) !important; }
.fxtk-sm-opt.fxtk-s-inprogress { color: #92400E !important; }
.fxtk-sm-opt.fxtk-s-inprogress:hover { background: rgba(234,179,8,.08) !important; }
.fxtk-sm-opt.fxtk-s-onhold { color: #C2410C !important; }
.fxtk-sm-opt.fxtk-s-onhold:hover { background: rgba(249,115,22,.08) !important; }
.fxtk-sm-opt.fxtk-s-resolved { color: #15803D !important; }
.fxtk-sm-opt.fxtk-s-resolved:hover { background: rgba(34,197,94,.08) !important; }
.fxtk-sm-opt.fxtk-s-closed { color: #374151 !important; }
.fxtk-sm-opt.fxtk-s-closed:hover { background: rgba(107,114,128,.08) !important; }

.fxtk-sm-current {
    border-color: currentColor !important;
    background: inherit !important;
    font-weight: 900 !important;
}

.fxtk-sm-label {
    flex: 1;
}

.fxtk-sm-check {
    font-weight: 900;
    margin-left: auto;
}

.fxtk-sm-error {
    margin-top: 12px;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.20);
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 600;
    color: #DC2626;
}

/* =====================================================
   FILTER DIALOG (fxtk-fd-)
   ===================================================== */

.fxtk-filter-dialog .mud-dialog {
    border: 2px solid #4B3E7B !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 30px 80px rgba(75,62,123,.25) !important;
    max-height: 92vh !important;
    max-width: 500px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.fxtk-filter-dialog .mud-dialog-content {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.fxtk-fd-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 24px 16px !important;
    background: linear-gradient(135deg, #2D2350 0%, #4B3E7B 100%) !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    gap: 12px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.fxtk-fd-header-glow {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #2D2350 0%, #4B3E7B 100%) !important;
    /*background: radial-gradient(circle, rgba(124,58,237,.4) 0%, transparent 70%);*/
    pointer-events: none;
}

.fxtk-fd-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.fxtk-fd-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fxtk-fd-header-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 16px;
    color: #fff;
}

.fxtk-fd-header-sub {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    margin-top: 2px;
}

.fxtk-fd-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.fxtk-fd-body::-webkit-scrollbar {
    width: 4px;
}

.fxtk-fd-body::-webkit-scrollbar-thumb {
    background: rgba(75,62,123,.2);
    border-radius: 2px;
}

.fxtk-fd-section {
    margin-bottom: 24px;
}

.fxtk-fd-section:last-child {
    margin-bottom: 0;
}

.fxtk-fd-section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 11px;
    color: #4B3E7B;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 12px;
}

.fxtk-fd-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.fxtk-fd-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    border-radius: 12px;
    border: 2px solid rgba(75,62,123,.14);
    background: #F8F7FF;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
    transition: all .18s;
    position: relative;
}

.fxtk-fd-tile:hover {
    border-color: #4B3E7B;
    color: #4B3E7B;
}

.fxtk-fd-tile-on {
    border-color: #4B3E7B !important;
    background: rgba(75,62,123,.08) !important;
    color: #4B3E7B !important;
    box-shadow: 0 0 0 3px rgba(75,62,123,.10) !important;
}

.fxtk-fd-p-p0 { color: #B91C1C; }
.fxtk-fd-p-p0.fxtk-fd-tile-on { border-color: #EF4444 !important; background: rgba(239,68,68,.08) !important; color: #B91C1C !important; }
.fxtk-fd-p-p1 { color: #C2410C; }
.fxtk-fd-p-p1.fxtk-fd-tile-on { border-color: #F97316 !important; background: rgba(249,115,22,.08) !important; color: #C2410C !important; }
.fxtk-fd-p-p2 { color: #92400E; }
.fxtk-fd-p-p2.fxtk-fd-tile-on { border-color: #EAB308 !important; background: rgba(234,179,8,.08) !important; color: #92400E !important; }
.fxtk-fd-p-p3 { color: #166534; }
.fxtk-fd-p-p3.fxtk-fd-tile-on { border-color: #22C55E !important; background: rgba(34,197,94,.08) !important; color: #166534 !important; }

.fxtk-fd-check {
    position: absolute;
    top: 6px;
    right: 6px;
    color: #4B3E7B;
}

.fxtk-fd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid rgba(75,62,123,.10);
    background: #FAFAFA;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}

.fxtk-fd-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fxtk-fd-btn-clear {
    color: #6B7280 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
}

/* =====================================================
   TICKET DETAILS PAGE (fxtd-)
   ===================================================== */

.fxtd-page {
    padding-bottom: 60px;
    min-height: 100vh;
    font-family: 'Inter', 'Poppins', -apple-system, sans-serif;
}

.fxtd-loading,
.fxtd-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #9CA3AF;
}

.fxtd-error-icon {
    font-size: 64px !important;
    color: #EF4444 !important;
}

.fxtd-error-title {
    font-weight: 800;
    font-size: 18px;
    color: #2D2350;
}

/* Header */
.fxtd-header {
    background: #ffffff !important;
    padding: 20px 24px !important;
    margin-bottom: 16px !important;
    border-radius: 0 0 24px 24px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: none !important;
    border: none !important;
    color:black;
}

.fxtd-header-glow {
    position: absolute;
    inset: 0;
    background: #ffffff !important;
    radial-gradient(circle at 5% 80%, rgba(99,102,241,.20) 0%, transparent 50%);
    pointer-events: none;
}

.fxtd-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
}

.fxtd-back-btn {
    color: rgba(255,255,255,.8) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    padding: 6px 12px !important;
    height: auto !important;
    background: #2c3e50;
}

.fxtd-back-btn:hover {
    color: #fff !important;
    background: #2c3e50;
}

.fxtd-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fxtd-btn-status {
    background: #2c3e50;
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,.25) !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    text-transform: uppercase !important;
    height: auto !important;
}

.fxtd-btn-status:hover {
    background: rgba(255,255,255,.25) !important;
}

.fxtd-header-main {
    position: relative;
}

.fxtd-ticket-num {
    font-family: ui-monospace, monospace;
    font-size: 18px;
    font-weight: 900;
    color: black;
    letter-spacing: .5px;
    margin-bottom: 10px;
}

.fxtd-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fxtd-subject {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: black;
    line-height: 1.4;
    max-width: 800px;
}

/* Tabs */
.fxtd-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.fxtd-tab {
    padding: 10px 20px !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(75,62,123,.18) !important;
    background: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #6B7280 !important;
    cursor: pointer !important;
    transition: all .18s !important;
    text-transform: uppercase !important;
    height: auto !important;
    min-height: unset !important;
}

.fxtd-tab:hover {
    border-color: #4B3E7B !important;
    color: #4B3E7B !important;
}

.fxtd-tab-on {
    background: #4B3E7B !important;
    border-color: #4B3E7B !important;
    color: #fff !important;
}

/* Body */
.fxtd-body {
    min-height: 400px;
}

.fxtd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fxtd-left,
.fxtd-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Sections */
.fxtd-section {
    background: #fff !important;
    border: 1px solid rgba(75,62,123,.08) !important;
    border-radius: 16px !important;
    padding: 18px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.04) !important;
}

.fxtd-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 13px;
    color: #4B3E7B;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(75,62,123,.10);
}

.fxtd-info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fxtd-info-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fxtd-info-key {
    font-size: 11px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .3px;
    min-width: 90px;
    flex-shrink: 0;
    padding-top: 2px;
}

.fxtd-info-val {
    font-size: 13px;
    font-weight: 600;
    color: #2D2350;
    flex: 1;
    word-break: break-word;
}

.fxtd-description {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Attachments */
.fxtd-attachments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fxtd-att-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #F8F7FF;
    border-radius: 10px;
    border: 1px solid rgba(75,62,123,.10);
}

.fxtd-att-icon {
    font-size: 20px !important;
    color: #4B3E7B !important;
    flex-shrink: 0;
}

.fxtd-att-info {
    flex: 1;
    min-width: 0;
}

.fxtd-att-name {
    font-size: 12px;
    font-weight: 700;
    color: #2D2350;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fxtd-att-key {
    font-size: 10px;
    color: #9CA3AF;
    font-family: ui-monospace, monospace;
}

/* Notes */
.fxtd-notes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fxtd-add-note-section {
    background: #FFF5F0 !important;
    border-color: #4B3E7B !important;
}

.fxtd-note-input {
    width: 100%;
    border: 1.5px solid rgba(75,62,123,.18);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #2D2350;
    resize: vertical;
    outline: none;
    transition: border-color .18s;
    box-sizing: border-box;
    margin-bottom: 10px;
    background: #fff;
}

.fxtd-note-input:focus {
    border-color: #4B3E7B;
}

.fxtd-note-error {
    font-size: 12px;
    font-weight: 600;
    color: #DC2626;
    margin-bottom: 8px;
}

.fxtd-btn-add-note {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    height: 38px !important;
    padding: 0 18px !important;
    box-shadow: 0 4px 12px rgba(34,197,94,.28) !important;
    text-transform: uppercase !important;
}

.fxtd-notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fxtd-note-card {
    background: #fff !important;
    border: 1px solid rgba(75,62,123,.09) !important;
    border-radius: 14px !important;
    padding: 14px 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.03) !important;
}

.fxtd-note-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.fxtd-note-author {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 12px;
    color: #4B3E7B;
}

.fxtd-note-date {
    font-size: 10px;
    font-weight: 600;
    color: #9CA3AF;
}

.fxtd-note-text {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

.fxtd-note-file {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #6B7280;
}

/* Activity Timeline */
.fxtd-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #FFFFFF;
    padding: 15px;
    border-radius: 16px;
}

.fxtd-timeline-entry {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fxtd-timeline-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 3px;
}

.fxtd-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4B3E7B;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #4B3E7B;
    flex-shrink: 0;
}

.fxtd-timeline-line {
    width: 2px;
    flex: 1;
    min-height: 30px;
    background: rgba(75,62,123,.15);
    margin-top: 3px;
}

.fxtd-timeline-entry:last-child .fxtd-timeline-line {
    display: none;
}

.fxtd-timeline-content {
    padding-bottom: 20px;
    flex: 1;
}

.fxtd-timeline-action {
    font-size: 13px;
    font-weight: 600;
    color: #2D2350;
    line-height: 1.4;
}

.fxtd-timeline-time {
    font-size: 10px;
    font-weight: 600;
    color: #9CA3AF;
    margin-top: 4px;
}

/* Empty states */
.fxtd-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #9CA3AF;
}

.fxtd-empty-icon {
    font-size: 48px !important;
    opacity: .3;
    color: #9CA3AF !important;
}

.fxtd-loading-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 32px;
    font-size: 13px;
    font-weight: 600;
    color: #9CA3AF;
}

/* =====================================================
   CREATE TICKET PAGE (fxct-)
   ===================================================== */

.fxct-page {
    padding-bottom: 60px;
    min-height: 100vh;
    font-family: 'Inter', 'Poppins', -apple-system, sans-serif;
}

.fxct-alert {
    margin-bottom: 16px !important;
}

/* Header */
.fxct-header {
    background: linear-gradient(135deg, #2D2350 0%, #4B3E7B 70%, #7C3AED 100%) !important;
    padding: 20px 24px !important;
    margin-bottom: 20px !important;
    border-radius: 0 0 24px 24px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: none !important;
    border: none !important;
}

.fxct-header-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(124,58,237,.25) 0%, transparent 50%),
    radial-gradient(circle at 5% 80%, rgba(99,102,241,.20) 0%, transparent 50%);
    pointer-events: none;
}

.fxct-header-top {
    margin-bottom: 16px;
    position: relative;
}

.fxct-back-btn {
    color: rgba(255,255,255,.8) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    padding: 6px 12px !important;
    height: auto !important;
}

.fxct-back-btn:hover {
    color: #fff !important;
    background: rgba(255,255,255,.1) !important;
}

.fxct-header-main {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.fxct-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fxct-header-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 20px;
    color: #fff;
}

.fxct-header-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    margin-top: 4px;
}

/* Body */
.fxct-body {
    max-width: 900px;
    margin: 0 auto;
}

/* Sections */
.fxct-section {
    background: #fff !important;
    border: 1px solid rgba(75,62,123,.08) !important;
    border-radius: 20px !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.06) !important;
}

.fxct-section-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(75,62,123,.10);
}

.fxct-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4B3E7B, #7C3AED);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fxct-section-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 16px;
    color: #2D2350;
}

.fxct-section-sub {
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    margin-top: 2px;
}

.fxct-subsection {
    margin-bottom: 24px;
}

.fxct-subsection:last-child {
    margin-bottom: 0;
}

.fxct-subsection-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 12px;
    color: #4B3E7B;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 14px;
}

/* Loading/Empty */
.fxct-loading,
.fxct-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #9CA3AF;
}

/* Ticket Type Grid (Step 1) */
.fxct-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.fxct-type-card {
    position: relative;
    background: #FFFFFF;
    border: 2px solid rgba(75,62,123,.14);
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.fxct-type-card:hover {
    border-color: #4B3E7B;
    box-shadow: 0 6px 20px rgba(75,62,123,.12);
    transform: translateY(-2px);
}

.fxct-type-selected {
    border-color: #4B3E7B !important;
    background: rgba(75,62,123,.06) !important;
    box-shadow: 0 0 0 3px rgba(75,62,123,.10) !important;
}

.fxct-type-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
}

.fxct-type-label {
    font-size: 14px;
    font-weight: 700;
    color: #1F2937;
}

.fxct-type-sub {
    font-size: 11px;
    font-weight: 500;
    color: #6B7280;
}

@media (max-width: 640px) {
    .fxct-type-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Template Grid */
.fxct-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.fxct-template-card {
    background: #F8F7FF;
    border: 2px solid rgba(75,62,123,.14);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
}

.fxct-template-card:hover {
    border-color: #4B3E7B;
    box-shadow: 0 4px 16px rgba(75,62,123,.12);
    transform: translateY(-2px);
}

.fxct-template-selected {
    border-color: #4B3E7B !important;
    background: rgba(75,62,123,.06) !important;
    box-shadow: 0 0 0 3px rgba(75,62,123,.10) !important;
}

.fxct-template-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.fxct-template-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: #2D2350;
    flex: 1;
}

.fxct-template-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fxct-template-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(75,62,123,.10);
    color: #4B3E7B;
}

.fxct-template-check {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* Customer selection */
.fxct-customer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.fxct-btn-select-customer {
    padding: 10px 20px !important;
    border-radius: 12px !important;
    border: 1.5px solid #4B3E7B !important;
    background: rgba(75,62,123,.06) !important;
    color: #4B3E7B !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    transition: all .18s !important;
    text-transform: uppercase !important;
    height: auto !important;
}

.fxct-btn-select-customer:hover {
    background: rgba(75,62,123,.12) !important;
}

.fxct-customer-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #22C55E;
}

.fxct-readonly {
    background: #F8F7FF !important;
    cursor: not-allowed !important;
}

.fxct-mono {
    font-family: ui-monospace, monospace !important;
}

/* Form elements */
.fxct-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fxct-row:last-child {
    margin-bottom: 0;
}

.fxct-col {
    flex: 1;
    min-width: 200px;
}

.fxct-textarea {
    width: 100%;
    border: 1.5px solid rgba(75,62,123,.18);
    border-radius: 12px;
    padding: 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #2D2350;
    background: #F8F7FF;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color .2s;
}

.fxct-textarea:focus {
    border-color: #4B3E7B;
    box-shadow: 0 0 0 3px rgba(75,62,123,.10);
}

.fxct-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.fxct-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fxct-file-input {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed rgba(75,62,123,.25);
    border-radius: 12px;
    background: #F8F7FF;
    cursor: pointer;
}

.fxct-file-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #22C55E;
}

.fxct-validation {
    font-size: 12px;
    font-weight: 600;
    color: #DC2626;
    margin-top: 8px;
}

/* Actions */
.fxct-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(75,62,123,.10);
    flex-wrap: wrap;
}

.fxct-btn-back {
    border-color: rgba(75,62,123,.30) !important;
    color: #6B7280 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    text-transform: uppercase !important;
    height: auto !important;
}

.fxct-btn-back:hover {
    background: rgba(75,62,123,.06) !important;
}

.fxct-btn-next {
    background: linear-gradient(135deg, #4B3E7B, #7C3AED) !important;
    color: #fff !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 14px rgba(75,62,123,.28) !important;
    height: auto !important;
}

.fxct-btn-next:hover:not(:disabled) {
    filter: brightness(1.08) !important;
}

.fxct-btn-next:disabled {
    opacity: .6 !important;
    cursor: not-allowed !important;
}

.fxct-btn-submit {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    color: #fff !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    padding: 10px 24px !important;
    border-radius: 12px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 14px rgba(34,197,94,.28) !important;
    height: auto !important;
}

.fxct-btn-submit:hover:not(:disabled) {
    filter: brightness(1.08) !important;
}

.fxct-btn-submit:disabled {
    opacity: .6 !important;
    cursor: not-allowed !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 900px) {
    .fxtd-grid {
        grid-template-columns: 1fr;
    }

    .fxct-template-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .fxtd-header-top,
    .fxct-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .fxtd-header-actions,
    .fxct-customer-row,
    .fxct-actions {
        width: 100%;
        flex-direction: column;
    }

    .fxct-row {
        flex-direction: column;
        gap: 0;
    }

    .fxct-col {
        min-width: 100%;
    }

    .fxtk-fd-tiles,
    .fxct-template-grid {
        grid-template-columns: 1fr;
    }
}