/* =========================================================
   TaskTweaky Frontend Task Dashboard — frontend-dashboard.css
   ========================================================= */

:root {
    --ttd-fe-blue:    #1e40af;
    --ttd-fe-blue-l:  #dbeafe;
    --ttd-fe-blue-d:  #1e3a8a;
    --ttd-fe-green:   #16a34a;
    --ttd-fe-green-l: #dcfce7;
    --ttd-fe-orange:  #ea580c;
    --ttd-fe-orange-l:#ffedd5;
    --ttd-fe-purple:  #7c3aed;
    --ttd-fe-purple-l:#ede9fe;
    --ttd-fe-red:     #dc2626;
    --ttd-fe-red-l:   #fee2e2;
    --ttd-fe-yellow:  #d97706;
    --ttd-fe-yellow-l:#fef3c7;
    --ttd-fe-gray:    #374151;
    --ttd-fe-gray-l:  #f9fafb;
    --ttd-fe-gray-m:  #6b7280;
    --ttd-fe-border:  #e5e7eb;
    --ttd-fe-radius:  12px;
    --ttd-fe-shadow:  0 2px 8px rgba(0,0,0,.08);
    --ttd-fe-shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --ttd-fe-font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset Scope ── */
.ttd-fe, .ttd-fe * { box-sizing: border-box; }
.ttd-fe { font-family: var(--ttd-fe-font); color: var(--ttd-fe-gray); line-height: 1.6; }

/* ═══════════════════════════════════
   BUTTONS
═══════════════════════════════════ */
.ttd-fe-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.4;
}
.ttd-fe-btn--primary  { background: var(--ttd-fe-blue); color: #fff; border-color: var(--ttd-fe-blue); }
.ttd-fe-btn--primary:hover { background: var(--ttd-fe-blue-d); border-color: var(--ttd-fe-blue-d); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,64,175,.3); }
.ttd-fe-btn--outline  { background: transparent; color: var(--ttd-fe-blue); border-color: var(--ttd-fe-blue); }
.ttd-fe-btn--outline:hover { background: var(--ttd-fe-blue-l); }
.ttd-fe-btn--ghost    { background: transparent; color: var(--ttd-fe-gray-m); border-color: transparent; font-weight: 500; }
.ttd-fe-btn--ghost:hover  { background: var(--ttd-fe-gray-l); color: var(--ttd-fe-gray); }
.ttd-fe-btn--full  { width: 100%; justify-content: center; }
.ttd-fe-btn--sm    { padding: 6px 12px; font-size: 12px; }
.ttd-fe-btn--lg    { padding: 14px 28px; font-size: 16px; }
.ttd-fe-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.ttd-fe-link { color: var(--ttd-fe-blue); cursor: pointer; text-decoration: underline; }

/* ═══════════════════════════════════
   PANELS
═══════════════════════════════════ */
.ttd-fe-panel {
    background: #fff;
    border: 1px solid var(--ttd-fe-border);
    border-radius: var(--ttd-fe-radius);
    padding: 24px;
    box-shadow: var(--ttd-fe-shadow);
    margin-bottom: 20px;
}
.ttd-fe-panel h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ttd-fe-border);
    color: var(--ttd-fe-blue);
}
.ttd-fe-panel--full { grid-column: 1 / -1; }
.ttd-fe-panel--timeline { border-top: 4px solid var(--ttd-fe-blue); }

/* ═══════════════════════════════════
   BADGES
═══════════════════════════════════ */
.ttd-fe-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: var(--ttd-fe-gray);
    white-space: nowrap;
}
.ttd-fe-badge--lg { font-size: 14px; padding: 6px 16px; }

/* Status */
.ttd-fe-badge--new               { background: #dbeafe; color: #1d4ed8; }
.ttd-fe-badge--awaiting_payment  { background: var(--ttd-fe-yellow-l); color: #92400e; }
.ttd-fe-badge--paid              { background: var(--ttd-fe-green-l); color: #15803d; }
.ttd-fe-badge--in_progress       { background: var(--ttd-fe-purple-l); color: var(--ttd-fe-purple); }
.ttd-fe-badge--waiting_for_client{ background: #fde8d8; color: #c2410c; }
.ttd-fe-badge--ready_for_review  { background: #fae8ff; color: #7e22ce; }
.ttd-fe-badge--completed         { background: var(--ttd-fe-green-l); color: #14532d; }
.ttd-fe-badge--cancelled         { background: var(--ttd-fe-red-l); color: var(--ttd-fe-red); }
/* Payment */
.ttd-fe-badge--pay-pending  { background: var(--ttd-fe-yellow-l); color: #92400e; }
.ttd-fe-badge--pay-paid     { background: var(--ttd-fe-green-l);  color: #15803d; }
.ttd-fe-badge--pay-unpaid   { background: var(--ttd-fe-red-l);    color: var(--ttd-fe-red); }
.ttd-fe-badge--pay-refunded { background: var(--ttd-fe-purple-l); color: var(--ttd-fe-purple); }
/* Priority */
.ttd-fe-badge--pri-standard { background: #e5e7eb; color: #374151; }
.ttd-fe-badge--pri-priority { background: var(--ttd-fe-yellow-l); color: #92400e; }
.ttd-fe-badge--pri-urgent   { background: var(--ttd-fe-red-l);    color: var(--ttd-fe-red); }
/* Warn */
.ttd-fe-badge--warn { background: var(--ttd-fe-yellow-l); color: #92400e; }

/* ═══════════════════════════════════
   NOTICES
═══════════════════════════════════ */
.ttd-fe-notice {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    background: var(--ttd-fe-blue-l);
    border-left: 4px solid var(--ttd-fe-blue);
    color: #1d4ed8;
}
.ttd-fe-notice--error   { background: var(--ttd-fe-red-l);    border-left-color: var(--ttd-fe-red);    color: var(--ttd-fe-red); }
.ttd-fe-notice--success { background: var(--ttd-fe-green-l);  border-left-color: var(--ttd-fe-green);  color: #15803d; }
.ttd-fe-notice--warn    { background: var(--ttd-fe-yellow-l); border-left-color: var(--ttd-fe-yellow); color: #92400e; }

/* ═══════════════════════════════════
   DASHBOARD PAGE
═══════════════════════════════════ */

/* Header */
.ttd-fe-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}
.ttd-fe-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--ttd-fe-blue);
}
.ttd-fe-welcome { margin: 0; color: var(--ttd-fe-gray-m); font-size: 14px; }

/* Summary Cards */
.ttd-fe-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.ttd-fe-stat {
    background: #fff;
    border: 1px solid var(--ttd-fe-border);
    border-radius: var(--ttd-fe-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--ttd-fe-shadow);
    transition: transform .15s;
}
.ttd-fe-stat:hover { transform: translateY(-2px); }
.ttd-fe-stat__num   { font-size: 32px; font-weight: 800; line-height: 1; }
.ttd-fe-stat__label { font-size: 12px; color: var(--ttd-fe-gray-m); margin-top: 4px; font-weight: 500; }
.ttd-fe-stat--blue   { border-top: 3px solid var(--ttd-fe-blue);   } .ttd-fe-stat--blue   .ttd-fe-stat__num { color: var(--ttd-fe-blue); }
.ttd-fe-stat--orange { border-top: 3px solid var(--ttd-fe-orange); } .ttd-fe-stat--orange .ttd-fe-stat__num { color: var(--ttd-fe-orange); }
.ttd-fe-stat--purple { border-top: 3px solid var(--ttd-fe-purple); } .ttd-fe-stat--purple .ttd-fe-stat__num { color: var(--ttd-fe-purple); }
.ttd-fe-stat--green  { border-top: 3px solid var(--ttd-fe-green);  } .ttd-fe-stat--green  .ttd-fe-stat__num { color: var(--ttd-fe-green); }

/* Tabs */
.ttd-fe-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.ttd-fe-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--ttd-fe-gray-l);
    color: var(--ttd-fe-gray-m);
    border: 1px solid var(--ttd-fe-border);
    cursor: pointer;
    transition: all .15s;
}
.ttd-fe-tab--active, .ttd-fe-tab:hover { background: var(--ttd-fe-blue); color: #fff; border-color: var(--ttd-fe-blue); }

/* Empty State */
.ttd-fe-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 2px dashed var(--ttd-fe-border);
    border-radius: var(--ttd-fe-radius);
}
.ttd-fe-empty__icon { font-size: 48px; margin-bottom: 12px; }
.ttd-fe-empty h3    { font-size: 20px; margin-bottom: 8px; color: var(--ttd-fe-gray); }
.ttd-fe-empty p     { color: var(--ttd-fe-gray-m); margin-bottom: 20px; }

/* ── Order Card ── */
.ttd-fe-orders { display: grid; gap: 20px; }
.ttd-fe-order-card {
    background: #fff;
    border: 1px solid var(--ttd-fe-border);
    border-radius: var(--ttd-fe-radius);
    box-shadow: var(--ttd-fe-shadow);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.ttd-fe-order-card:hover { box-shadow: var(--ttd-fe-shadow-lg); transform: translateY(-2px); }
.ttd-fe-order-card.ttd-hidden { display: none; }

.ttd-fe-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ttd-fe-border);
    background: var(--ttd-fe-gray-l);
}
.ttd-fe-card-id { display: flex; align-items: center; gap: 12px; }
.ttd-fe-order-num { font-family: 'Courier New', monospace; font-weight: 700; color: var(--ttd-fe-blue); font-size: 15px; }
.ttd-fe-order-date { font-size: 12px; color: var(--ttd-fe-gray-m); }
.ttd-fe-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.ttd-fe-card-body { padding: 18px 20px; }
.ttd-fe-task-title { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--ttd-fe-gray); }
.ttd-fe-category {
    display: inline-block;
    font-size: 11px;
    background: var(--ttd-fe-blue-l);
    color: var(--ttd-fe-blue);
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 10px;
    font-weight: 600;
}
.ttd-fe-card-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.ttd-fe-meta-item { font-size: 12px; color: var(--ttd-fe-gray-m); display: flex; align-items: center; gap: 4px; }
.ttd-fe-icon { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.ttd-fe-meta-payment.pay-paid     { color: var(--ttd-fe-green); }
.ttd-fe-meta-payment.pay-pending  { color: var(--ttd-fe-yellow); }
.ttd-fe-meta-payment.pay-unpaid   { color: var(--ttd-fe-red); }

/* Progress Steps (card) */
.ttd-fe-progress { padding: 16px 20px; background: var(--ttd-fe-gray-l); border-top: 1px solid var(--ttd-fe-border); }
.ttd-fe-progress-steps {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 0;
}
.ttd-fe-step { display: flex; flex-direction: column; align-items: center; min-width: 80px; position: relative; z-index: 1; }
.ttd-fe-step__dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--ttd-fe-border);
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--ttd-fe-border);
    position: relative;
    transition: all .3s;
}
.ttd-fe-step--done  .ttd-fe-step__dot { background: var(--ttd-fe-green); border-color: var(--ttd-fe-green); }
.ttd-fe-step--done  .ttd-fe-step__dot svg { width: 14px; height: 14px; fill: #fff; }
.ttd-fe-step--current .ttd-fe-step__dot { background: var(--ttd-fe-blue); border-color: var(--ttd-fe-blue); animation: ttd-pulse-ring 1.8s ease-out infinite; }
.ttd-fe-step__label { font-size: 10px; text-align: center; margin-top: 6px; color: var(--ttd-fe-gray-m); font-weight: 500; }
.ttd-fe-step--done  .ttd-fe-step__label { color: var(--ttd-fe-green); }
.ttd-fe-step--current .ttd-fe-step__label { color: var(--ttd-fe-blue); font-weight: 700; }
.ttd-fe-step-line {
    flex: 1;
    height: 2px;
    background: var(--ttd-fe-border);
    margin-top: 14px;
    min-width: 20px;
    transition: background .3s;
}
.ttd-fe-step-line--done { background: var(--ttd-fe-green); }
.ttd-fe-step__pulse {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    display: block;
}

/* Progress bar */
.ttd-fe-progress-bar-wrap {
    margin-top: 14px;
    height: 6px;
    background: var(--ttd-fe-border);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.ttd-fe-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ttd-fe-blue), var(--ttd-fe-purple));
    border-radius: 3px;
    transition: width .5s ease;
}
.ttd-fe-progress-pct { font-size: 11px; color: var(--ttd-fe-gray-m); margin-top: 4px; display: block; text-align: right; }

/* Card Footer */
.ttd-fe-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--ttd-fe-border);
}
.ttd-fe-refresh-btn { font-size: 18px; cursor: pointer; transition: transform .3s; padding: 4px 8px; }
.ttd-fe-refresh-btn.ttd-spinning { animation: ttd-spin .6s linear infinite; }

/* ═══════════════════════════════════
   GUEST LOOKUP
═══════════════════════════════════ */
.ttd-fe-guest { max-width: 480px; margin: 0 auto; }
.ttd-fe-guest-hero { text-align: center; margin-bottom: 28px; padding: 32px 0 0; }
.ttd-fe-guest-icon { font-size: 52px; margin-bottom: 12px; }
.ttd-fe-guest-hero h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; color: var(--ttd-fe-blue); }
.ttd-fe-guest-hero p  { color: var(--ttd-fe-gray-m); }
.ttd-fe-lookup-form { background: #fff; border: 1px solid var(--ttd-fe-border); border-radius: var(--ttd-fe-radius); padding: 28px; box-shadow: var(--ttd-fe-shadow); margin-bottom: 20px; }
.ttd-fe-guest-login { text-align: center; font-size: 13px; color: var(--ttd-fe-gray-m); }
.ttd-fe-lookup-results .ttd-fe-order-card { margin-bottom: 16px; }

/* ═══════════════════════════════════
   ORDER FORM
═══════════════════════════════════ */
.ttd-fe-form-wrap { max-width: 760px; margin: 0 auto; }
.ttd-fe-form-header { text-align: center; margin-bottom: 32px; }
.ttd-fe-form-title { font-size: 28px; font-weight: 800; color: var(--ttd-fe-blue); margin-bottom: 8px; }
.ttd-fe-form-subtitle { color: var(--ttd-fe-gray-m); font-size: 15px; }

/* Multi-step indicator */
.ttd-fe-form-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}
.ttd-fe-form-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ttd-fe-gray-m);
    transition: all .2s;
}
.ttd-fe-form-step--active { color: var(--ttd-fe-blue); }
.ttd-fe-form-step__num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--ttd-fe-border);
    color: var(--ttd-fe-gray-m);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    transition: all .2s;
}
.ttd-fe-form-step--active .ttd-fe-form-step__num { background: var(--ttd-fe-blue); color: #fff; }
.ttd-fe-form-step--done   .ttd-fe-form-step__num { background: var(--ttd-fe-green); color: #fff; }
.ttd-fe-form-step-line { flex: 1; height: 2px; background: var(--ttd-fe-border); max-width: 60px; }

/* Form Sections */
.ttd-fe-form-section { background: #fff; border: 1px solid var(--ttd-fe-border); border-radius: var(--ttd-fe-radius); padding: 28px; box-shadow: var(--ttd-fe-shadow); margin-bottom: 0; }
.ttd-fe-hidden { display: none !important; }
.ttd-fe-section-title { font-size: 18px; font-weight: 700; color: var(--ttd-fe-blue); margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid var(--ttd-fe-border); }

/* Fields */
.ttd-fe-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .ttd-fe-form-grid { grid-template-columns: 1fr; } }
.ttd-fe-field { display: flex; flex-direction: column; gap: 6px; }
.ttd-fe-field--half { grid-column: span 1; }
.ttd-fe-field:not(.ttd-fe-field--half) { grid-column: 1 / -1; }
.ttd-fe-field label { font-size: 13px; font-weight: 600; color: var(--ttd-fe-gray); }
.ttd-fe-required { color: var(--ttd-fe-red); }
.ttd-fe-field input,
.ttd-fe-field select,
.ttd-fe-field textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--ttd-fe-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--ttd-fe-font);
    color: var(--ttd-fe-gray);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
.ttd-fe-field input:focus,
.ttd-fe-field select:focus,
.ttd-fe-field textarea:focus {
    outline: none;
    border-color: var(--ttd-fe-blue);
    box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.ttd-fe-field textarea { resize: vertical; min-height: 120px; }

/* Payment Options */
.ttd-fe-payment-options { display: flex; flex-wrap: wrap; gap: 10px; grid-column: 1 / -1; }
.ttd-fe-payment-option input { display: none; }
.ttd-fe-payment-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 14px 18px;
    border: 2px solid var(--ttd-fe-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
    min-width: 90px;
}
.ttd-fe-payment-option input:checked + .ttd-fe-payment-card {
    border-color: var(--ttd-fe-blue);
    background: var(--ttd-fe-blue-l);
    color: var(--ttd-fe-blue);
}
.ttd-fe-payment-icon { font-size: 22px; }

/* Dropzone */
.ttd-fe-dropzone { border: 2px dashed var(--ttd-fe-border); border-radius: 10px; padding: 30px; text-align: center; transition: all .2s; grid-column: 1 / -1; }
.ttd-fe-dropzone.ttd-drag-over { border-color: var(--ttd-fe-blue); background: var(--ttd-fe-blue-l); }
.ttd-fe-dropzone input { display: none; }
.ttd-fe-dropzone__inner p { margin: 6px 0; color: var(--ttd-fe-gray-m); font-size: 14px; }
.ttd-fe-dropzone__icon { font-size: 36px; margin-bottom: 8px; }
.ttd-fe-dropzone__hint { font-size: 12px !important; }
.ttd-fe-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.ttd-fe-file-chip { background: var(--ttd-fe-gray-l); border: 1px solid var(--ttd-fe-border); border-radius: 20px; padding: 4px 12px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.ttd-fe-file-chip__remove { cursor: pointer; color: var(--ttd-fe-red); font-size: 14px; line-height: 1; }

/* Order Summary Box */
.ttd-fe-order-summary {
    grid-column: 1 / -1;
    background: var(--ttd-fe-blue-l);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 20px;
}
.ttd-fe-order-summary h4 { font-size: 14px; font-weight: 700; color: var(--ttd-fe-blue); margin: 0 0 12px; }
.ttd-fe-summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid #bfdbfe; }
.ttd-fe-summary-row:last-child { border-bottom: 0; }
.ttd-fe-summary-row span { color: var(--ttd-fe-gray-m); }
.ttd-fe-summary-row strong { color: var(--ttd-fe-blue); }

/* Form Nav */
.ttd-fe-form-nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ttd-fe-border); }

/* Success State */
.ttd-fe-success { text-align: center; padding: 48px 24px; background: #fff; border: 1px solid var(--ttd-fe-border); border-radius: var(--ttd-fe-radius); box-shadow: var(--ttd-fe-shadow); }
.ttd-fe-success__icon { font-size: 56px; margin-bottom: 16px; }
.ttd-fe-success h2    { font-size: 24px; font-weight: 800; color: var(--ttd-fe-green); margin-bottom: 12px; }
.ttd-fe-success p     { color: var(--ttd-fe-gray-m); margin-bottom: 8px; }
.ttd-fe-success .ttd-fe-order-num { color: var(--ttd-fe-blue); font-size: 18px; }
.ttd-fe-success .ttd-fe-btn { margin: 8px 4px 0; }

/* ═══════════════════════════════════
   ORDER DETAIL PAGE
═══════════════════════════════════ */
.ttd-fe-back { margin-bottom: 16px; }
.ttd-fe-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid var(--ttd-fe-border);
    border-radius: var(--ttd-fe-radius);
    padding: 20px 24px;
    box-shadow: var(--ttd-fe-shadow);
}
.ttd-fe-detail-header__left h2 { font-size: 22px; font-weight: 800; color: var(--ttd-fe-blue); margin: 0 0 4px; }
.ttd-fe-detail-subtitle { font-size: 13px; color: var(--ttd-fe-gray-m); margin: 0; }
.ttd-fe-detail-header__right { display: flex; align-items: center; gap: 10px; }

/* Timeline */
.ttd-fe-timeline { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding-bottom: 16px; }
.ttd-fe-tl-item { display: flex; flex-direction: column; align-items: center; min-width: 100px; position: relative; }
.ttd-fe-tl-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--ttd-fe-border);
    border: 3px solid var(--ttd-fe-border);
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    transition: all .3s;
}
.ttd-fe-tl-item--done  .ttd-fe-tl-dot { background: var(--ttd-fe-green); border-color: var(--ttd-fe-green); }
.ttd-fe-tl-item--done  .ttd-fe-tl-dot svg { width: 18px; height: 18px; fill: #fff; }
.ttd-fe-tl-item--current .ttd-fe-tl-dot { background: var(--ttd-fe-blue); border-color: var(--ttd-fe-blue); animation: ttd-pulse-ring 1.8s ease-out infinite; }
.ttd-fe-tl-line { flex: 1; height: 3px; background: var(--ttd-fe-border); margin-top: 18px; min-width: 40px; transition: background .3s; }
.ttd-fe-tl-line--done { background: var(--ttd-fe-green); }
.ttd-fe-tl-pulse { width: 16px; height: 16px; background: #fff; border-radius: 50%; display: block; }
.ttd-fe-tl-content { display: flex; flex-direction: column; align-items: center; margin-top: 8px; text-align: center; gap: 2px; }
.ttd-fe-tl-icon  { font-size: 16px; }
.ttd-fe-tl-label { font-size: 11px; color: var(--ttd-fe-gray-m); font-weight: 600; }
.ttd-fe-tl-item--done    .ttd-fe-tl-label   { color: var(--ttd-fe-green); }
.ttd-fe-tl-item--current .ttd-fe-tl-label   { color: var(--ttd-fe-blue); font-weight: 700; }
.ttd-fe-tl-current-tag { font-size: 10px; color: var(--ttd-fe-blue); background: var(--ttd-fe-blue-l); border-radius: 4px; padding: 2px 6px; font-weight: 700; }

/* Detail Grid */
.ttd-fe-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 768px) { .ttd-fe-detail-grid { grid-template-columns: 1fr; } }

/* DL */
.ttd-fe-dl { display: grid; grid-template-columns: 130px 1fr; gap: 4px; margin: 0; }
.ttd-fe-dl dt { font-size: 12px; font-weight: 600; color: var(--ttd-fe-gray-m); padding: 8px 0; border-bottom: 1px solid var(--ttd-fe-gray-l); text-transform: uppercase; letter-spacing: .03em; }
.ttd-fe-dl dd { font-size: 14px; color: var(--ttd-fe-gray); padding: 8px 0 8px 12px; border-bottom: 1px solid var(--ttd-fe-gray-l); margin: 0; }
.ttd-fe-description { font-size: 13px; line-height: 1.7; grid-column: 1 / -1; background: var(--ttd-fe-gray-l); border-radius: 6px; padding: 10px 12px; margin-top: 4px; }
.ttd-fe-payment-notice { grid-column: 1 / -1; background: var(--ttd-fe-yellow-l); border: 1px solid #fde68a; border-radius: 6px; padding: 10px 12px; font-size: 13px; color: #92400e; }

/* Files Grid */
.ttd-fe-files-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.ttd-fe-file-card { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--ttd-fe-gray-l); border: 1px solid var(--ttd-fe-border); border-radius: 10px; padding: 16px; max-width: 140px; text-align: center; transition: box-shadow .2s; }
.ttd-fe-file-card:hover { box-shadow: var(--ttd-fe-shadow-lg); }
.ttd-fe-file-thumb-link { display: block; }
.ttd-fe-file-thumb { width: 100px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--ttd-fe-border); }
.ttd-fe-file-icon-wrap { font-size: 36px; }
.ttd-fe-file-name { font-size: 11px; word-break: break-all; color: var(--ttd-fe-blue); }

/* Activity */
.ttd-fe-activity { display: flex; flex-direction: column; gap: 0; }
.ttd-fe-activity-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ttd-fe-border); }
.ttd-fe-activity-item:last-child { border-bottom: 0; }
.ttd-fe-activity-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ttd-fe-blue); flex-shrink: 0; margin-top: 5px; }
.ttd-fe-activity-content { flex: 1; font-size: 13px; }
.ttd-fe-activity-content strong { display: block; color: var(--ttd-fe-gray); font-weight: 600; }
.ttd-fe-activity-detail { display: block; color: var(--ttd-fe-gray-m); }
.ttd-fe-activity-time { font-size: 11px; color: var(--ttd-fe-gray-m); margin-top: 2px; display: block; }

/* ═══════════════════════════════════
   ANIMATIONS
═══════════════════════════════════ */
@keyframes ttd-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(30,64,175,.4); }
    70%  { box-shadow: 0 0 0 10px rgba(30,64,175,0); }
    100% { box-shadow: 0 0 0 0 rgba(30,64,175,0); }
}
@keyframes ttd-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 768px) {
    .ttd-fe-header     { flex-direction: column; }
    .ttd-fe-form-steps { overflow-x: auto; }
    .ttd-fe-tl-item    { min-width: 80px; }
    .ttd-fe-detail-header { flex-direction: column; }
    .ttd-fe-dl { grid-template-columns: 100px 1fr; }
}

/* ═══════════════════════════════════
   TT PAYMENTS — PAY NOW BUTTON
═══════════════════════════════════ */
.ttd-fe-btn--pay {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    border-color: #16a34a;
}
.ttd-fe-btn--pay:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    border-color: #15803d;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22,163,74,.35);
}
.ttd-pay-btn--disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ═══════════════════════════════════
   PAYMENT-REQUIRED NOTICE (order form)
═══════════════════════════════════ */
.ttd-fe-payment-required-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--ttd-fe-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.ttd-fe-payment-required-notice__icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}
.ttd-fe-payment-required-notice p {
    margin: 4px 0 0;
    color: #92400e;
    font-size: 14px;
    line-height: 1.5;
}

/* ═══════════════════════════════════
   TT PAYMENTS PANEL (dashboard + detail)
═══════════════════════════════════ */
.ttd-fe-ttp-panel {
    border: 2px solid #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    margin-bottom: 28px;
}
.ttd-fe-ttp-panel__header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.ttd-fe-ttp-panel__icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}
.ttd-fe-ttp-panel__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #14532d;
}
.ttd-fe-ttp-panel__desc {
    margin: 0;
    color: #166534;
    font-size: 14px;
    line-height: 1.6;
}
.ttd-fe-ttp-panel__gateways {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.ttd-fe-ttp-panel__note {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
}
.ttd-fe-ttp-panel__orders {
    border-top: 1px solid #bbf7d0;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ttd-fe-ttp-order-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    flex-wrap: wrap;
}
.ttd-fe-ttp-order-title {
    flex: 1;
    color: var(--ttd-fe-gray);
    font-weight: 500;
}

/* Inline payment panel on order cards */
.ttd-fe-payment-panel {
    border-top: 1px solid #bbf7d0;
    background: #f0fdf4;
    padding: 14px 18px;
}
.ttd-fe-payment-panel__label {
    margin: 0 0 10px;
    font-size: 13px;
    color: #15803d;
}
.ttd-fe-payment-panel__gateways {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ═══════════════════════════════════
   BADGE — AWAITING CONFIRMATION
═══════════════════════════════════ */
.ttd-fe-badge--pay-awaiting_confirmation {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.ttd-fe-badge--awaiting_payment {
    background: #fef3c7;
    color: #92400e;
}

/* ═══════════════════════════════════
   RESPONSIVE — PAYMENTS
═══════════════════════════════════ */
@media (max-width: 600px) {
    .ttd-fe-ttp-panel__header { flex-direction: column; }
    .ttd-fe-ttp-panel__gateways { flex-direction: column; }
    .ttd-fe-payment-panel__gateways { flex-direction: column; }
    .ttd-fe-payment-required-notice { flex-direction: column; }
}

/* ═══════════════════════════════════
   QUOTE-FIRST WORKFLOW STEPS BANNER
   (shown at top of submit form)
═══════════════════════════════════ */
.ttd-fe-workflow-steps {
    display: flex;
    align-items: center;
    gap: 0;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--ttd-fe-radius);
    padding: 20px 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 8px;
}
.ttd-fe-workflow-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 140px;
}
.ttd-fe-workflow-step__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e40af;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.ttd-fe-workflow-step__content {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.ttd-fe-workflow-step__content strong {
    font-size: 13px;
    color: #1e3a8a;
}
.ttd-fe-workflow-step__content span {
    font-size: 11px;
    color: #3b82f6;
}
.ttd-fe-workflow-arrow {
    font-size: 18px;
    color: #93c5fd;
    font-weight: 700;
    padding: 0 4px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════
   QUOTE NOTICE (step 3 of submit form)
═══════════════════════════════════ */
.ttd-fe-quote-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--ttd-fe-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.ttd-fe-quote-notice__icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}
.ttd-fe-quote-notice p {
    margin: 4px 0 0;
    color: #166534;
    font-size: 14px;
    line-height: 1.5;
}
.ttd-fe-quote-notice strong {
    color: #14532d;
}

/* ═══════════════════════════════════
   NEW STATUS BADGES
═══════════════════════════════════ */
.ttd-fe-badge--new,
.ttd-fe-badge--under_review {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
.ttd-fe-badge--quote_sent {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.ttd-fe-badge--quote_approved {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}
.ttd-fe-badge--awaiting_payment {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ═══════════════════════════════════
   RESPONSIVE — WORKFLOW STEPS
═══════════════════════════════════ */
@media (max-width: 640px) {
    .ttd-fe-workflow-steps  { flex-direction: column; }
    .ttd-fe-workflow-arrow  { transform: rotate(90deg); }
    .ttd-fe-quote-notice    { flex-direction: column; }
}
