/* =========================================================================
   Gallery > Planning - the Job & Works Instruction System showcase,
   in the Equinox brand colours.
   ========================================================================= */

.pl-shell {
    --pl-red: #FF5609;
    --pl-red-dark: #D94400;
    --pl-ink: #28312F;
    --pl-head: #3C3C3B;
    --pl-cream: #FFF7E0;
    --pl-grey: #F2F2F2;
    --pl-line: #E2E4E8;
    --pl-navy: #032F59;
    --pl-olive: #5D774E;
}

.pl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.pl-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--pl-red); font-weight: 700; }
.pl-title { font-size: 26px; font-weight: 800; margin: 2px 0 2px; color: var(--pl-ink); }
.pl-sub { color: #676879; font-size: 13px; max-width: 900px; }
.pl-head-right { display: flex; align-items: center; gap: 12px; }
.pl-lang { display: inline-flex; border: 1px solid #D0D4E4; border-radius: 6px; overflow: hidden; }
.pl-lang button { border: 0; background: #fff; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #676879; cursor: pointer; }
.pl-lang button.on { background: var(--pl-red); color: #fff; }

.pl-menu { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 14px; padding: 6px; background: #fff; border: 1px solid var(--pl-line); border-radius: 10px; }
.pl-menu a { padding: 6px 11px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--pl-ink); white-space: nowrap; }
.pl-menu a:hover { background: #F5F6F8; text-decoration: none; }
.pl-menu a.on { background: var(--pl-red); color: #fff; }
.pl-menu a.pl-menu-b { color: var(--pl-navy); }
.pl-menu a.pl-menu-b.on { background: var(--pl-navy); color: #fff; }
.pl-menu a.pl-menu-c { color: #676879; }
.pl-menu a.pl-menu-c.on { background: var(--pl-head); color: #fff; }
.pl-menu a.pl-menu-b:first-of-type, .pl-menu a.pl-menu-c:first-of-type { margin-left: 8px; }

.pl-msg { position: relative; padding: 9px 36px 9px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.pl-msg-ok { background: #EEF5EA; color: #2F4A23; border: 1px solid #CFE0C5; }
.pl-msg-err { background: #FBE3E3; color: #8A1C1C; border: 1px solid #F1BDBD; }
.pl-msg-more { font-size: 12px; opacity: .85; }
.pl-x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: inherit; }

.pl-btn-red { background: var(--pl-red); color: #fff; }
.pl-btn-navy { background: var(--pl-navy); color: #fff; }
.pl-btn-dark { background: var(--pl-head); color: #fff; }
.pl-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.pl-toolbar .eq-input { width: auto; }
.pl-toolbar label { font-size: 12px; color: #676879; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.pl-gap { flex: 1; }
.pl-ask { max-width: 560px; }
.pl-ask-text { font-size: 15px; line-height: 1.45; }
.pl-ask-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* KPI tiles */
.pl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pl-kpi { background: #fff; border: 1px solid var(--pl-line); border-radius: 10px; padding: 10px 12px; border-top: 4px solid var(--pl-head); }
.pl-kpi.red { border-top-color: var(--pl-red); }
.pl-kpi.navy { border-top-color: var(--pl-navy); }
.pl-kpi.olive { border-top-color: var(--pl-olive); }
.pl-kpi.amber { border-top-color: #E0A100; }
.pl-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #676879; }
.pl-kpi-value { font-size: 28px; font-weight: 800; color: var(--pl-ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.pl-kpi.red .pl-kpi-value { color: var(--pl-red); }
.pl-kpi-sub { font-size: 12px; color: #676879; }

.pl-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pl-panel { background: #fff; border: 1px solid var(--pl-line); border-radius: 10px; padding: 12px 14px; }
.pl-panel h3 { font-size: 14px; font-weight: 800; margin: 0 0 8px; color: var(--pl-ink); }
.pl-bar { display: inline-block; height: 10px; background: var(--pl-red); border-radius: 3px; vertical-align: middle; }
.pl-bar.navy { background: var(--pl-navy); }
.pl-meter { display: inline-block; width: 90px; height: 10px; background: #EDEDED; border-radius: 3px; overflow: hidden; vertical-align: middle; }
.pl-meter > span { display: block; height: 100%; background: var(--pl-olive); }
.pl-meter.over > span { background: var(--pl-red); }

/* Tables (Excel register style) */
.pl-scroll { overflow: auto; max-height: calc(100vh - 290px); border: 1px solid var(--pl-line); border-radius: 8px; background: #fff; }
.pl-scroll.tall { max-height: none; }
.pl-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.pl-table th { position: sticky; top: 0; z-index: 2; background: var(--pl-head); color: #fff; font-weight: 700; text-align: left; padding: 6px 8px; white-space: nowrap; font-size: 12px; }
.pl-table th.sort { cursor: pointer; }
.pl-table th.sort:hover { background: #55554F; }
.pl-table td { padding: 4px 8px; border-bottom: 1px solid #EEF0F3; white-space: nowrap; vertical-align: middle; }
.pl-table td.wrap { white-space: normal; min-width: 220px; }
.pl-table td.num, .pl-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pl-table tbody tr:hover td { background: #F7F8FA; }
.pl-table tbody tr.sel td { background: #FFE9EC !important; }
.pl-table tbody tr.pick td { background: #FFF7E0; }
.pl-table tbody tr.daybreak td { background: #EDEDED; font-weight: 700; color: var(--pl-ink); }
.pl-table tbody tr.locked td { color: #6E6E6E; }
.pl-table tbody tr.locked td:first-child { box-shadow: inset 3px 0 0 #9AA0A6; }
.pl-table tfoot td { font-weight: 800; background: #F5F6F8; padding: 5px 8px; }
.pl-table .ellip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.pl-table input.eq-input, .pl-table select.eq-input { height: 26px; padding: 0 6px; font-size: 12px; }
.pl-open { color: var(--pl-red); font-weight: 700; cursor: pointer; white-space: nowrap; }
.pl-open:hover { text-decoration: underline; }
.pl-chip { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; color: #fff; background: #888B8D; white-space: nowrap; }

/* department statuses and health */
.pl-st-done { background: #DFF0D8 !important; color: #2F5A1E; }
.pl-st-na { background: #F1F1F1 !important; color: #8A8A8A; }
.pl-st-prog { background: #FFF1C2 !important; color: #7A5A00; }
.pl-st-wait { background: #FFE0B2 !important; color: #8A4A00; }
.pl-st-issue { background: #F8C9CF !important; color: #8A0F22; font-weight: 700; }
.pl-st-not { color: #8A8A8A; }
.pl-h-late { background: #D7263D !important; color: #fff !important; font-weight: 700; }
.pl-h-blocked { background: #6B0A19 !important; color: #fff !important; font-weight: 700; }
.pl-h-risk { background: #FFE08A !important; color: #6A4A00 !important; font-weight: 700; }
.pl-h-ok { background: #DFF0D8 !important; color: #2F5A1E !important; }
.pl-h-complete { background: #E7E9EE !important; color: #555 !important; }
.pl-check { color: var(--pl-red); font-weight: 700; }
.pl-moved { color: #B36B00; }

/* Job forms */
.pl-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.pl-form-sec { background: #fff; border: 1px solid var(--pl-line); border-radius: 10px; padding: 10px 12px; }
.pl-form-sec h3 { margin: 0 0 8px; font-size: 14px; font-weight: 800; border-bottom: 2px solid var(--pl-red); padding-bottom: 4px; }
.pl-frow { display: grid; grid-template-columns: 46% 54%; align-items: center; gap: 6px; margin-bottom: 4px; }
.pl-frow label { font-size: 12.5px; color: var(--pl-ink); }
.pl-frow label.req::after { content: " *"; color: var(--pl-red); }
.pl-frow .eq-input { height: 28px; background: var(--pl-cream); border-color: #E8DDBB; font-size: 12.5px; width: 100%; }
.pl-frow .calc { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; padding-right: 6px; }
.pl-dupes { border: 1px solid #F1BDBD; background: #FFF6F6; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 12.5px; }

/* Job ticket (Excel sheet drawn cell by cell) */
.pl-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--pl-head); margin-bottom: 0; flex-wrap: wrap; }
.pl-tabs button { border: 0; background: #E6E9EF; color: var(--pl-ink); padding: 7px 14px; font-weight: 700; font-size: 13px; border-radius: 6px 6px 0 0; cursor: pointer; }
.pl-tabs button.on { background: var(--pl-head); color: #fff; }
.pl-tabs button .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.pl-sheet-wrap { background: #fff; border: 1px solid var(--pl-line); border-top: 0; padding: 14px; overflow: auto; }
.pl-sheet { border-collapse: collapse; table-layout: fixed; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 13.3px; color: #1F1F1F; }
.pl-sheet td { padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; height: 20px; }
.pl-sheet td.in { padding: 0; }
.pl-sheet td.in input, .pl-sheet td.in select, .pl-sheet td.in textarea {
    width: 100%; height: 100%; min-height: 20px; border: 0; background: transparent; font: inherit; color: inherit; padding: 1px 4px; outline: none; text-align: inherit;
}
.pl-sheet td.in textarea { resize: vertical; display: block; }
.pl-sheet td.in:focus-within { outline: 2px solid var(--pl-red); outline-offset: -2px; }
.pl-sheet td.ro input, .pl-sheet td.ro select { pointer-events: none; }
.pl-ticket-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 10px; }
.pl-ticket-meta { font-size: 12.5px; color: #676879; }
.pl-badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 12px; }
.pl-badge.draft { background: #FFE08A; color: #6A4A00; }
.pl-badge.rel { background: #DFF0D8; color: #2F5A1E; }
.pl-badge.complete { background: #DFF0D8; color: #2F5A1E; }
.pl-badge.pending { background: #FBE3E3; color: #8A1C1C; }
.pl-unsaved { color: var(--pl-red); font-weight: 700; font-size: 12.5px; }

/* Planning board */
.pl-board-legend { font-size: 12px; color: #676879; margin-bottom: 6px; }
.pl-cobar { display: inline-block; width: 6px; height: 18px; border-radius: 2px; vertical-align: middle; }

/* Machine loading timeline */
.pl-tl { position: relative; background: #fff; border: 1px solid var(--pl-line); border-radius: 8px; overflow-x: auto; }
.pl-tl-inner { position: relative; }
.pl-tl-row { display: flex; border-bottom: 1px solid #EEF0F3; height: 34px; }
.pl-tl-row.dept { background: #F5F6F8; height: 26px; font-weight: 800; }
.pl-tl-name { position: sticky; left: 0; z-index: 3; width: 170px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--pl-line); padding: 0 8px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.pl-tl-row.dept .pl-tl-name { background: #F5F6F8; }
.pl-tl-name small { color: #676879; font-weight: 600; }
.pl-tl-lane { position: relative; flex-shrink: 0; }
.pl-tl-cell { position: absolute; top: 0; bottom: 0; border-left: 1px solid #F0F1F4; font-size: 10px; color: #676879; text-align: center; padding-top: 1px; }
.pl-tl-cell.load { padding-top: 6px; font-weight: 700; }
.pl-tl-cell.l1 { background: #EEF5EA; color: var(--pl-olive); }
.pl-tl-cell.l2 { background: #CFE3C2; color: #2F4A23; }
.pl-tl-cell.l3 { background: #F8C9CF; color: #8A0F22; }
.pl-tl-cell.wk { border-left: 2px solid #C9CDD6; }
.pl-tl-cell.today { background: rgba(200, 16, 46, .05); }
.pl-tl-head { display: flex; position: sticky; top: 0; z-index: 4; background: #3C3C3B; color: #fff; height: 30px; }
.pl-tl-head .pl-tl-name { background: #3C3C3B; color: #fff; font-weight: 700; }
.pl-tl-head .pl-tl-cell { color: #fff; border-left-color: #55554F; font-size: 11px; font-weight: 700; padding-top: 7px; }
.pl-tl-bar { position: absolute; top: 5px; height: 24px; border-radius: 4px; color: #fff; font-size: 11px; padding: 4px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.2); z-index: 1; }
.pl-tl-bar.dim { opacity: .35; }
.pl-tl-bar.sel { outline: 3px solid #FFD400; outline-offset: -1px; z-index: 2; opacity: 1; }
.pl-tl-bar.clash { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 4px, transparent 4px 8px); }
.pl-tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--pl-red); z-index: 3; pointer-events: none; }
.pl-tl-lock { position: absolute; top: 0; bottom: 0; background: rgba(60,60,59,.06); z-index: 0; pointer-events: none; border-right: 2px dashed #9AA0A6; }

/* Design status matrix */
.pl-matrix td.st { text-align: center; font-size: 11.5px; min-width: 74px; }

/* Home */
.pl-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; }
.pl-hero-card { background: linear-gradient(120deg, #28312F 0%, #1C2A33 55%, #032F59 100%); color: #fff; border-radius: 12px; padding: 18px 20px; }
.pl-hero-card h2 { font-size: 22px; margin: 0 0 6px; font-weight: 800; }
.pl-hero-card p { color: #E8E9E9; margin: 0 0 8px; line-height: 1.5; font-size: 13.5px; }
.pl-hero-card .tag { display: inline-block; background: rgba(255,255,255,.12); border-radius: 12px; padding: 2px 9px; font-size: 11.5px; margin: 2px 4px 2px 0; }
.pl-launch { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.pl-launch a { display: block; background: #fff; border: 1px solid var(--pl-line); border-left: 5px solid var(--pl-red); border-radius: 10px; padding: 10px 12px; color: var(--pl-ink); }
.pl-launch a.b { border-left-color: var(--pl-navy); }
.pl-launch a.c { border-left-color: #888B8D; }
.pl-launch a:hover { text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.pl-launch b { display: block; font-size: 14px; }
.pl-launch small { color: #676879; font-size: 12px; }

@media (max-width: 900px) { .pl-hero { grid-template-columns: 1fr; } }

@media print {
    .pl-menu, .pl-lang, .pl-ticket-bar, .pl-tabs, .eq-live { display: none !important; }
    .pl-sheet-wrap { border: 0; padding: 0; }
    .pl-scroll { max-height: none; overflow: visible; }
    .pl-sheet td.in input, .pl-sheet td.in select { appearance: none; }
}

/* Sidebar: Gallery tag */
.eq-nav a .eq-nav-tag { margin-left: auto; font-size: 9px; letter-spacing: .04em; color: #B2B4B3; border: 1px solid #4A5452; border-radius: 4px; padding: 1px 4px; }
.eq-nav a.active .eq-nav-tag { color: #fff; border-color: rgba(255,255,255,.5); }
.pl-sheet td.in { background-color: #FFFBEA; }
.pl-panel { overflow-x: auto; }
.pl-meter { width: 60px; }
.pl-toolbar .eq-input { flex: 0 0 auto; width: auto !important; max-width: 280px; }
.pl-toolbar input[type=number].eq-input { max-width: 80px; }
.pl-frow { grid-template-columns: minmax(0, 46%) minmax(0, 54%); }
.pl-frow .eq-input { min-width: 0; max-width: 100%; }
