/* ===================================================
   DIAGRAM TICKET STYLES  –  Prefix: fxdt-
   =================================================== */

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

/* ===== Stats strip ===== */
.fxdt-stats-strip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 0 0;
    margin-top: 14px;
    border-top: 1px solid rgba(75,62,123,.15);
    flex-wrap: wrap;
    row-gap: 8px;
}

.fxdt-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.fxdt-stat-num {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: #2D2350;
    line-height: 1;
}

.fxdt-stat-green  { color: #4ADE80 !important; }
.fxdt-stat-gray   { color: #94A3B8 !important; }
.fxdt-stat-teal   { color: #22D3EE !important; }
.fxdt-stat-orange { color: #FB923C !important; }

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

.fxdt-stat-div {
    width: 1px;
    height: 28px;
    background: rgba(75,62,123,.15);
    flex-shrink: 0;
}

/* ===== Toolbar ===== */
.fxdt-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;
}

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

.fxdt-search-wrap:focus-within {
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14,165,233,.10);
}

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

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

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

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

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

.fxdt-filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fxdt-fpill {
    padding: 6px 14px !important;
    border-radius: 999px !important;
    border: 1.5px solid rgba(14,165,233,.20) !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;
}

.fxdt-fpill:hover {
    border-color: #0EA5E9 !important;
    color: #0EA5E9 !important;
}

.fxdt-fpill-on {
    background: #0EA5E9 !important;
    border-color: #0EA5E9 !important;
    color: #fff !important;
}

.fxdt-fpill-active.fxdt-fpill-on {
    background: #22C55E !important;
    border-color: #22C55E !important;
}

.fxdt-fpill-inactive.fxdt-fpill-on {
    background: #94A3B8 !important;
    border-color: #94A3B8 !important;
}

/* Priority filter pills */
.fxdt-pf-p0.fxdt-fpill-on { background: #EF4444 !important; border-color: #EF4444 !important; }
.fxdt-pf-p1.fxdt-fpill-on { background: #F97316 !important; border-color: #F97316 !important; }
.fxdt-pf-p2.fxdt-fpill-on { background: #EAB308 !important; border-color: #EAB308 !important; }
.fxdt-pf-p3.fxdt-fpill-on { background: #22C55E !important; border-color: #22C55E !important; }

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

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

.fxdt-empty-title {
    font-weight: 800;
    font-size: 18px;
    color: #0F2942;
}

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

/* ===== Card Grid ===== */
.fxdt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    padding: 0;
}

/* ===== Template Card ===== */
.fxdt-card {
    background: #fff !important;
    border-radius: 20px !important;
    border: 1.5px solid rgba(14,165,233,.12) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.06) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transition: box-shadow .2s, border-color .2s, transform .2s !important;
}

.fxdt-card:hover {
    box-shadow: 0 10px 36px rgba(14,165,233,.14) !important;
    border-color: rgba(14,165,233,.28) !important;
    transform: translateY(-2px) !important;
}

.fxdt-card-inactive {
    opacity: .60;
}

/* Priority top stripe */
.fxdt-card-stripe {
    height: 4px;
    flex-shrink: 0;
}

.fxdt-stripe-p0 { background: linear-gradient(90deg, #EF4444, #F87171); }
.fxdt-stripe-p1 { background: linear-gradient(90deg, #F97316, #FB923C); }
.fxdt-stripe-p2 { background: linear-gradient(90deg, #EAB308, #FDE047); }
.fxdt-stripe-p3 { background: linear-gradient(90deg, #22C55E, #4ADE80); }

.fxdt-card-body {
    flex: 1;
    padding: 16px 18px 14px;
}

.fxdt-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.fxdt-card-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 15px;
    color: #0F2942;
    flex: 1;
}

.fxdt-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.fxdt-badge-active {
    background: rgba(34,197,94,.10);
    color: #16A34A;
    border: 1px solid rgba(34,197,94,.25);
}

.fxdt-badge-inactive {
    background: rgba(156,163,175,.12);
    color: #6B7280;
    border: 1px solid rgba(156,163,175,.25);
}

/* Chips */
.fxdt-card-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fxdt-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: #F3F4F6;
    color: #6B7280;
    border: 1px solid rgba(0,0,0,.06);
}

.fxdt-chip-fields {
    background: rgba(14,165,233,.08);
    color: #0EA5E9;
    border-color: rgba(14,165,233,.18);
}

.fxdt-chip-workflow {
    background: rgba(99,102,241,.08);
    color: #6366F1;
    border-color: rgba(99,102,241,.18);
}

.fxdt-chip-outage {
    background: rgba(249,115,22,.08);
    color: #F97316;
    border-color: rgba(249,115,22,.18);
}

.fxdt-chip-p-p0 {
    background: rgba(239,68,68,.10);
    color: #DC2626;
    border-color: rgba(239,68,68,.22);
}

.fxdt-chip-p-p1 {
    background: rgba(249,115,22,.10);
    color: #EA580C;
    border-color: rgba(249,115,22,.22);
}

.fxdt-chip-p-p2 {
    background: rgba(234,179,8,.10);
    color: #CA8A04;
    border-color: rgba(234,179,8,.22);
}

.fxdt-chip-p-p3 {
    background: rgba(34,197,94,.10);
    color: #16A34A;
    border-color: rgba(34,197,94,.22);
}

/* Fields preview */
.fxdt-fields-preview {
    background: #F8FBFF;
    border: 1px solid rgba(14,165,233,.12);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fxdt-fp-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'Poppins', sans-serif;
}

.fxdt-fp-icon {
    flex-shrink: 0;
    color: #0EA5E9 !important;
    font-size: 14px !important;
}

.fxdt-fp-key {
    font-family: ui-monospace, monospace;
    font-size: 10px;
    color: #6B7280;
    background: #E5E7EB;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.fxdt-fp-label {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.fxdt-fp-req {
    color: #EF4444;
    font-weight: 900;
    font-size: 13px;
    flex-shrink: 0;
}

.fxdt-fp-more {
    font-size: 10px;
    font-weight: 700;
    color: #9CA3AF;
    text-align: center;
    padding-top: 2px;
}

.fxdt-no-fields {
    font-size: 12px;
    color: #D1D5DB;
    font-weight: 600;
    text-align: center;
    padding: 12px 0;
    font-style: italic;
}

/* Card footer */
.fxdt-card-footer {
    display: flex;
    border-top: 1px solid rgba(0,0,0,.06);
    flex-shrink: 0;
}

.fxdt-cfa {
    flex: 1 !important;
    padding: 10px !important;
    border: none !important;
    background: transparent !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background .18s !important;
    border-right: 1px solid rgba(0,0,0,.05) !important;
    color: #6B7280 !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
    height: auto !important;
    min-height: 44px !important;
}

.fxdt-cfa:last-child {
    border-right: none !important;
}

.fxdt-cfa-edit:hover {
    background: rgba(14,165,233,.07) !important;
    color: #0EA5E9 !important;
}

.fxdt-cfa-disable:hover {
    background: rgba(239,68,68,.07) !important;
    color: #EF4444 !important;
}

.fxdt-cfa-enable:hover {
    background: rgba(34,197,94,.07) !important;
    color: #16A34A !important;
}

.fxdt-cfa-delete:hover {
    background: rgba(239,68,68,.07) !important;
    color: #EF4444 !important;
}

/* ===== Delete overlay ===== */
.fxdt-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fxdt-delete-box {
    background: #fff;
    border-radius: 24px;
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    animation: fxdt-pop .2s ease-out;
}

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

.fxdt-del-icon {
    font-size: 48px !important;
    margin-bottom: 12px;
    color: #EF4444 !important;
}

.fxdt-del-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: #0F2942;
    margin-bottom: 10px;
}

.fxdt-del-msg {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.fxdt-del-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.fxdt-del-cancel {
    padding: 10px 24px !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(14,165,233,.25) !important;
    background: transparent !important;
    color: #6B7280 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: background .18s !important;
    text-transform: uppercase !important;
    height: auto !important;
}

.fxdt-del-cancel:hover {
    background: #F3F4F6 !important;
}

.fxdt-del-confirm {
    padding: 10px 24px !important;
    border-radius: 12px !important;
    border: none !important;
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
    color: #fff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(239,68,68,.35) !important;
    transition: filter .18s !important;
    text-transform: uppercase !important;
    height: auto !important;
}

.fxdt-del-confirm:hover:not(:disabled) {
    filter: brightness(1.08) !important;
}

.fxdt-del-confirm:disabled {
    opacity: .6 !important;
    cursor: not-allowed !important;
}

/* ===================================================
   DIALOG STYLES
   =================================================== */
.fxdt-dialog .mud-dialog {
    border: 2px solid #0EA5E9 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 30px 80px rgba(14,165,233,.22) !important;
    max-height: 94vh !important;
    max-width: 1400px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

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

.fxdt-dialog .mud-dialog-title {
    display: none !important;
}

/* Dialog header */
.fxdt-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 24px 16px !important;
    background: linear-gradient(135deg, #0F2942 0%, #1A3A5C 60%, #0EA5E9 100%) !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.fxdt-header-glow {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(14,165,233,.4) 0%, transparent 70%);
    pointer-events: none;
}

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

.fxdt-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;
}

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

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

.fxdt-field-counter {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.20);
    border-radius: 14px;
    padding: 8px 18px;
    flex-shrink: 0;
}

.fxdt-counter-num {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    line-height: 1;
}

.fxdt-counter-lbl {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Tabs */
.fxdt-tabs {
    display: flex;
    gap: 0;
    padding: 0 24px;
    border-bottom: 2px solid rgba(14,165,233,.12);
    background: #FAFEFF;
    flex-shrink: 0;
}

.fxdt-tab {
    padding: 12px 20px !important;
    border: none !important;
    background: transparent !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #6B7280 !important;
    cursor: pointer !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -2px !important;
    transition: color .18s, border-color .18s !important;
    white-space: nowrap !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
    height: auto !important;
    min-height: unset !important;
}

.fxdt-tab:hover {
    color: #0EA5E9 !important;
}

.fxdt-tab-on {
    color: #0EA5E9 !important;
    border-bottom-color: #0EA5E9 !important;
}

/* Error banner */
.fxdt-error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.22);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #DC2626;
    margin: 12px 24px 0;
    flex-shrink: 0;
}

/* Dialog body */
.fxdt-body {
    flex: 1;
    overflow-y: auto;
}

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

.fxdt-body::-webkit-scrollbar-thumb {
    background: rgba(14,165,233,.2);
    border-radius: 2px;
}

/* Sections */
.fxdt-section {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(14,165,233,.08);
}

.fxdt-section-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 11px;
    color: #0EA5E9;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 12px;
}

/* Row/col helpers */
.fxdt-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

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

.fxdt-col {
    flex: 1;
    min-width: 140px;
}

.fxdt-col-grow {
    flex: 2;
    min-width: 200px;
}

.fxdt-col-160 {
    flex: 0 0 160px;
    min-width: 0;
}

.fxdt-col-200 {
    flex: 0 0 220px;
    min-width: 0;
}

/* Toggle */
.fxdt-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1.5px solid rgba(14,165,233,.15);
    background: #F8FBFF;
    transition: border-color .2s;
}

.fxdt-toggle-wrap:hover {
    border-color: #0EA5E9;
}

.fxdt-toggle {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #D1D5DB;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}

.fxdt-toggle-on {
    background: #0EA5E9;
}

.fxdt-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: left .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.fxdt-toggle-on .fxdt-toggle-thumb {
    left: 21px;
}

.fxdt-toggle-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #0F2942;
}

.fxdt-toggle-sub {
    font-size: 10px;
    color: #9CA3AF;
    font-weight: 500;
}

/* Priority guide */
.fxdt-priority-guide {
    background: #F8FBFF;
}

.fxdt-priority-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fxdt-p-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    transition: all .18s;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
    flex: 1;
    min-width: 120px;
}

.fxdt-p-card:hover {
    border-color: rgba(14,165,233,.3);
}

.fxdt-p-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fxdt-p-selected {
    border-color: currentColor !important;
}

.fxdt-p-p0 { color: #DC2626; }
.fxdt-p-p0 .fxdt-p-dot { background: #EF4444; }
.fxdt-p-p1 { color: #EA580C; }
.fxdt-p-p1 .fxdt-p-dot { background: #F97316; }
.fxdt-p-p2 { color: #CA8A04; }
.fxdt-p-p2 .fxdt-p-dot { background: #EAB308; }
.fxdt-p-p3 { color: #16A34A; }
.fxdt-p-p3 .fxdt-p-dot { background: #22C55E; }

/* ===== Fields tab ===== */
.fxdt-fields-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 10px;
}

.fxdt-fields-count {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
}

.fxdt-add-field-btn {
    padding: 7px 16px !important;
    border-radius: 10px !important;
    border: 1.5px solid #0EA5E9 !important;
    background: rgba(14,165,233,.06) !important;
    color: #0EA5E9 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    transition: background .18s !important;
    text-transform: uppercase !important;
    height: auto !important;
}

.fxdt-add-field-btn:hover {
    background: rgba(14,165,233,.14) !important;
}

.fxdt-fields-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 24px 16px;
    padding: 20px;
    border-radius: 14px;
    background: #F8FBFF;
    border: 1.5px dashed rgba(14,165,233,.22);
    font-size: 13px;
    font-weight: 600;
    color: #9CA3AF;
}

.fxdt-fields-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 24px 16px;
}

/* Field card */
.fxdt-field-card {
    background: #F8FBFF;
    border: 1.5px solid rgba(14,165,233,.14);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .2s;
}

.fxdt-fc-open {
    border-color: #0EA5E9 !important;
    box-shadow: 0 0 0 3px rgba(14,165,233,.08);
}

/* Field card header */
.fxdt-fc-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    transition: background .18s;
}

.fxdt-fc-hdr:hover {
    background: rgba(14,165,233,.04);
}

.fxdt-fc-order {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0EA5E9, #38BDF8);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fxdt-fc-hdr-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.fxdt-ftype-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: ui-monospace, monospace;
    font-size: 10px;
    font-weight: 900;
    background: rgba(14,165,233,.12);
    color: #0EA5E9;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(14,165,233,.2);
    flex-shrink: 0;
    white-space: nowrap;
}

.fxdt-fc-key {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: #6B7280;
    background: #E5E7EB;
    padding: 1px 7px;
    border-radius: 5px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fxdt-fc-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.fxdt-fc-hdr-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.fxdt-req-tag {
    font-size: 9px;
    font-weight: 800;
    color: #EF4444;
    background: rgba(239,68,68,.1);
    padding: 2px 7px;
    border-radius: 999px;
}

.fxdt-hidden-tag {
    font-size: 9px;
    font-weight: 800;
    color: #9CA3AF;
    background: #F3F4F6;
    padding: 2px 7px;
    border-radius: 999px;
}

.fxdt-fc-move {
    color: #9CA3AF !important;
}

.fxdt-fc-move:hover:not(:disabled) {
    color: #0EA5E9 !important;
}

.fxdt-fc-move:disabled {
    opacity: .3 !important;
    cursor: not-allowed !important;
}

.fxdt-fc-del {
    color: #9CA3AF !important;
}

.fxdt-fc-del:hover {
    color: #EF4444 !important;
}

.fxdt-fc-chevron {
    color: #9CA3AF !important;
    font-size: 18px !important;
    transition: transform .2s;
}

.fxdt-chev-up {
    transform: rotate(180deg);
}

/* Field card body */
.fxdt-fc-body {
    padding: 4px 16px 16px;
    border-top: 1px solid rgba(14,165,233,.10);
    background: #fff;
}

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

.fxdt-rtl {
    direction: rtl;
    text-align: right;
}

.fxdt-key-hint {
    font-size: 10px;
    color: #9CA3AF;
    font-weight: 500;
    margin-left: 6px;
    font-style: italic;
}

/* Dropdown options section */
.fxdt-options-section {
    margin-top: 12px;
    padding: 14px;
    background: #F0F9FF;
    border: 1.5px solid rgba(14,165,233,.15);
    border-radius: 12px;
}

.fxdt-options-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.fxdt-options-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 11px;
    color: #0EA5E9;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.fxdt-opt-add-btn {
    padding: 5px 12px !important;
    border-radius: 8px !important;
    border: 1px solid #0EA5E9 !important;
    background: rgba(14,165,233,.08) !important;
    color: #0EA5E9 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    transition: background .18s !important;
    text-transform: uppercase !important;
    height: auto !important;
    min-height: unset !important;
}

.fxdt-opt-add-btn:hover {
    background: rgba(14,165,233,.16) !important;
}

.fxdt-opts-empty {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 600;
    padding: 8px 0;
    text-align: center;
}

.fxdt-opts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fxdt-opt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    border: 1px solid rgba(14,165,233,.12);
}

.fxdt-opt-num {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 11px;
    color: #0EA5E9;
    width: 16px;
    flex-shrink: 0;
    text-align: center;
}

.fxdt-opt-input {
    flex: 1;
    min-width: 60px;
    border: 1px solid rgba(14,165,233,.18);
    border-radius: 7px;
    padding: 5px 9px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #0F2942;
    background: #F8FBFF;
    outline: none;
    transition: border-color .18s;
}

.fxdt-opt-input:focus {
    border-color: #0EA5E9;
}

.fxdt-opt-toggle {
    cursor: pointer;
    flex-shrink: 0;
}

.fxdt-mini-toggle {
    width: 30px;
    height: 16px;
    border-radius: 999px;
    background: #D1D5DB;
    position: relative;
    transition: background .2s;
}

.fxdt-mt-on {
    background: #0EA5E9;
}

.fxdt-mt-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.fxdt-mt-on .fxdt-mt-thumb {
    left: 16px;
}

.fxdt-opt-del {
    flex-shrink: 0;
    color: #9CA3AF !important;
}

.fxdt-opt-del:hover {
    color: #EF4444 !important;
}

/* Flags row */
.fxdt-flags-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.fxdt-flag-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(14,165,233,.14);
    background: #F8FBFF;
    cursor: pointer;
    transition: border-color .18s;
    flex: 1;
    min-width: 120px;
}

.fxdt-flag-toggle:hover {
    border-color: #0EA5E9;
}

.fxdt-flag-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(14,165,233,.12);
    color: #0EA5E9;
    font-size: 11px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .18s;
}

.fxdt-flag-gray {
    background: #E5E7EB !important;
    color: #6B7280 !important;
}

.fxdt-flag-on {
    background: #0EA5E9 !important;
    color: #fff !important;
}

.fxdt-flag-gray.fxdt-flag-on {
    background: #6B7280 !important;
    color: #fff !important;
}

.fxdt-flag-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #0F2942;
}

.fxdt-flag-sub {
    font-size: 10px;
    color: #9CA3AF;
    font-weight: 500;
}

/* Loading inline */
.fxdt-loading-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    padding: 10px 0;
}

/* Dialog footer */
.fxdt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid rgba(14,165,233,.10);
    background: #FAFEFF;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}

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

.fxdt-btn-next {
    background: linear-gradient(135deg, #0EA5E9, #38BDF8) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    padding: 0 20px !important;
    height: 38px !important;
    border: none !important;
    text-transform: uppercase !important;
}

.fxdt-btn-back {
    color: #0EA5E9 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .fxdt-grid {
        padding: 0;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .fxdt-dialog .mud-dialog {
        max-width: 95vw !important;
    }
}

@media (max-width: 640px) {
    .fxdt-stats-strip {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

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

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

    .fxdt-filter-group {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .fxdt-priority-grid {
        flex-direction: column;
    }

    .fxdt-flags-row {
        flex-direction: column;
    }

    .fxdt-opt-row {
        flex-wrap: wrap;
    }

    .fxdt-opt-input {
        min-width: 80px;
    }

    .fxdt-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .fxdt-footer {
        flex-direction: column;
    }

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

    .fxdt-col-160,
    .fxdt-col-200 {
        flex: 1;
    }

    .fxdt-dialog .mud-dialog {
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
}