/* =========================================================
   Thermadyne Core UI Standard v4
   Clean consolidated stylesheet for portal + field tools
   ========================================================= */
:root{
    --bg:#07111f;
    --bg-2:#0b1424;
    --bg-soft:#10233d;
    --panel:rgba(18,42,70,.72);
    --panel-2:rgba(12,22,38,.84);
    --line:rgba(255,255,255,.14);
    --line-strong:rgba(255,122,26,.62);
    --text:#f4f8ff;
    --muted:#b7c5d8;
    --blue:#246dff;
    --orange:#ff7417;
    --green:#36d66d;
    --red:#ff5a5a;
    --radius:18px;
    --radius-lg:24px;
    --shadow:0 22px 70px rgba(0,0,0,.32);
    --app-width:1320px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
    margin:0;
    min-height:100vh;
    font-family:Arial,Helvetica,sans-serif;
    color:var(--text);
    background:
        radial-gradient(circle at 12% 10%,rgba(47,140,255,.26),transparent 34%),
        radial-gradient(circle at 88% 20%,rgba(255,122,26,.20),transparent 30%),
        linear-gradient(135deg,#050914 0%,var(--bg) 48%,#111827 100%);
}
a{color:inherit;text-decoration:none}
img{max-width:100%}

/* ---------- App width / page centering ---------- */
.container,
.dashboard-page,
.dashboard-container,
.tech-page,
.page-wrap{
    width:min(var(--app-width),calc(100% - 48px));
    margin-inline:auto;
}
.dashboard-page,
.dashboard-container,
.tech-page,
.page-wrap{padding:28px 0}
body > .thermadyne-page-header ~ *:not(script):not(style){
    width:min(var(--app-width),calc(100% - 48px));
    margin-left:auto;
    margin-right:auto;
}

/* ---------- Shared Thermadyne page header ---------- */
.thermadyne-page-header{
    width:min(var(--app-width),calc(100% - 48px));
    margin:0 auto 28px;
    padding:28px 36px;
    min-height:148px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:34px;
    background:rgba(3,12,28,.82);
    border:1px solid rgba(255,255,255,.08);
    border-radius:0 0 16px 16px;
    box-shadow:0 16px 48px rgba(0,0,0,.22);
}
.thermadyne-logo-link{
    flex:0 0 260px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    min-width:0;
}
.thermadyne-page-logo{
    width:250px!important;
    max-width:250px!important;
    height:auto!important;
    max-height:100px!important;
    object-fit:contain;
    filter:drop-shadow(0 0 14px rgba(47,140,255,.22));
}
.thermadyne-page-title-wrap{
    flex:1 1 auto;
    min-width:0;
    text-align:center;
    padding-right:260px;
}
.thermadyne-page-title-wrap h1{
    margin:0;
    font-size:clamp(2rem,3.3vw,3.4rem);
    line-height:1.02;
    letter-spacing:-.055em;
    color:var(--text);
}
.thermadyne-page-title-wrap p{
    margin:10px auto 0;
    max-width:780px;
    color:var(--muted);
    font-size:1.02rem;
    line-height:1.45;
}

/* ---------- Header/action rows ---------- */
.dashboard-header,
.page-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin:0 0 28px;
    padding:24px 28px;
    background:rgba(3,12,28,.72);
    border:1px solid rgba(255,255,255,.08);
    border-radius:var(--radius);
}
.dashboard-header h1,.page-header h1{margin:0;font-size:2rem;letter-spacing:-.04em}
.dashboard-header p,.page-header p{margin:6px 0 0;color:var(--muted)}
.dashboard-actions,
.header-actions,
.page-actions,
.dashboard-header > div:last-child{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    margin:18px 0 26px;
}

/* ---------- Buttons ---------- */
button,
.dashboard-button,
.logout-button,
.btn,
.btn-primary,
.btn-outline,
.btn-secondary,
.btn-small,
.small-button{
    min-height:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:12px 20px;
    border:0;
    border-radius:10px;
    color:#fff;
    background:linear-gradient(135deg,var(--blue),var(--orange));
    font:inherit;
    font-weight:800;
    line-height:1.1;
    cursor:pointer;
    text-align:center;
    text-decoration:none;
    touch-action:manipulation;
    transition:transform .18s ease,opacity .18s ease,box-shadow .18s ease;
}
button:hover,
.dashboard-button:hover,
.logout-button:hover,
.btn:hover,
.btn-secondary:hover,
.btn-small:hover{transform:translateY(-2px);opacity:.94}
.btn-outline{background:rgba(255,255,255,.07);border:1px solid var(--line)}
.btn-danger{background:linear-gradient(135deg,#b91c1c,var(--orange))!important}
.small-button,.btn-small{min-height:40px;padding:9px 14px;font-size:.92rem}
.logout,.logout-button{background:linear-gradient(135deg,#5668db,var(--orange))}

/* ---------- Cards / dashboards ---------- */
.dashboard-grid,
.feature-grid,
.services,
.summary-grid,
.manual-d-room-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:22px;
}
.dashboard-card,
.customer-card,
.equipment-card,
.table-card,
.summary-card,
.feature-card,
.mini-card,
.note-card,
.contact-card,
.service-card,
.why-card,
.helper-card,
.load-builder-card,
.manual-j-room-list-card,
.manual-j-results-card,
.card{
    position:relative;
    max-width:100%;
    min-width:0;
    color:var(--text);
    background:linear-gradient(145deg,rgba(28,55,88,.68),rgba(13,20,34,.82));
    border:1px solid var(--line);
    border-radius:var(--radius-lg);
    padding:28px;
    box-shadow:0 18px 48px rgba(0,0,0,.20);
    overflow:hidden;
}
.dashboard-card{min-height:240px;text-decoration:none;transition:.22s ease}
.dashboard-card:hover{transform:translateY(-5px);border-color:rgba(255,122,26,.70);box-shadow:var(--shadow)}
.dashboard-card h2,
.customer-card h2,
.equipment-card h2,
.table-card h2,
.summary-card h2,
.feature-card h3,
.mini-card h3,
.note-card h2,
.card h2{
    color:var(--orange);
    margin:0 0 14px;
    font-size:clamp(1.35rem,2vw,1.75rem);
}
.dashboard-card p,.feature-card p,.mini-card p,.card p{color:#d7e1ef;line-height:1.55}
.card-icon,.icon{font-size:48px;margin-bottom:26px;filter:drop-shadow(0 0 12px rgba(255,122,26,.25))}
.card-line{width:48px;height:2px;background:var(--orange);margin:14px 0 22px;transition:.22s ease}
.dashboard-card:hover .card-line{width:88px}
.card-arrow{
    position:absolute;
    right:24px;
    bottom:24px;
    width:46px;
    height:46px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--orange);
    font-size:26px;
    background:rgba(255,255,255,.08);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.dashboard-card:hover .card-arrow{background:var(--orange);color:#fff;transform:scale(1.08)}

/* ---------- Forms ---------- */
form{display:grid;gap:16px}
label{display:block;color:var(--text);font-weight:700}
input,select,textarea{
    width:100%;
    max-width:100%;
    min-width:0;
    min-height:48px;
    border:1px solid var(--line);
    background:rgba(5,9,20,.74);
    color:var(--text);
    padding:15px 18px;
    border-radius:16px;
    font:inherit;
    outline:none;
}
textarea{min-height:136px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:rgba(47,140,255,.78);box-shadow:0 0 0 4px rgba(47,140,255,.13)}
input::placeholder,textarea::placeholder{color:rgba(244,248,255,.56)}
select{
    appearance:none;
    -webkit-appearance:none;
    cursor:pointer;
    background-image:linear-gradient(45deg,transparent 50%,var(--orange) 50%),linear-gradient(135deg,var(--orange) 50%,transparent 50%);
    background-position:calc(100% - 22px) calc(50% - 3px),calc(100% - 16px) calc(50% - 3px);
    background-size:6px 6px;
    background-repeat:no-repeat;
    padding-right:44px;
}
select option{background:#07111f;color:#fff}
.form-grid,
.settings-grid,
.compact-grid,
.tech-form-grid,
.compact-field-grid,
.grid,
.grid-3{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    align-items:start;
}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.form-grid > *,
.settings-grid > *,
.compact-grid > *,
.tech-form-grid > *,
.compact-field-grid > *,
.grid > *,
.grid-3 > *{min-width:0}
.helper-text,.select-help,.muted{color:var(--muted);line-height:1.55}
.hidden-field{position:absolute;left:-9999px;opacity:0;pointer-events:none}

/* ---------- Tables ---------- */
.table-scroll,.table-wrap,.equipment-table-scroll,.inventory-cost-scroll,.tech-table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:auto!important;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    display:block;
    padding-bottom:10px;
}
table,.customer-table,.equipment-table,.tech-table,.inventory-cost-table{
    width:100%;
    border-collapse:collapse;
    color:var(--text);
}
.table-scroll table,
.table-wrap table,
.equipment-table-scroll table,
.tech-table-wrap table,
.inventory-cost-scroll table{
    min-width:980px;
    width:max-content;
}
th,td,.customer-table th,.customer-table td,.equipment-table th,.equipment-table td,.tech-table th,.tech-table td{
    padding:14px 16px;
    text-align:left;
    vertical-align:top;
    border-bottom:1px solid rgba(255,255,255,.12);
    white-space:nowrap;
}
th{font-weight:900;color:#fff;background:rgba(255,255,255,.045)}
tr:hover td{background:rgba(255,255,255,.025)}
.table-scroll::-webkit-scrollbar,.table-wrap::-webkit-scrollbar,.equipment-table-scroll::-webkit-scrollbar{height:10px;width:10px}
.table-scroll::-webkit-scrollbar-track,.table-wrap::-webkit-scrollbar-track,.equipment-table-scroll::-webkit-scrollbar-track{background:rgba(255,255,255,.06);border-radius:999px}
.table-scroll::-webkit-scrollbar-thumb,.table-wrap::-webkit-scrollbar-thumb,.equipment-table-scroll::-webkit-scrollbar-thumb{background:rgba(47,140,255,.65);border-radius:999px}

/* ---------- Metrics / timeline / pills ---------- */
.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:18px 0}
.metric-card,.metric{
    background:rgba(255,255,255,.06);
    border:1px solid var(--line);
    border-radius:16px;
    padding:16px;
}
.metric-card span,.metric span{display:block;color:var(--muted);font-size:.9rem;margin-bottom:8px}
.metric-card strong,.metric strong{font-size:1.45rem}
.pill,.workflow-pill,.danger-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 11px;
    border-radius:999px;
    background:rgba(47,140,255,.14);
    color:#dcecff;
    border:1px solid rgba(47,140,255,.26);
    font-size:.88rem;
    font-weight:800;
}
.danger-pill{background:rgba(255,80,80,.18);color:#ffd7d7;border-color:rgba(255,80,80,.35)}
.good{color:var(--green)!important}.warn{color:#ffd166!important}.danger{color:#ffb4b4!important}
.status-active{color:var(--green);font-weight:900}.status-inactive{color:#ffb4b4;font-weight:900}
.timeline-list{display:flex;flex-direction:column;gap:12px}
.timeline-item{
    display:block;
    padding:16px 18px;
    border-left:4px solid var(--orange)!important;
    background:rgba(255,255,255,.055)!important;
    color:var(--text)!important;
    border-radius:14px;
    box-shadow:0 8px 22px rgba(0,0,0,.16);
}
.timeline-item strong{display:block;margin-bottom:6px}.timeline-item span{display:block;color:var(--muted);font-size:.92rem;margin-bottom:4px}.timeline-item p{white-space:pre-wrap}

/* ---------- Workflow / Manual calculators ---------- */
.workflow-progress{background:rgba(255,255,255,.06);border:1px solid var(--line);border-radius:20px;padding:18px;margin:20px 0 26px;box-shadow:0 16px 36px rgba(0,0,0,.18)}
.workflow-progress-top{display:flex;justify-content:space-between;gap:12px;font-weight:800;margin-bottom:12px}
.workflow-bar{height:10px;background:rgba(255,255,255,.08);border-radius:99px;overflow:hidden}
.workflow-fill{height:100%;background:linear-gradient(135deg,var(--blue),var(--orange));border-radius:99px}
.workflow-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}
.workflow-step{font-size:.88rem;color:#b9c7d8;background:rgba(255,255,255,.05);padding:10px;border-radius:10px;text-align:center;font-weight:800}
.workflow-step.active{color:#fff;background:rgba(255,107,44,.22);border:1px solid rgba(255,107,44,.58)}
.workflow-actions,.workflow-nav{display:flex;flex-wrap:wrap;gap:12px;margin:22px 0}.workflow-actions .dashboard-button,.workflow-nav .dashboard-button{flex:1}
.workflow-room-card,.manual-j-total-box{padding:16px;margin:12px 0;border-radius:16px;background:rgba(255,255,255,.055);border:1px solid var(--line)}
.load-row,.equipment-row,.mini-builder-row,.equipment-builder-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;align-items:center;margin:10px 0;padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.04)}
.builder-check,.mini-check{display:flex;align-items:center;gap:8px;min-height:48px;padding:10px 12px;border:1px solid var(--line);background:rgba(5,9,20,.68);border-radius:16px;color:var(--text);white-space:nowrap}.builder-check input,.mini-check input{width:auto;min-width:18px;height:18px;accent-color:var(--orange)}
.summary-row{display:flex;justify-content:space-between;gap:18px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.summary-row span:first-child{color:var(--muted)}.summary-row span:last-child{font-weight:900;text-align:right}

/* ---------- QR / labels / reference ---------- */
.inline-search{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center}
.small-link{color:#93c5fd;font-weight:800;text-decoration:underline}.low-stock-row{background:rgba(255,122,26,.12)}
.qr-preview{display:grid;gap:12px;align-items:start}.qr-preview img{width:220px;max-width:100%;background:#fff;border-radius:12px;padding:10px}
.qr-label-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.qr-label-card{background:#fff;color:#111827;border:1px solid #d1d5db;border-radius:14px;padding:14px;text-align:center;box-shadow:0 8px 22px rgba(0,0,0,.16)}
.qr-label-card *{color:#111827}.qr-label-card img{width:180px;background:#fff;padding:8px;border-radius:8px}.qr-label-title{font-weight:900}.qr-label-meta{font-size:.85rem;margin:3px 0}

/* ---------- Login / landing legacy ---------- */
.login-page{min-height:100vh;display:flex;justify-content:center;align-items:center;padding:40px}.login-container{width:100%;max-width:460px;background:var(--panel);border:1px solid var(--line);border-radius:28px;padding:40px;box-shadow:var(--shadow);text-align:center}.login-logo{width:250px;margin:0 auto 24px;display:block}.login-title{margin:0;font-size:2.4rem;letter-spacing:-.05em}.login-subtitle,.login-footer{color:var(--muted)}.login-form{display:grid;gap:16px}.error,.status,.message,.notice{padding:14px 16px;border-radius:16px;background:rgba(255,122,26,.12);border:1px solid rgba(255,122,26,.28);color:#ffe2cc;margin:12px 0}
.logo{height:auto;max-height:110px;width:auto}.nav{display:flex;align-items:center;justify-content:space-between;gap:24px}.nav-links{display:flex;align-items:center;gap:22px;color:var(--muted)}

/* ---------- Responsive ---------- */
@media(max-width:1100px){
    .thermadyne-page-header{gap:22px;padding:24px;min-height:126px}
    .thermadyne-logo-link{flex-basis:210px}.thermadyne-page-logo{width:205px!important;max-width:205px!important}.thermadyne-page-title-wrap{padding-right:210px}
}
@media(max-width:900px){
    .container,.dashboard-page,.dashboard-container,.tech-page,.page-wrap,
    body > .thermadyne-page-header ~ *:not(script):not(style){width:min(100% - 28px,var(--app-width))}
    .dashboard-page,.dashboard-container,.tech-page,.page-wrap{padding:16px 0}
    .thermadyne-page-header{width:min(100% - 28px,var(--app-width));flex-direction:column;text-align:center;gap:12px;min-height:auto;margin-bottom:20px;border-radius:0 0 16px 16px}
    .thermadyne-logo-link{flex:0 0 auto;justify-content:center}.thermadyne-page-logo{width:220px!important;max-width:220px!important;max-height:92px!important}
    .thermadyne-page-title-wrap{padding-right:0}.thermadyne-page-title-wrap h1{font-size:clamp(2rem,7vw,3rem)}
    .dashboard-header,.page-header{flex-direction:column;align-items:stretch;text-align:center;padding:20px}
    .dashboard-actions,.header-actions,.page-actions,.dashboard-header > div:last-child{justify-content:stretch;align-items:stretch;display:flex;flex-direction:column;gap:10px}
    .dashboard-actions .dashboard-button,.dashboard-actions .logout-button,.header-actions .dashboard-button,.page-actions .dashboard-button,.dashboard-button,.logout-button{width:100%}
    .dashboard-grid,.feature-grid,.services,.summary-grid,.manual-j-grid,.manual-s-grid,.manual-d-grid,.manual-t-grid,.tech-form-grid{grid-template-columns:1fr!important}
    .dashboard-card,.customer-card,.equipment-card,.table-card,.summary-card,.feature-card,.mini-card,.note-card,.card{padding:20px;border-radius:20px}
    .form-grid,.settings-grid,.compact-grid,.compact-field-grid,.grid,.grid-3{grid-template-columns:1fr!important}
    input,select,textarea{font-size:16px!important}
    .workflow-steps{display:flex;overflow-x:auto;gap:8px;padding-bottom:4px}.workflow-step{min-width:128px}.workflow-actions,.workflow-nav{flex-direction:column}.workflow-actions .dashboard-button,.workflow-nav .dashboard-button{width:100%}
    .inline-search{grid-template-columns:1fr}
    .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
    .metric-grid{grid-template-columns:1fr}.thermadyne-page-logo{width:190px!important}.thermadyne-page-title-wrap h1{font-size:2rem}.dashboard-card{min-height:210px}
}
@media print{
    body{background:#fff!important;color:#111!important}.no-print,.dashboard-actions,.workflow-progress,.logout-button{display:none!important}.dashboard-page,.dashboard-container,.tech-page,.page-wrap{width:100%!important;max-width:none!important;padding:0!important}.dashboard-card,.summary-card,.table-card{background:#fff!important;color:#111!important;border:1px solid #ddd!important;box-shadow:none!important;break-inside:avoid}.thermadyne-page-header{box-shadow:none!important;border:0!important}.qr-label-grid{grid-template-columns:repeat(2,1fr)}.qr-label-card{box-shadow:none;break-inside:avoid}
}

/* HEADER AUDIT COMMENT START - logo final override */
/*
/* Thread 7 logo final override */
.thermadyne-page-logo {
    width: auto !important;
    height: 86px !important;
    max-height: 86px !important;
    max-width: 320px !important;
    object-fit: contain !important;
}
*/
/* HEADER AUDIT COMMENT END */

/* HEADER AUDIT REMOVED OLD ACTIVE OVERRIDES
.thermadyne-logo-link {
    flex: 0 0 300px !important;
}

@media (max-width: 900px) {
    .thermadyne-page-logo {
        height: 72px !important;
        max-height: 72px !important;
        max-width: 280px !important;
    }

    .thermadyne-logo-link {
        flex: 0 0 auto !important;
    }
}


/* HEADER AUDIT COMMENT START - header flex cleanup */
/*
/* Thread 7 header flex cleanup */
.thermadyne-page-header {
    justify-content: flex-start !important;
    gap: 42px !important;
}
*/
/* HEADER AUDIT COMMENT END */

/* HEADER AUDIT COMMENTED OUT REMAINING OLD LOGO OVERRIDES
/* .thermadyne-logo-link {
/*     flex: 0 0 360px !important;
/*     justify-content: center !important;
/* }
/* 
/* .thermadyne-page-logo {
/*     width: 340px !important;
/*     max-width: 340px !important;
/*     height: auto !important;
/*     max-height: 130px !important;
/* }
/* 
/* .thermadyne-page-title-wrap {
/*     flex: 1 1 auto !important;
/*     padding-right: 0 !important;
/*     text-align: center !important;
/* }
/* 
/* @media (max-width: 900px) {
/*     .thermadyne-page-header {
/*         flex-direction: column !important;
/*         gap: 14px !important;
/*     }
/* 
/*     .thermadyne-logo-link {
/*         flex: 0 0 auto !important;
/*     }
/* 
/*     .thermadyne-page-logo {
/*         width: 300px !important;
/*         max-width: 300px !important;
/*         max-height: 115px !important;
/*     }
/* }
END HEADER AUDIT COMMENTED OUT REMAINING OLD LOGO OVERRIDES */

END HEADER AUDIT REMOVED OLD ACTIVE OVERRIDES */


/* HEADER AUDIT FINAL ACTIVE RULE */
.thermadyne-page-logo {
    width: 420px !important;
    max-width: 420px !important;
    height: auto !important;
    max-height: none !important;
}

@media (max-width: 900px) {
    .thermadyne-page-logo {
        width: 360px !important;
        max-width: 90vw !important;
        height: auto !important;
        max-height: none !important;
    }
}

.brand-block {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 24px auto !important;
    margin-top: 20px !important;
    margin-bottom: 24px !important;
}

.brand-block > div {
    display: none !important;
}

.brand-logo {
    display: block !important;
    margin: 0 auto !important;
    width: 420px !important;
    max-width: 85% !important;
    height: auto !important;
}