/**
 * AI Tuning Master - Frontend Styles
 * 
 * Desktop-only layout (≥800px). Vending-machine UX.
 * No recognition data exposed. Clean, professional.
 *
 * @package AI_Tuning_Master
 * @version 1.0.0
 */

/* Hide shell topbar — the shortcode has its own header */
.atm-topbar { display: none !important; }

/* ==========================================================================
   CSS Variables (Theme)
   ========================================================================== */
:root {
    --atm-primary: #00a9e0;
    --atm-primary-hover: #0090c0;
    --atm-primary-light: #e0f4fb;
    --atm-success: #16a34a;
    --atm-success-light: #dcfce7;
    --atm-warning: #d97706;
    --atm-warning-light: #fef3c7;
    --atm-danger: #dc2626;
    --atm-danger-light: #fee2e2;
    --atm-info: #2563eb;
    --atm-info-light: #dbeafe;

    --atm-text: #394049;
    --atm-text-muted: #64748b;
    --atm-text-light: #94a3b8;

    --atm-bg: #ffffff;
    --atm-bg-subtle: #f8fafc;
    --atm-bg-muted: #f1f5f9;

    --atm-border: #c3c4c7;
    --atm-border-focus: #00a9e0;

    --atm-radius: 8px;
    --atm-radius-sm: 4px;
    --atm-radius-lg: 12px;

    --atm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --atm-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --atm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --atm-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --atm-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

    --atm-transition: 150ms ease;
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */
.atm-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px;
    font-family: var(--atm-font);
    color: var(--atm-text);
    line-height: 1.5;
    box-sizing: border-box;
}

.atm-container *, .atm-container *::before, .atm-container *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Header
   ========================================================================== */
.atm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--atm-border);
}

.atm-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--atm-text);
}

.atm-credits-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--atm-primary-light);
    border-radius: var(--atm-radius);
    font-weight: 600;
}

.atm-credits-label {
    color: var(--atm-text-muted);
    font-size: 0.875rem;
}

.atm-credits-value {
    color: var(--atm-primary);
    font-size: 1.125rem;
    font-weight: 700;
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.atm-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--atm-border);
    margin-bottom: 24px;
}

.atm-tab {
    position: relative;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--atm-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color var(--atm-transition), border-color var(--atm-transition);
}

.atm-tab:hover {
    color: var(--atm-text);
}

.atm-tab.active {
    color: var(--atm-primary);
    border-bottom-color: var(--atm-primary);
    font-weight: 600;
}

/* Notification badge on tabs */
.atm-tab-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: var(--atm-danger);
    border-radius: 9px;
    pointer-events: none;
    animation: atm-badge-pop 0.3s ease;
}

@keyframes atm-badge-pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.atm-tab-content {
    display: none;
}

.atm-tab-content.active {
    display: block;
}

/* ==========================================================================
   Steps / Sections
   ========================================================================== */
.atm-step {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--atm-bg);
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-lg);
}

.atm-step h3 {
    margin: 0 0 12px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--atm-text);
}

.atm-step .description {
    margin: 0 0 16px;
    color: var(--atm-text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   Inline Numbered Steps (inside single card)
   ========================================================================== */
.atm-inline-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.atm-step-badge {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--atm-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.atm-step-body {
    flex: 1;
    min-width: 0;
}

.atm-step-label {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--atm-text);
    line-height: 32px;  /* vertically align with badge */
}

.atm-step-divider {
    height: 1px;
    background: var(--atm-border);
    margin: 24px 0 24px 48px;  /* indent past the badge column */
}

/* ==========================================================================
   Vehicle Type Toggle
   ========================================================================== */
/* ==========================================================================
   Vehicle Type Gate (inside solutions step)
   ========================================================================== */
.atm-vehicle-type-gate {
    margin-bottom: 20px;
}

.atm-vehicle-type-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 2px solid var(--atm-primary);
    border-radius: var(--atm-radius);
    background: color-mix(in srgb, var(--atm-primary) 6%, var(--atm-bg));
    animation: atm-pulse-border 2s ease-in-out infinite;
}

@keyframes atm-pulse-border {
    0%, 100% { border-color: var(--atm-primary); }
    50% { border-color: color-mix(in srgb, var(--atm-primary) 40%, transparent); }
}

.atm-vt-step-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 32px;
    border-radius: var(--atm-radius);
    background: var(--atm-primary);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: var(--atm-font);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.atm-vt-arrow {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: var(--atm-primary);
    animation: atm-nudge-right 1.2s ease-in-out infinite;
}

@keyframes atm-nudge-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

.atm-vt-selector {
    flex: 1;
}

.atm-vt-selector > label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--atm-text);
}

.atm-vt-selector .atm-select {
    width: 100%;
    max-width: 280px;
    padding: 10px 14px;
    font-size: 0.9375rem;
    font-family: var(--atm-font);
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    background: var(--atm-bg);
    color: var(--atm-text);
    cursor: pointer;
    transition: border-color var(--atm-transition);
}

.atm-vt-selector .atm-select:focus {
    border-color: var(--atm-primary);
    outline: none;
}

/* Resolved state — collapse after selection */
.atm-vt-resolved .atm-vehicle-type-prompt {
    animation: none;
    border-color: var(--atm-border);
    background: var(--atm-bg);
    padding: 10px 16px;
}

.atm-vt-resolved .atm-vt-arrow {
    animation: none;
    color: var(--atm-text-muted);
    font-size: 1rem;
}

.atm-vt-resolved .atm-vt-step-badge {
    background: var(--atm-text-muted);
    min-width: 44px;
    height: 26px;
    font-size: 0.6875rem;
}

/* Locked solutions overlay — blocks interaction until vehicle type selected */
.atm-solutions-locked {
    position: relative;
    pointer-events: none;
    opacity: 0.35;
    filter: grayscale(0.3);
    user-select: none;
}

/* ==========================================================================
   Group Labels
   ========================================================================== */
.atm-group-label {
    display: block;
    margin: 12px 0 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--atm-text);
}

/* ==========================================================================
   Services Section (read-only list)
   ========================================================================== */
.atm-services-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--atm-border);
}

.atm-service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.9375rem;
    color: var(--atm-text);
}

.atm-service-bullet {
    color: var(--atm-success);
    font-size: 0.625rem;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.atm-form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.atm-form-field {
    flex: 1;
}

.atm-form-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--atm-text);
}

.atm-form-field input[type="text"],
.atm-form-field select,
.atm-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9375rem;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    background: var(--atm-bg);
    color: var(--atm-text);
    transition: border-color var(--atm-transition), box-shadow var(--atm-transition);
}

.atm-form-field input[type="text"]:focus,
.atm-form-field select:focus,
.atm-form-field textarea:focus {
    outline: none;
    border-color: var(--atm-border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.atm-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* ==========================================================================
   Number Plate Rego Input
   ========================================================================== */
.atm-rego-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.atm-rego-state-wrap {
    flex-shrink: 0;
    width: 90px;
}

.atm-rego-state-wrap select {
    width: 100%;
    padding: 14px 8px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    background: var(--atm-bg);
    color: var(--atm-text);
    cursor: pointer;
}

.atm-rego-state-wrap select:focus {
    outline: none;
    border-color: var(--atm-primary);
}

.atm-plate-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.atm-plate-body {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #111;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 3px 10px 8px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.2);
}

.atm-plate-state-label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #666;
    padding: 2px 0 0;
    user-select: none;
}

.atm-plate-body input[type="text"] {
    width: 10ch;
    padding: 0;
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Bahnschrift Condensed', 'Arial Narrow', 'Franklin Gothic Demi Cond', sans-serif;
    font-stretch: condensed;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    background: transparent;
    color: #ffffff;
    border: none;
    caret-color: #fff;
    line-height: 1.3;
}

.atm-plate-body input[type="text"]::placeholder {
    color: #444;
    letter-spacing: 4px;
    animation: plate-blink 1.2s step-end infinite;
}

@keyframes plate-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.atm-plate-body input[type="text"]:focus {
    outline: none;
}

/* ==========================================================================
   Block Titles (Solutions Column Headers)
   ========================================================================== */
.atm-block-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--atm-text);
}

/* ==========================================================================
   Dropzone
   ========================================================================== */
.atm-dropzone {
    padding: 20px 24px;
    border: 2px dashed var(--atm-border);
    border-radius: var(--atm-radius-lg);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--atm-transition), background var(--atm-transition);
}

.atm-dropzone:hover,
.atm-dropzone.dragover {
    border-color: var(--atm-primary);
    background: var(--atm-primary-light);
}

.atm-dropzone-content {
    pointer-events: none;
}

.atm-dropzone p {
    margin: 0 0 2px;
    color: var(--atm-text);
    font-weight: 500;
    font-size: 0.9375rem;
}

.atm-dropzone p.small {
    color: var(--atm-text-muted);
    font-size: 0.75rem;
}

/* File info display */
.atm-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--atm-bg-muted);
    border-radius: var(--atm-radius);
}

.atm-file-info .filename {
    font-weight: 600;
    color: var(--atm-text);
}

.atm-file-info .filesize {
    color: var(--atm-text-muted);
    font-size: 0.875rem;
}

.atm-remove-file {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    background: #dc3545;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background var(--atm-transition);
}

.atm-remove-file svg {
    flex-shrink: 0;
}

.atm-remove-file:hover {
    background: #b02a37;
    color: #fff;
}

/* Upload progress */
.atm-upload-progress {
    margin-top: 16px;
}

.atm-upload-progress .progress-bar {
    height: 6px;
    background: var(--atm-bg-muted);
    border-radius: 3px;
    overflow: hidden;
}

.atm-upload-progress .progress-fill {
    height: 100%;
    background: var(--atm-primary);
    border-radius: 3px;
    transition: width 300ms ease;
}

.atm-upload-progress .progress-text {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--atm-text-muted);
    text-align: center;
}

/* ==========================================================================
   ECU / TCU Checkboxes
   ========================================================================== */
.atm-file-type-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.atm-file-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    cursor: pointer;
    transition: border-color var(--atm-transition), background var(--atm-transition);
}

.atm-file-type-option:hover {
    border-color: var(--atm-primary);
}

.atm-file-type-option.selected {
    border-color: var(--atm-primary);
    background: var(--atm-primary-light);
}

.atm-file-type-option input[type="checkbox"] {
    accent-color: var(--atm-primary);
}

.atm-file-type-option label {
    font-weight: 500;
    cursor: pointer;
}

/* ==========================================================================
   Solutions / Tune Selection (Two-Column Layout)
   ========================================================================== */
.atm-solutions-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.atm-solutions-column {
    padding: 20px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-lg);
    background: var(--atm-bg);
}

.atm-solutions-column h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
}

.atm-solutions-column .description {
    margin: 0 0 16px;
    font-size: 0.8125rem;
    color: var(--atm-text-muted);
}

/* Instant column highlight */
#atm-instant-solutions {
    border-color: var(--atm-success);
    background: var(--atm-success-light);
}

#atm-instant-solutions h4 {
    color: var(--atm-success);
}

/* Stage selector */
.atm-stage-selector {
    margin-bottom: 16px;
}

.atm-stage-selector label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.atm-stage-selector select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    font-size: 0.9375rem;
}

/* Mod option */
.atm-mod-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background var(--atm-transition), border-color var(--atm-transition);
}

.atm-mod-option:hover {
    background: var(--atm-bg-muted);
}

.atm-mod-option.selected {
    border-color: var(--atm-primary);
    background: var(--atm-primary-light);
}

.atm-mod-option input[type="checkbox"] {
    accent-color: var(--atm-primary);
    flex-shrink: 0;
}

.atm-mod-option .mod-label {
    flex: 1;
    font-weight: 500;
}

.atm-mod-option .mod-price {
    font-weight: 600;
    color: var(--atm-primary);
    font-size: 0.875rem;
    white-space: nowrap;
}

/* ==========================================================================
   Tune Cards  (Instant column)
   ========================================================================== */
.atm-tune-card {
    position: relative;
    padding: 16px;
    border: 2px solid var(--atm-border);
    border-radius: var(--atm-radius-lg);
    background: var(--atm-bg);
    margin-bottom: 12px;
    transition: border-color var(--atm-transition), box-shadow var(--atm-transition),
                opacity var(--atm-transition);
    cursor: default;
}

.atm-tune-card:hover {
    box-shadow: var(--atm-shadow);
}

.atm-tune-card.active {
    border-color: var(--atm-primary);
    box-shadow: 0 0 0 3px rgba(0, 169, 224, 0.15);
}

.atm-tune-card.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Header: Stage + Price */
.atm-tune-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.atm-tune-card__stage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--atm-text);
    text-transform: capitalize;
}

.atm-tune-card__stage--minor {
    font-size: 1rem;
    color: var(--atm-text-muted);
}

.atm-tune-card__price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--atm-primary);
    white-space: nowrap;
}

/* Mod pills */
.atm-tune-card__mods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.atm-mod-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.atm-mod-pill--emissions {
    background: #fee2e2;
    color: #b91c1c;
}

.atm-mod-pill--features {
    background: #e0f4fb;
    color: #006d91;
}

.atm-mod-pill--other {
    background: #f1f5f9;
    color: #475569;
}

/* Tuner notes */
.atm-tune-card__notes {
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--atm-text-muted);
    margin-bottom: 8px;
}

/* Description */
.atm-tune-card__desc {
    font-size: 0.8125rem;
    color: var(--atm-text-muted);
    margin-bottom: 8px;
}

/* Match quality */
.atm-tune-card__meta {
    font-size: 0.75rem;
    color: var(--atm-text-light);
    margin-bottom: 10px;
}

/* ADD / REMOVE button */
.atm-tune-card__btn {
    width: 100%;
    padding: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 2px solid var(--atm-primary);
    border-radius: var(--atm-radius);
    background: var(--atm-primary);
    color: #fff;
    cursor: pointer;
    transition: background var(--atm-transition), color var(--atm-transition),
                border-color var(--atm-transition);
}

.atm-tune-card__btn:hover {
    background: var(--atm-primary-hover);
    border-color: var(--atm-primary-hover);
    color: #fff;
}

.atm-tune-card__btn.atm-btn--remove {
    background: var(--atm-danger);
    border-color: var(--atm-danger);
    color: #fff;
}

.atm-tune-card__btn.atm-btn--remove:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.atm-tune-card__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================================================
   Cross-Column Mutual Exclusion
   ========================================================================== */
.atm-solutions-column.column-disabled {
    opacity: 0.45;
    pointer-events: none;
    position: relative;
}

/* File Request column stays interactive even when grayed */
#atm-manual-solutions.column-disabled {
    pointer-events: auto;
    cursor: pointer;
}

.atm-solutions-column.column-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--atm-radius-lg);
    pointer-events: none;
}

/* Notes section */
.atm-notes-section {
    margin-top: 20px;
}

.atm-notes-section label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.atm-notes-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    font-size: 0.9375rem;
    font-family: var(--atm-font);
    resize: vertical;
    min-height: 80px;
}

/* ==========================================================================
   Pricing Summary
   ========================================================================== */
.atm-pricing-summary {
    padding: 20px;
    background: var(--atm-bg-subtle);
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-lg);
}

.atm-pricing-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9375rem;
}

.atm-pricing-line .label {
    color: var(--atm-text);
}

.atm-pricing-line .amount {
    font-weight: 600;
    color: var(--atm-text);
}

.atm-pricing-line.discount .amount {
    color: var(--atm-success);
}

.atm-pricing-line.total {
    border-top: 2px solid var(--atm-border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.0625rem;
    font-weight: 700;
}

.atm-pricing-line.total .amount {
    color: var(--atm-primary);
    font-size: 1.25rem;
}

.atm-pricing-note {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--atm-text-muted);
    font-style: italic;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.atm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--atm-radius);
    cursor: pointer;
    transition: background var(--atm-transition), transform 50ms ease;
    font-family: var(--atm-font);
}

.atm-btn:active {
    transform: scale(0.98);
}

.atm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.atm-btn-primary {
    background: var(--atm-primary);
    color: #fff;
}

.atm-btn-primary:hover:not(:disabled) {
    background: var(--atm-primary-hover);
}

.atm-btn-secondary {
    background: var(--atm-bg-muted);
    color: var(--atm-text);
    border: 1px solid var(--atm-border);
}

.atm-btn-secondary:hover:not(:disabled) {
    background: var(--atm-border);
}

.atm-btn-success {
    background: var(--atm-success);
    color: #fff;
}

.atm-btn-success:hover:not(:disabled) {
    background: #15803d;
}

.atm-btn-danger {
    background: var(--atm-danger);
    color: #fff;
}

.atm-btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.atm-btn-sm {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

.atm-btn-lg {
    padding: 14px 32px;
    font-size: 1.0625rem;
}

/* Consent gate (terms + conditional emissions acknowledgement) */
.atm-consent {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atm-consent__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.875rem;
    line-height: 1.45;
    cursor: pointer;
    padding: 12px 14px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    background: var(--atm-bg-subtle);
}

.atm-consent__row input[type="checkbox"] {
    margin-top: 1px;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #00a9e0;
}

.atm-consent__row a {
    text-decoration: underline;
}

.atm-consent__row--emissions {
    background: #fff7ed;
    border-color: #fdba74;
    color: #7c2d12;
}

/* Error / reminder state when the user tries to checkout without ticking */
.atm-consent__row--error {
    border-color: #dc2626;
    background: #fef2f2;
    color: #7f1d1d;
    animation: atm-consent-shake 0.4s ease;
}

@keyframes atm-consent-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.atm-consent__reminder {
    margin: 2px 2px 0;
    color: #b91c1c;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Confirm actions row */
.atm-confirm-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
}

.atm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ==========================================================================
   Projects List (legacy table styles kept for backward compat)
   ========================================================================== */

/* Status pills */
.atm-status {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Project statuses */
.atm-status--draft { background: var(--atm-bg-muted); color: var(--atm-text-muted); }
.atm-status--processing { background: var(--atm-info-light); color: var(--atm-info); }
.atm-status--ready { background: var(--atm-warning-light); color: var(--atm-warning); }
.atm-status--completed { background: var(--atm-success-light); color: var(--atm-success); }
.atm-status--failed { background: var(--atm-danger-light); color: var(--atm-danger); }
.atm-status--manual_required { background: var(--atm-warning-light); color: var(--atm-warning); }
.atm-status--cancelled { background: var(--atm-bg-muted); color: var(--atm-text-light); }

/* Recognition / pipeline statuses */
.atm-status--recognizing { background: var(--atm-info-light); color: var(--atm-info); }
.atm-status--recognized { background: var(--atm-success-light); color: var(--atm-success); }
.atm-status--recognised { background: var(--atm-success-light); color: var(--atm-success); }
.atm-status--applying { background: #ede9fe; color: #7c3aed; }
.atm-status--instant_ready { background: var(--atm-success-light); color: var(--atm-success); }
.atm-status--instant_available { background: var(--atm-success-light); color: var(--atm-success); }
.atm-status--manual_pending { background: var(--atm-warning-light); color: var(--atm-warning); }
.atm-status--manual_only { background: var(--atm-warning-light); color: var(--atm-warning); }
.atm-status--manual_ready { background: var(--atm-success-light); color: var(--atm-success); }
.atm-status--queued { background: var(--atm-info-light); color: var(--atm-info); }
.atm-status--applied { background: #ede9fe; color: #7c3aed; }
.atm-status--encoded { background: #ecfdf5; color: #059669; }
.atm-status--delivered { background: #ecfdf5; color: #059669; }
.atm-status--uploaded { background: var(--atm-bg-muted); color: var(--atm-text-muted); }
.atm-status--decoded { background: var(--atm-info-light); color: var(--atm-info); }
.atm-status--deleted { background: var(--atm-danger-light); color: var(--atm-danger); }
.atm-status--recognition_failed { background: var(--atm-danger-light); color: var(--atm-danger); }
.atm-status--awaiting_admin { background: #fef3c7; color: #b45309; }
.atm-status--pending { background: var(--atm-bg-muted); color: var(--atm-text-muted); }

/* Support ticket statuses */
.atm-status--open { background: var(--atm-info-light); color: var(--atm-info); }
.atm-status--in_progress { background: var(--atm-warning-light); color: var(--atm-warning); }
.atm-status--waiting { background: #fef3c7; color: #b45309; }
.atm-status--closed { background: var(--atm-bg-muted); color: var(--atm-text-light); }
.atm-status--resolved { background: var(--atm-success-light); color: var(--atm-success); }

/* ==========================================================================
   Project Detail
   ========================================================================== */
.atm-project-detail {
    padding: 20px;
}

.atm-project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.atm-project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.atm-project-meta {
    font-size: 0.875rem;
    color: var(--atm-text-muted);
}

.atm-project-files {
    margin-top: 20px;
}

.atm-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    margin-bottom: 8px;
}

.atm-file-card .file-icon {
    font-size: 1.5rem;
}

.atm-file-card .file-name {
    flex: 1;
    font-weight: 500;
}

.atm-file-card .file-type {
    font-size: 0.75rem;
    color: var(--atm-text-muted);
    text-transform: uppercase;
}

/* ==========================================================================
   Support
   ========================================================================== */
.atm-support-form {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-lg);
}

.atm-support-form h4 {
    margin: 0 0 16px;
    font-weight: 600;
}

.atm-ticket-card {
    padding: 16px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    margin-bottom: 12px;
    cursor: pointer;
    transition: background var(--atm-transition);
}

.atm-ticket-card:hover {
    background: var(--atm-bg-muted);
}

.atm-ticket-card .ticket-subject {
    font-weight: 600;
    margin-bottom: 4px;
}

.atm-ticket-card .ticket-meta {
    font-size: 0.8125rem;
    color: var(--atm-text-muted);
}

/* Ticket thread — see Inline Support section below */

/* ==========================================================================
   Loading Overlay
   ========================================================================== */
.atm-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.atm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--atm-border);
    border-top-color: var(--atm-primary);
    border-radius: 50%;
    animation: atm-spin 0.8s linear infinite;
}

@keyframes atm-spin {
    to { transform: rotate(360deg); }
}

.atm-overlay p {
    margin-top: 16px;
    color: var(--atm-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Inline spinner (for partial loading)
   ========================================================================== */
.atm-loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px;
    color: var(--atm-text-muted);
}

.atm-loading-inline::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--atm-border);
    border-top-color: var(--atm-primary);
    border-radius: 50%;
    animation: atm-spin 0.8s linear infinite;
}

/* ==========================================================================
   Login Prompt
   ========================================================================== */
.atm-login-required {
    text-align: center;
    padding: 48px 24px;
    background: var(--atm-bg-subtle);
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-lg);
}

.atm-login-required p {
    margin: 0 0 16px;
    color: var(--atm-text-muted);
    font-size: 1.0625rem;
}

/* ==========================================================================
   Alerts / Notices
   ========================================================================== */
.atm-alert {
    padding: 14px 16px;
    border-radius: var(--atm-radius);
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.atm-alert--info {
    background: var(--atm-info-light);
    color: var(--atm-info);
    border: 1px solid currentColor;
}

.atm-alert--success {
    background: var(--atm-success-light);
    color: var(--atm-success);
    border: 1px solid currentColor;
}

.atm-alert--warning {
    background: var(--atm-warning-light);
    color: var(--atm-warning);
    border: 1px solid currentColor;
}

.atm-alert--error {
    background: var(--atm-danger-light);
    color: var(--atm-danger);
    border: 1px solid currentColor;
}

/* ==========================================================================
   Credits Inline
   ========================================================================== */
.atm-credits-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.atm-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--atm-text-muted);
}

.atm-empty-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.atm-empty p {
    margin: 0;
}

/* ==========================================================================
   Toolbar (search, filter, new file service)
   ========================================================================== */
.atm-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    flex-wrap: wrap;
}

.atm-toolbar input[type="text"],
.atm-toolbar select {
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-sm);
    padding: 7px 12px;
    font-size: 0.85rem;
    font-family: var(--atm-font);
    background: var(--atm-bg);
    color: var(--atm-text);
    transition: border-color var(--atm-transition);
}

.atm-toolbar input[type="text"]:focus,
.atm-toolbar select:focus {
    outline: none;
    border-color: var(--atm-primary);
    box-shadow: 0 0 0 2px rgba(0, 169, 224, 0.12);
}

.atm-toolbar input[type="text"] {
    flex: 1;
    min-width: 160px;
    max-width: 280px;
}

.atm-toolbar select {
    min-width: 140px;
}

.atm-toolbar .atm-btn {
    margin-left: auto;
}

/* ==========================================================================
   Split-panel layout (50/50)
   ========================================================================== */
.atm-split-panel {
    display: flex;
    gap: 0;
    min-height: 450px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius);
    overflow: hidden;
    background: var(--atm-bg);
}

.atm-split-panel__table {
    flex: 1;
    overflow-y: auto;
    border-right: 1px solid var(--atm-border);
}

.atm-split-panel__detail {
    flex: 1;
    overflow-y: auto;
    background: var(--atm-bg-subtle, #f9fafb);
    padding: 16px;
}

.atm-detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--atm-text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 32px;
}

/* ==========================================================================
   Projects table
   ========================================================================== */
.atm-projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.atm-projects-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--atm-text-muted);
    background: var(--atm-bg-muted, #f3f4f6);
    border-bottom: 2px solid var(--atm-border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.atm-projects-table tbody tr {
    cursor: pointer;
    transition: background-color var(--atm-transition);
    border-bottom: 1px solid var(--atm-border);
}

.atm-projects-table tbody tr:hover {
    background: var(--atm-bg-muted, #f9fafb);
}

.atm-projects-table tbody tr.selected {
    background: rgba(0, 169, 224, 0.07);
    border-left: 3px solid var(--atm-primary);
}

.atm-projects-table td {
    padding: 10px 14px;
    vertical-align: middle;
    color: var(--atm-text);
}

.cell-primary {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--atm-text);
}

.cell-secondary {
    font-size: 0.78rem;
    color: var(--atm-text-muted);
    margin-top: 1px;
}

/* Brand badge in project rows */
.col-vehicle-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.atm-project-badge {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    padding: 3px;
    border: 1px solid var(--atm-border, #e2e8f0);
    flex-shrink: 0;
}

.atm-project-initials {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.col-vin {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--atm-text-muted);
}

.col-actions {
    white-space: nowrap;
}

/* ==========================================================================
   Detail panel (right side)
   ========================================================================== */
.atm-panel-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.atm-panel-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--atm-border);
}

.atm-panel-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    color: var(--atm-text);
    font-weight: 700;
}

.atm-panel-subtitle {
    font-size: 0.8rem;
    color: var(--atm-text-muted);
}

.atm-panel-section {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--atm-border);
}

.atm-panel-section:last-child {
    border-bottom: none;
}

.atm-panel-section h5 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--atm-text-muted);
    font-weight: 700;
}

.atm-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}

.atm-meta-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.atm-meta-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--atm-text-muted);
    font-weight: 600;
}

.atm-meta-value {
    font-size: 0.85rem;
    color: var(--atm-text);
}

.atm-panel-actions-row {
    display: flex;
    gap: 16px;
    padding: 4px 0;
}

.atm-panel-link {
    font-size: 0.82rem;
    color: var(--atm-primary);
    text-decoration: none;
    font-weight: 500;
}

.atm-panel-link:hover {
    text-decoration: underline;
}

.atm-panel-downloads {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atm-download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: var(--atm-bg);
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-sm);
    cursor: pointer;
    transition: border-color var(--atm-transition), background-color var(--atm-transition);
    font-family: var(--atm-font);
    text-align: left;
}

.atm-download-btn:hover {
    border-color: var(--atm-primary);
    background: var(--atm-bg-muted, #f3f4f6);
}

.dl-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dl-label {
    font-size: 0.82rem;
    color: var(--atm-text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dl-size {
    font-size: 0.75rem;
    color: var(--atm-text-muted);
    flex-shrink: 0;
}

.atm-panel-credits {
    text-align: center;
}

.atm-credits-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--atm-primary);
}

/* ==========================================================================
   Rating (3-emoji post-delivery)
   ========================================================================== */
.atm-panel-rating {
    text-align: center;
}

.atm-rating-row {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.atm-rate-btn {
    font-size: 1.5rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--atm-transition), transform var(--atm-transition);
    opacity: 0.6;
}

.atm-rate-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.atm-rate-btn.active {
    opacity: 1;
    border-color: var(--atm-primary);
    background: rgba(0, 169, 224, 0.08);
}

/* ==========================================================================
   Inline Support (within detail panel)
   ========================================================================== */
.atm-panel-support-section {
    border-bottom: none;
}

/* ==========================================================================
   Inline Support (within project detail)
   ========================================================================== */
.atm-support-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.atm-support-header h4 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.atm-ticket-card {
    background: var(--atm-bg-subtle);
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-sm);
    padding: 12px 16px;
    cursor: pointer;
    transition: border-color var(--atm-transition), background-color var(--atm-transition);
    margin-bottom: 8px;
}

.atm-ticket-card:last-child {
    margin-bottom: 0;
}

.atm-ticket-card:hover {
    border-color: var(--atm-primary);
    background: var(--atm-bg);
}

.ticket-subject {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--atm-text);
    margin-bottom: 4px;
}

.ticket-meta {
    font-size: 0.8rem;
    color: var(--atm-text-muted);
}

.atm-ticket-detail-inline {
    padding-top: 4px;
}

.atm-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
    padding: 20px;
    background: var(--atm-bg-subtle);
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-lg);
    max-height: 500px;
    overflow-y: auto;
}

.atm-message {
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.9rem;
    position: relative;
}

.atm-message--user {
    background: rgba(0, 169, 224, 0.10);
    border: 1px solid rgba(0, 169, 224, 0.22);
    border-bottom-right-radius: 4px;
    margin-left: 32px;
}

.atm-message--admin {
    background: #f0f2f5;
    border: 1px solid #e2e5ea;
    border-bottom-left-radius: 4px;
    margin-right: 32px;
}

.message-meta {
    font-size: 0.75rem;
    color: var(--atm-text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-time {
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.75;
}

.message-body {
    color: var(--atm-text);
    line-height: 1.5;
    white-space: pre-wrap;
}

.message-attachment {
    margin-top: 8px;
    font-size: 0.85rem;
}

.message-attachment a {
    color: var(--atm-primary);
    text-decoration: underline;
}

.atm-reply-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.atm-reply-form textarea {
    width: 100%;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-sm);
    padding: 10px 12px;
    font-family: var(--atm-font);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color var(--atm-transition);
    box-sizing: border-box;
}

.atm-reply-form textarea:focus {
    outline: none;
    border-color: var(--atm-primary);
    box-shadow: 0 0 0 2px rgba(0, 169, 224, 0.15);
}

.atm-reply-form button {
    align-self: flex-end;
}

.atm-support-form-inline {
    padding-top: 4px;
}

.atm-support-form-inline h5 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: var(--atm-text);
}

.atm-empty--compact {
    padding: 16px 0;
    text-align: center;
}

.atm-empty--compact p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--atm-text-muted);
}

/* ==========================================================================
   Credit Shortage Modal
   ========================================================================== */
.atm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.atm-credit-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 520px;
    width: 92%;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: atm-modal-in 0.2s ease-out;
}

@keyframes atm-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.atm-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--atm-text-muted, #888);
    line-height: 1;
    padding: 4px;
}
.atm-modal-close:hover { color: var(--atm-text, #333); }

.atm-modal-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--atm-text, #1a1a1a);
}

.atm-modal-subtitle {
    margin: 0 0 16px;
    color: var(--atm-text-muted, #666);
    font-size: 0.95rem;
    line-height: 1.5;
}

.atm-modal-summary {
    background: var(--atm-bg-subtle, #f5f7fa);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.atm-modal-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--atm-text-muted, #555);
}

.atm-modal-summary-shortage {
    font-weight: 700;
    color: #d32f2f;
    border-top: 1px solid var(--atm-border, #e0e0e0);
    margin-top: 4px;
    padding-top: 8px;
}

.atm-credit-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.atm-credit-option {
    border: 2px solid var(--atm-border, #e0e0e0);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    transition: border-color 0.15s;
}
.atm-credit-option:hover {
    border-color: var(--atm-primary, #2563eb);
}

.atm-credit-option--upsell {
    border-color: var(--atm-primary, #2563eb);
    background: linear-gradient(135deg, #f0f6ff 0%, #fff 100%);
}

.atm-credit-option-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--atm-primary, #2563eb);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.atm-credit-option-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.atm-credit-option-qty {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--atm-text, #1a1a1a);
}

.atm-credit-option-total {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--atm-primary, #2563eb);
}

.atm-credit-option-detail {
    font-size: 0.85rem;
    color: var(--atm-text-muted, #666);
    margin-bottom: 12px;
    line-height: 1.5;
}

.atm-credit-option-savings {
    color: #2e7d32;
    font-weight: 600;
}

.atm-credit-buy-btn {
    width: 100%;
}

.atm-modal-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--atm-text-muted, #999);
    margin: 0;
}

/* ==========================================================================
   Responsive (basic – desktop-first as per spec)
   ========================================================================== */
@media (max-width: 1024px) {
    .atm-split-panel {
        flex-direction: column;
    }
    .atm-split-panel__table {
        border-right: none;
        border-bottom: 1px solid var(--atm-border);
        max-height: 320px;
    }
    .atm-split-panel__detail {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .atm-solutions-layout {
        grid-template-columns: 1fr;
    }

    .atm-form-row {
        flex-direction: column;
    }

    .atm-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .atm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .atm-toolbar input[type="text"] {
        max-width: 100%;
    }

    .atm-toolbar .atm-btn {
        margin-left: 0;
    }

    .atm-meta-grid {
        grid-template-columns: 1fr;
    }

    .col-vin {
        display: none;
    }
}

/* ==========================================================================
   DOWNLOAD BUTTONS (prominent)
   ========================================================================== */
.atm-download-btn--primary {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.atm-download-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 33, 62, 0.3);
}
.atm-download-btn--secondary {
    background: #f0f0f1 !important;
    color: #1d2327 !important;
    border: 1px solid #c3c4c7 !important;
    font-size: 13px !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    cursor: pointer;
}
.atm-download-btn--secondary:hover {
    background: #e0e0e0 !important;
}

/* Cancelled badge */
.atm-badge-cancelled {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: #d63638;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Refunded credits */
.atm-credits-refunded {
    color: #d63638 !important;
    text-decoration: line-through;
    font-style: italic;
}
.atm-credits-refunded::before {
    content: '';
    text-decoration: none;
    display: inline;
}

/* ── Column Header with Reset Link ── */
.atm-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.atm-column-header h4 {
    margin: 0;
}
.atm-clear-link {
    font-size: 12px;
    color: #d63638;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.atm-clear-link:hover {
    background: rgba(214, 54, 56, 0.08);
    color: #b32d2e;
    text-decoration: none;
}

/* ── Help Blocks ──────────────────────────────────────── */
.atm-help-block {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 18px;
    background: #f0f9ff;
    border-left: 3px solid var(--atm-primary, #00a9e0);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
}
.atm-help-block__icon {
    flex-shrink: 0;
    color: var(--atm-primary, #00a9e0);
    margin-top: 1px;
}
.atm-help-block__body strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1a1d23;
    margin-bottom: 4px;
}
.atm-help-block__body p {
    margin: 0;
}
.atm-help-block__body a {
    color: var(--atm-primary, #00a9e0);
    font-weight: 600;
    text-decoration: none;
}
.atm-help-block__body a:hover {
    text-decoration: underline;
}
.atm-help-list {
    margin: 6px 0 0;
    padding-left: 18px;
    list-style: disc;
}
.atm-help-list li {
    margin-bottom: 4px;
}
.atm-help-list li:last-child {
    margin-bottom: 0;
}

/* ── Inline ? Badge (in tabs) ─────────────────────────── */
.atm-help-badge-inline {
    margin-left: auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--atm-primary, #00a9e0);
    background: transparent;
    color: var(--atm-primary, #00a9e0);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.atm-help-badge-inline:hover {
    background: var(--atm-primary, #00a9e0);
    color: #fff;
}

/* ── Sidebar help badge ───────────────────────────────── */
.atm-help-badge {
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ── Guide Modal ──────────────────────────────────────── */
.atm-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}
.atm-guide-modal {
    background: #fff;
    border-radius: 12px;
    width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    position: relative;
}
.atm-guide-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.atm-guide-modal__close:hover {
    color: #374151;
}
.atm-guide-modal__title {
    padding: 24px 28px 0;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1d23;
}
.atm-guide-modal__body {
    padding: 20px 28px 28px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}
.atm-guide-section {
    margin-bottom: 20px;
}
.atm-guide-section:last-child {
    margin-bottom: 0;
}
.atm-guide-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1d23;
    margin: 0 0 8px;
}
.atm-guide-section ol,
.atm-guide-section ul {
    margin: 0;
    padding-left: 20px;
}
.atm-guide-section li {
    margin-bottom: 6px;
}
.atm-guide-section li ul {
    margin-top: 4px;
}
.atm-guide-section p {
    margin: 0;
}

/* ==========================================================================
   Slave Services — Decode Button (Solutions Step)
   ========================================================================== */
.atm-slave-services {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.atm-btn-service {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--atm-border);
    border-radius: var(--atm-radius);
    background: var(--atm-bg);
    color: var(--atm-text);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--atm-transition);
}

.atm-btn-service:hover {
    border-color: var(--atm-primary);
    background: var(--atm-primary-light);
}

.atm-btn-service.active {
    border-color: var(--atm-primary);
    background: var(--atm-primary);
    color: #fff;
}

.atm-btn-service .atm-service-icon {
    font-size: 1.25rem;
}

.atm-btn-service .atm-service-price {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ==========================================================================
   Encode Section (Project Detail)
   ========================================================================== */
.atm-encode-section {
    border-top: 1px solid var(--atm-border);
    padding-top: 16px;
}

.atm-encode-section .description {
    color: var(--atm-text-muted);
    font-size: 0.8125rem;
    margin: 0 0 12px;
}

.atm-encode-dropzone {
    margin-bottom: 12px;
}

.atm-encode-drop-area {
    padding: 16px 20px;
    border: 2px dashed var(--atm-border);
    border-radius: var(--atm-radius);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--atm-transition), background var(--atm-transition);
    color: var(--atm-text-muted);
    font-size: 0.875rem;
}

.atm-encode-drop-area:hover,
.atm-encode-drop-area.dragover {
    border-color: var(--atm-primary);
    background: var(--atm-primary-light);
}

.atm-encode-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.atm-encode-options label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--atm-text);
}

.atm-encode-options .atm-select,
.atm-encode-options select {
    padding: 6px 10px;
    border: 1px solid var(--atm-border);
    border-radius: var(--atm-radius-sm);
    font-size: 0.875rem;
    background: var(--atm-bg);
}

.atm-encode-file-info {
    width: 100%;
    font-size: 0.8125rem;
    color: var(--atm-text);
    margin-bottom: 4px;
}
