/* GITECHY Design – app. Colours from the logo: charcoal #2F2F2D, blue #4F86E8, red #D9534F, green #3F8F4F, amber #F0B040, blueprint cyan #5FB3C4. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body.gd { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f2937; background: #f3f5f8; }
a { color: #2f6bd8; }
.gd-muted { color: #6b7280; }
.gd-top { display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 58px; background: #2F2F2D; color: #fff; position: sticky; top: 0; z-index: 20; }
.gd-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.gd-brand b { color: #5FB3C4; }
.gd-logo-sq { width: 34px; height: 34px; border-radius: 8px; }
.gd-nav { display: flex; gap: 4px; }
.gd-nav a { color: #d1d5db; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.gd-nav a.is-on, .gd-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.gd-who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: #d1d5db; }
.gd-who form { margin: 0; }
.gd-link { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; font: inherit; }
.gd-msg { max-width: 1100px; margin: 16px auto 0; padding: 10px 14px; border-radius: 10px; background: #e8f1ff; border: 1px solid #b9d0f7; }
.gd-msg.is-err { background: #fdecec; border-color: #f2b8b6; color: #8a1c1c; }
.gd-main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.gd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-bottom: 14px; }
.gd-head h1, .gd-main h1 { margin: 0; font-size: 26px; }
.gd-card { background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; padding: 16px; }
.gd-new { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.gd-new input, .gd-new select { flex: 1 1 200px; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid #cfd6e0; border-radius: 8px; background: #fff; color: inherit; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #4F86E8; outline-offset: 0; border-color: #4F86E8; }
.gd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 1px solid #cfd6e0; background: #fff; color: #1f2937; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.gd-btn:hover { border-color: #9aa6b5; }
.gd-btn-primary { background: #2F2F2D; border-color: #2F2F2D; color: #fff; }
.gd-btn-primary:hover { background: #111; }
.gd-btn-sm { padding: 5px 10px; font-size: 13px; }
.gd-danger { color: #b42318; border-color: #f2b8b6; }
.gd-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gd-row form { margin: 0; }
.gd-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.gd-tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: #374151; font-weight: 600; }
.gd-tabs a.is-on { background: #2F2F2D; color: #fff; }
.gd-search { margin-left: auto; }
.gd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gd-proj { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; border-left: 4px solid #4F86E8; }
.gd-proj:hover { border-color: #2f6bd8; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.gd-proj span { color: #4b5563; font-size: 14px; }
.gd-proj small { color: #6b7280; }
.gd-empty { padding: 30px; text-align: center; color: #6b7280; background: #fff; border: 1px dashed #cfd6e0; border-radius: 12px; }
.gd-proj-head { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; }
.gd-h1-input { font-size: 20px; font-weight: 700; }
.gd-upload { margin-bottom: 16px; }
.gd-upload.is-over { border-color: #4F86E8; background: #f3f7ff; }
.gd-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed #b9c3d0; border-radius: 10px; cursor: pointer; text-align: center; }
.gd-drop input { display: none; }
.gd-progress p { margin: 6px 0 0; font-size: 14px; }
.gd-progress .is-err { color: #b42318; }
.gd-sheet { display: flex; flex-direction: column; gap: 8px; }
.gd-thumb { display: block; aspect-ratio: 4 / 3; background: #f3f5f8; border-radius: 8px; overflow: hidden; border: 1px solid #e3e7ee; }
.gd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gd-sheet .gd-row input { flex: 1; }
.gd-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid #e3e7ee; justify-content: space-between; }
.gd-table { width: 100%; border-collapse: collapse; }
.gd-table th, .gd-table td { text-align: left; padding: 8px; border-bottom: 1px solid #eef1f5; }
.gd-form { display: grid; gap: 12px; max-width: 520px; margin-bottom: 16px; }
.gd-form label, .gd-auth label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.gd-auth { min-height: calc(100vh - 58px); display: flex; align-items: center; justify-content: center; padding: 20px; background: #2F2F2D url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M40 0H0v40' fill='none' stroke='%235FB3C4' stroke-opacity='.18'/%3E%3C/svg%3E"); }
.gd-auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.gd-auth-card h1 { font-size: 22px; margin: 6px 0 16px; }
.gd-auth-card form { display: grid; gap: 12px; }
.gd-auth-logo { width: 64px; height: 64px; }
.gd-check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }

/* ---------- editor ---------- */
.gd-v-sheet { overflow: hidden; }
.gd-editor { position: fixed; inset: 58px 0 0 0; display: grid; grid-template-columns: 230px 1fr; grid-template-rows: auto 1fr; background: #e9edf2; }
.gd-ebar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border-bottom: 1px solid #dfe4ea; }
.gd-ebar select { max-width: 200px; padding: 5px 8px; }
.gd-tools { display: inline-flex; gap: 2px; padding: 3px; background: #f1f3f6; border-radius: 10px; }
.gd-tools button { width: 38px; height: 34px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 17px; }
.gd-tools button.is-on { background: #2F2F2D; color: #fff; }
.gd-tools button:hover:not(.is-on) { background: #e2e6ec; }
.gd-scale { font-size: 13px; color: #0e7490; font-weight: 600; }
.gd-scale.is-warn { color: #b45309; }
.gd-save { margin-left: auto; font-size: 13px; color: #6b7280; }
.gd-save.is-ok { color: #3F8F4F; }
.gd-save.is-err { color: #b42318; }
.gd-palette { overflow-y: auto; background: #fff; border-right: 1px solid #dfe4ea; padding: 10px; }
.gd-palette[hidden] { display: none; }
.gd-palette input[type=search] { width: 100%; margin-bottom: 6px; padding: 7px 9px; }
.gd-palette h4 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.gd-syms { display: grid; gap: 4px; }
.gd-syms button { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border: 1px solid transparent; background: none; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; font-size: 13px; }
.gd-syms button:hover { background: #f3f5f8; }
.gd-syms button.is-on { border-color: #2F2F2D; background: #eef2f7; }
.gd-sb { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 2px solid; border-radius: 50%; background: #fff; }
.gd-sb.is-box { border-radius: 7px; }
.gd-sb svg { width: 20px; height: 20px; }
.gd-sl { line-height: 1.2; }
.gd-size { display: grid; gap: 4px; margin-top: 14px; font-size: 13px; font-weight: 600; }
.gd-canvas { position: relative; overflow: hidden; touch-action: none; background: #e9edf2; }
.gd-v-sheet:not(:has(.gd-palette:not([hidden]))) .gd-editor { grid-template-columns: 1fr; }
.gd-props { position: absolute; top: 60px; right: 12px; width: 280px; max-height: calc(100% - 76px); overflow-y: auto; background: #fff; border: 1px solid #dfe4ea; border-radius: 12px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); display: grid; gap: 8px; z-index: 5; }
.gd-props[hidden] { display: none; }
.gd-props label { display: grid; gap: 3px; font-size: 13px; font-weight: 600; }
.gd-props input, .gd-props textarea { padding: 6px 8px; }
.gd-props h4 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; }
.gd-ph { display: flex; align-items: center; gap: 8px; }
.gd-ph button { margin-left: auto; border: 0; background: none; color: #6b7280; cursor: pointer; text-decoration: underline; }
.gd-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.gd-layers { position: absolute; left: 242px; bottom: 12px; background: rgba(255,255,255,.96); border: 1px solid #dfe4ea; border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; z-index: 4; min-width: 200px; }
.gd-v-sheet:not(:has(.gd-palette:not([hidden]))) .gd-layers { left: 12px; }
.gd-lay { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gd-lay label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.gd-lay small { color: #6b7280; }
.gd-hint { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); background: #2F2F2D; color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; z-index: 6; pointer-events: none; }
.gd-hint[hidden] { display: none; }

@media (max-width: 900px) {
	.gd-top { gap: 12px; padding: 0 12px; }
	.gd-who span { display: none; }
	.gd-brand span { display: none; }
	.gd-proj-head { grid-template-columns: 1fr; }
	.gd-editor { grid-template-columns: 120px 1fr; }
	.gd-sl { display: none; }
	.gd-syms { grid-template-columns: 1fr 1fr; }
	.gd-layers { left: 132px; }
	.gd-props { width: min(280px, calc(100% - 24px)); }
}
@media (max-width: 560px) {
	.gd-nav a { padding: 6px 8px; }
	.gd-editor { grid-template-columns: 76px 1fr; }
	.gd-syms { grid-template-columns: 1fr; }
	.gd-layers { left: 86px; min-width: 0; }
	.gd-scale { display: none; }
}

/* ---------- cable runs (M2) ---------- */
.gd-warn { margin: 6px 0 0; color: #b45309; font-size: 13px; }
.gd-small { font-size: 13px; }
.gd-totals-box { position: absolute; left: 242px; top: 60px; width: 280px; max-height: 40%; overflow-y: auto; background: rgba(255,255,255,.97); border: 1px solid #dfe4ea; border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; z-index: 4; }
.gd-totals-box[hidden] { display: none; }
.gd-tot { display: flex; align-items: center; gap: 6px; }
.gd-tot b { margin-left: auto; white-space: nowrap; }
.gd-tot small { color: #6b7280; }
.gd-len b { font-size: 16px; }
.gd-totals td:not(:first-child), .gd-totals th:not(:first-child) { text-align: right; }
.gd-props select { padding: 6px 8px; }
@media (max-width: 900px) { .gd-totals-box { width: 220px; left: 132px; } }
@media (max-width: 560px) { .gd-totals-box { left: 86px; } }
.gd-v-sheet:not(:has(.gd-palette:not([hidden]))) .gd-totals-box { left: 12px; }

/* ---------- power (M3) ---------- */
.gd-power-box { position: absolute; right: 12px; bottom: 12px; width: 300px; max-height: 50%; overflow-y: auto; background: rgba(255,255,255,.97); border: 1px solid #dfe4ea; border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 8px; z-index: 4; }
.gd-power-box[hidden] { display: none; }
.gd-src { cursor: pointer; padding: 6px; border-radius: 8px; }
.gd-src:hover { background: #f3f5f8; }
.gd-bar { height: 7px; background: #e5e7eb; border-radius: 99px; overflow: hidden; margin: 4px 0; }
.gd-bar i { display: block; height: 100%; }
.gd-bad { color: #b42318; font-weight: 600; }
.gd-near { color: #b45309; font-weight: 600; }
tr.gd-bad td, tr.gd-near td { font-weight: 600; }
.gd-tools button[data-act=power].is-on, .gd-tools button[data-act=legend].is-on { background: #2F2F2D; color: #fff; }
.gd-scroll { overflow-x: auto; }

/* ---------- proposal (M5) ---------- */
.gd-main-prop { max-width: 1000px; }
.gd-prop { background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; padding: 28px; }
.gd-public .gd-prop { max-width: 1000px; margin: 24px auto; }
.gd-prop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.gd-prop-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 3px solid #2F2F2D; padding-bottom: 16px; }
.gd-prop-logo { max-height: 70px; max-width: 220px; display: block; margin-bottom: 8px; }
.gd-prop-co { margin: 0; font-size: 14px; }
.gd-prop-title { text-align: right; }
.gd-prop-title h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: .02em; }
.gd-prop-title p { margin: 0 0 6px; }
.gd-prop-sec { margin-top: 26px; }
.gd-prop-sec h2 { font-size: 18px; border-bottom: 1px solid #e3e7ee; padding-bottom: 6px; }
.gd-prop-plan { margin: 0 0 18px; }
.gd-prop-plan img { width: 100%; min-height: 120px; border: 1px solid #e3e7ee; border-radius: 6px; background: #f3f5f8; display: block; }
.gd-prop-plan figcaption { font-size: 13px; color: #6b7280; margin-top: 4px; }
.gd-bom td:nth-child(n+3), .gd-bom th:nth-child(n+3) { text-align: right; }
.gd-sum td { font-weight: 600; text-align: right; }
.gd-sum td:first-child { text-align: right; }
.gd-grand td { font-size: 17px; border-top: 2px solid #2F2F2D; }
.gd-approve label { display: grid; gap: 4px; font-weight: 600; margin-bottom: 10px; max-width: 420px; }
.gd-sig { display: block; width: 100%; max-width: 600px; height: 180px; border: 2px dashed #b9c3d0; border-radius: 10px; touch-action: none; background: #fff; margin-bottom: 8px; }
.gd-sig-img { max-width: 320px; border-bottom: 1px solid #333; }
.gd-prop-foot { text-align: center; margin: 16px 0 30px; }
.gd-revs { margin-top: 12px; }
.gd-linkbox { width: 260px; font-size: 12px; padding: 4px 6px; }
.gd-st-approved { color: #3F8F4F; font-weight: 600; }
.gd-st-declined { color: #b42318; font-weight: 600; }
.gd-logo-prev { max-height: 60px; max-width: 200px; display: block; margin: 4px 0; }
.gd-form-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: none; }
.gd-prices input { width: 110px; padding: 5px 7px; }
.gd-cathead td { background: #f3f5f8; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
/* Snapshot frames: only the plan. */
.gd-snap .gd-top, .gd-snap .gd-ebar, .gd-snap .gd-palette, .gd-snap .gd-layers, .gd-snap .gd-props, .gd-snap .gd-totals-box, .gd-snap .gd-power-box, .gd-snap .gd-hint { display: none !important; }
.gd-snap .gd-editor { inset: 0; grid-template-columns: 1fr; grid-template-rows: 1fr; }
@media print {
	.gd-top, .gd-noprint, .gd-msg { display: none !important; }
	body.gd { background: #fff; }
	.gd-main, .gd-prop { padding: 0; border: 0; max-width: none; margin: 0; }
	.gd-prop-plan { page-break-inside: avoid; }
	.gd-prop-sec { page-break-inside: auto; }
	.gd-prop-plans { page-break-after: always; }
	tr { page-break-inside: avoid; }
}
/* Page and Download panels (0.6). */
.gd-col { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.gd-props input[type=file] { font-size: .85rem; margin-top: 4px; }
