/* Ship GCI – modern compact theme (shared by booking, tracker, confirmation, admin) */
:root {
    --gci: #B71234; --gci-dark: #930d29; --gci-soft: #fdf1f3; --gci-soft2: #fbe1e6; --gci-ring: rgba(183,18,52,.14);
    --ink: #18181b; --ink2: #3f3f46; --muted: #71717a; --line: #e4e4e7; --field: #fafafa; --bg: #f3f4f6;
    --ok: #15803d; --ok-soft: #ecfdf3; --warn: #b45309; --warn-soft: #fffbeb;
    --r-sm: 8px; --r-md: 10px; --r-lg: 14px;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.05);
}
body.modern { padding-top: 0; background: var(--bg); font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
              font-size: 13.5px; color: var(--ink); -webkit-font-smoothing: antialiased; }
body.modern .body-content { padding: 0; }
.sf-wrap { max-width: 860px; margin: 0 auto; padding: 16px 14px 48px; }
.sf-wrap.wide { max-width: 1180px; }
.sf-wrap a { color: var(--gci); }

/* Header */
.sf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
           background: #fff; border-radius: var(--r-lg); padding: 8px 16px; box-shadow: var(--shadow); }
.sf-head img { height: 42px; width: auto; display: block; }
.sf-head .disp { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.sf-head .disp b { color: var(--ink); font-weight: 600; }
.sf-head .right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.sf-pill { display: inline-block; color: var(--gci) !important; font-weight: 600; font-size: 12.5px; background: var(--gci-soft);
           padding: 5px 12px; border-radius: 999px; text-decoration: none !important; transition: background .15s; }
.sf-pill:hover { background: var(--gci-soft2); }

/* Stepper */
.sf-steps { display: flex; list-style: none; padding: 0; margin: 18px 0 14px; counter-reset: s; }
.sf-steps li { flex: 1; text-align: center; font-size: 12px; font-weight: 500; color: var(--muted); position: relative; }
.sf-steps li:before { counter-increment: s; content: counter(s); display: block; width: 26px; height: 26px; line-height: 26px; margin: 0 auto 6px;
                      border-radius: 50%; background: #fff; color: var(--muted); font-weight: 600; font-size: 12px; position: relative; z-index: 2;
                      box-shadow: 0 0 0 1px var(--line); transition: all .2s; }
.sf-steps li:after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; border-radius: 2px; background: var(--line); z-index: 1; }
.sf-steps li:first-child:after { display: none; }
.sf-steps li.done { color: var(--ink); cursor: pointer; }
.sf-steps li.done:before { content: "✓"; background: var(--gci); color: #fff; box-shadow: none; }
.sf-steps li.done:after, .sf-steps li.active:after { background: var(--gci); }
.sf-steps li.active { color: var(--ink); font-weight: 600; }
.sf-steps li.active:before { color: var(--gci); box-shadow: 0 0 0 2px var(--gci), 0 0 0 5px var(--gci-ring); }

/* Cards */
.sf-card { background: #fff; border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 12px; }
.sf-form .sf-card { display: none; margin-bottom: 0; }
.sf-form .sf-card.active { display: block; animation: sfIn .2s ease; }
@keyframes sfIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sf-card h2 { margin: 0 0 3px; font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.sf-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.sf-card .sub { color: var(--muted); margin-bottom: 16px; font-size: 13px; }
.sf-card label { font-weight: 600; font-size: 12px; margin-bottom: 4px; color: var(--ink2); }
.sf-card label .req { color: var(--gci); }
.sf-card .form-group { margin-bottom: 12px; }
.sf-card .row { margin-left: -6px; margin-right: -6px; }
.sf-card .row > [class*=col-] { padding-left: 6px; padding-right: 6px; }
.hint { color: var(--muted); font-size: 11.5px; font-weight: 400; }

/* Inputs */
.sf-wrap .form-control { height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--field);
                         box-shadow: none; font-size: 13.5px; padding: 6px 11px; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.sf-wrap textarea.form-control { height: auto; }
.sf-wrap select.form-control { -webkit-appearance: none; appearance: none; padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; }
.sf-wrap .form-control:hover { border-color: #d4d4d8; }
.sf-wrap .form-control:focus { background: #fff; border-color: var(--gci); box-shadow: 0 0 0 3px var(--gci-ring); outline: 0; }
.sf-wrap .form-control::placeholder { color: #a1a1aa; }

/* Add-more links */
.sf-more { color: var(--gci); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-block; margin: 0 0 10px;
           padding: 3px 10px; border-radius: 999px; background: var(--gci-soft); transition: background .15s; }
.sf-more:hover { background: var(--gci-soft2); }
.sf-hidden { display: none; }
.sf-section { margin: 6px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* Toggle rows */
.sf-toggle { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md);
             margin-bottom: 6px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; font-weight: 400 !important; }
.sf-toggle:hover { border-color: #d4d4d8; }
.sf-toggle input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 32px; height: 18px; margin: 0; border-radius: 999px;
             background: #d4d4d8; position: relative; cursor: pointer; transition: background .2s; outline: 0; }
.sf-toggle input[type=checkbox]:before { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
             box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.sf-toggle input[type=checkbox]:checked { background: var(--gci); }
.sf-toggle input[type=checkbox]:checked:before { transform: translateX(14px); }
.sf-toggle input[type=checkbox]:focus-visible { box-shadow: 0 0 0 3px var(--gci-ring); }
.sf-toggle .t { font-weight: 600; color: var(--ink); font-size: 13px; }
.sf-toggle .d { color: var(--muted); font-size: 11.5px; }
.sf-toggle.on { border-color: var(--gci); background: var(--gci-soft); }
.sf-reveal { margin: 0 0 10px 14px; padding-left: 12px; border-left: 2px solid var(--gci-soft2); }

/* Freight table */
.sf-lines { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
.sf-lines th { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 0 3px 1px; white-space: nowrap; }
.sf-lines td { padding: 0 2px; vertical-align: top; }
.sf-lines .form-control { height: 34px; padding: 5px 8px; }
.sf-lines select.form-control { padding-right: 24px; background-position: right 8px center; }
.sf-lines .rm { color: #a1a1aa; border: 0; background: none; width: 30px; height: 34px; border-radius: var(--r-sm); font-size: 17px; line-height: 1; }
.sf-lines .rm:hover { color: var(--gci); background: var(--gci-soft); }
.sf-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 14px; }
.sf-totals > div { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-md); padding: 7px 11px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.sf-totals b { font-size: 15px; display: block; color: var(--ink); font-weight: 700; }

/* Buttons */
.sf-wrap .btn { border-radius: 999px; font-weight: 600; font-size: 13px; transition: all .15s; }
.sf-wrap .btn-default { background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 7px 16px; }
.sf-wrap .btn-default:hover { background: var(--field); border-color: #d4d4d8; }
.sf-wrap .btn-sm { padding: 5px 12px; font-size: 12px; }
.sf-wrap .btn-xs { padding: 2px 9px; font-size: 11.5px; }
.btn-gci { background: var(--gci) !important; border: 0 !important; color: #fff !important; padding: 8px 20px; box-shadow: 0 3px 10px rgba(183,18,52,.22); }
.btn-gci:hover, .btn-gci:focus { background: var(--gci-dark) !important; color: #fff; }
.btn-gci.btn-lg { padding: 10px 24px; font-size: 14px; }
.btn-gci:disabled { opacity: .7; }
.sf-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Definition lists (review, details) */
.rv { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-md); padding: 2px 14px 8px; margin-bottom: 8px; }
.rv h4 { margin: 8px 0 6px; font-size: 13.5px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.rv h4 a { font-size: 11.5px; color: var(--gci); cursor: pointer; font-weight: 600; background: #fff; border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }
.rv h4 a:hover { text-decoration: none; border-color: var(--gci); }
.sf-dl { display: grid; grid-template-columns: 150px 1fr; gap: 5px 12px; margin: 0; font-size: 13px; }
.sf-dl dt { color: var(--muted); font-weight: 500; }
.sf-dl dd { margin: 0; }

/* Uploads, alerts, misc */
.sf-wrap .dropzone { min-height: 64px; border: 1.5px dashed #d4d4d8; border-radius: var(--r-md); padding: 8px; background: var(--field); }
.sf-wrap .dropzone:hover, .sf-wrap .dropzone.dz-drag-hover { border-color: var(--gci); background: var(--gci-soft); }
.sf-wrap .dropzone .dz-message { margin: .9em 0; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.sf-wrap .alert { border-radius: var(--r-md); border: 0; box-shadow: var(--shadow); padding: 10px 14px; font-size: 13px; }
.sf-wrap .alert-success { background: var(--ok-soft); color: #14532d; }
.sf-wrap .alert-danger { background: var(--gci-soft); color: #7f1d1d; }
.sf-check { width: 15px; height: 15px; accent-color: var(--gci); vertical-align: -3px; margin-right: 5px !important; }
.is-bad { border-color: var(--gci) !important; background: #fff !important; box-shadow: 0 0 0 3px var(--gci-ring) !important; }
.sf-foot { text-align: center; margin-top: 14px; font-size: 11.5px; } .sf-foot a { color: var(--muted) !important; }
.ui-autocomplete { border-radius: var(--r-sm); border: 1px solid var(--line) !important; box-shadow: var(--shadow); padding: 4px 0; font-family: inherit; font-size: 13px; }
.ui-autocomplete .ui-menu-item-wrapper { padding: 6px 12px; } .ui-autocomplete .ui-state-active { background: var(--gci-soft); color: var(--ink); border: 0; margin: 0; }
.sf-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #f4f4f5; color: var(--ink2); }
.sf-badge.ok { background: var(--ok-soft); color: var(--ok); } .sf-badge.bad { background: var(--gci-soft); color: var(--gci); }
.sf-badge.info { background: #eff6ff; color: #1d4ed8; } .sf-badge.warn { background: var(--warn-soft); color: var(--warn); }

/* Tables (admin) */
.sf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sf-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sf-table td { padding: 8px 10px; border-bottom: 1px solid #f1f1f3; vertical-align: top; }
.sf-table tr:last-child td { border-bottom: 0; }
.sf-table tr:hover td { background: #fafafa; }
.sf-table small { color: var(--muted); }
.sf-table pre { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 11px; max-height: 360px; overflow: auto; }
.sf-inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sf-inline .form-control { width: auto; }

/* Tracker */
.trk-status { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 2px; }
.trk-status.exception { color: var(--gci); }
.trk-latest { color: var(--muted); font-size: 13px; }
.trk-steps { display: flex; list-style: none; padding: 0; margin: 20px 0 4px; position: relative; }
.trk-steps:before { content: ""; position: absolute; top: 9px; left: 10%; right: 10%; height: 3px; border-radius: 3px; background: var(--line); }
.trk-steps .bar { position: absolute; top: 9px; left: 10%; height: 3px; border-radius: 3px; background: var(--gci); }
.trk-steps li { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--muted); }
.trk-steps .dot { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--line); margin: 0 auto 6px; position: relative; }
.trk-steps li.done { color: var(--ink); } .trk-steps li.done .dot { background: var(--gci); box-shadow: none; }
.trk-steps li.current { font-weight: 600; } .trk-steps li.current .dot { box-shadow: 0 0 0 5px var(--gci-ring); }
.trk-timeline { list-style: none; padding: 0 0 0 4px; margin: 0; }
.trk-timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); margin-left: 5px; }
.trk-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.trk-timeline li:before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #d4d4d8; box-shadow: 0 0 0 3px #fff; }
.trk-timeline li:first-child:before { background: var(--gci); }
.trk-timeline li.exception:before { background: #f59e0b; }
.trk-timeline .when { color: var(--muted); font-size: 11.5px; }
.trk-timeline .what { font-size: 13.5px; font-weight: 600; }
.trk-timeline .where { color: var(--muted); font-size: 12.5px; }

@media (max-width: 700px) {
    .sf-card { padding: 16px 14px; } .sf-steps li { font-size: 10.5px; }
    .sf-lines thead { display: none; } .sf-lines tr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; background: var(--field); border-radius: var(--r-md); padding: 8px; margin-bottom: 6px; }
    .sf-lines td { padding: 0; } .sf-lines td.desc { grid-column: 1 / -1; } .sf-lines input, .sf-lines select { width: 100% !important; }
    .sf-totals { grid-template-columns: repeat(2, 1fr); }
    .sf-dl { grid-template-columns: 1fr; gap: 1px; } .sf-dl dt { margin-top: 6px; }
    .trk-steps li { font-size: 10.5px; } .sf-head .right { width: 100%; justify-content: space-between; }
}
@media print { .btn, .sf-pill, form.sf-lookup { display: none !important; } body.modern { background: #fff; } .sf-card { box-shadow: none; border: 1px solid var(--line); } }

/* Booking summary tables (shared with the email HTML) */
.sf-card table[cellpadding] { border-collapse: collapse; width: 100%; margin: 4px 0; font-size: 12.5px; }
.sf-card table[cellpadding] td, .sf-card table[cellpadding] th { padding: 3px 10px 3px 0; text-align: left; vertical-align: top; }
.sf-card table[cellpadding][style*="border:1px"] { border: 1px solid var(--line) !important; border-radius: var(--r-sm); }
.sf-card table[cellpadding][style*="border:1px"] td, .sf-card table[cellpadding][style*="border:1px"] th { padding: 5px 8px; border-bottom: 1px solid #f1f1f3; }
.sf-card table[cellpadding] tr[style*="background"] th { background: var(--field); font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sf-card h2[style*="B71234"] { display: none; }
.sf-card h3[style*="border-bottom"] { font-size: 13.5px !important; margin: 12px 0 4px !important; border-bottom-color: var(--line) !important; }

/* Header layout with centered pill switcher */
.sf-head { display: grid; grid-template-columns: 1fr auto 1fr; }
.sf-head .sf-logo { justify-self: start; }
.sf-head .right { justify-self: end; }
.sf-seg { --n: 3; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); background: #f1f1f4; border-radius: 999px; padding: 3px; min-width: 330px; }
.sf-seg a { position: relative; z-index: 1; text-align: center; padding: 6px 16px; font-size: 13px; font-weight: 600; color: var(--muted) !important;
            text-decoration: none !important; border-radius: 999px; transition: color .2s; white-space: nowrap; }
.sf-seg a:hover { color: var(--ink) !important; }
.sf-seg a.on { color: #fff !important; }
.sf-seg-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 999px; background: var(--gci);
                box-shadow: 0 2px 8px rgba(183,18,52,.3); transform: translateX(calc(var(--i) * 100%)); transition: transform .25s cubic-bezier(.4,.1,.2,1), opacity .2s; }
.sf-seg.none .sf-seg-thumb { opacity: 0; }
@media (max-width: 700px) {
    .sf-head { grid-template-columns: 1fr auto; row-gap: 8px; }
    .sf-head .right { grid-column: 2; grid-row: 1; }
    .sf-seg { grid-column: 1 / -1; grid-row: 2; min-width: 0; width: 100%; }
    .sf-head .disp { font-size: 11.5px; }
}
@media print { .sf-seg { display: none; } }

/* Signed-in staff menu */
.sf-head .right { display: flex; align-items: center; gap: 10px; }
.sf-user { position: relative; }
.sf-user summary { list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 5px 10px 5px 30px; border-radius: 999px; background: #f1f1f4; position: relative; text-transform: capitalize; }
.sf-user summary::-webkit-details-marker { display: none; }
.sf-user summary:before { content: ""; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%;
    background: var(--gci) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Ccircle cx='10' cy='7' r='3.5'/%3E%3Cpath d='M3 17c1-3.5 4-5 7-5s6 1.5 7 5z'/%3E%3C/svg%3E") center/12px no-repeat; }
.sf-user .menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: var(--r-md); box-shadow: 0 8px 28px rgba(16,24,40,.14); padding: 6px; min-width: 200px; z-index: 50; }
.sf-user .menu a, .sf-user .menu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: var(--r-sm); font-size: 13px; color: var(--ink) !important; text-decoration: none !important; background: none; border: 0; }
.sf-user .menu a:hover, .sf-user .menu button:hover { background: var(--field); }
.sf-user .menu form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.sf-seg { min-width: calc(110px * var(--n)); }
@media (max-width: 700px) { .sf-seg { min-width: 0; } .sf-seg a { padding: 6px 6px; font-size: 12px; } }
