/* TG Portal — front-end client dashboard.
   Inherits the theme's command-center tokens, with fallbacks so it still
   looks right under any theme. */
.tgp {
  --p-bg:    var(--bg, #0a0b0c);
  --p-panel: var(--panel, #101316);
  --p-panel2:var(--panel-2, #14181c);
  --p-line:  var(--line, rgba(232,228,218,.10));
  --p-line2: var(--line-2, rgba(232,228,218,.18));
  --p-gold:  var(--gold, #c9a654);
  --p-goldbr:var(--gold-br, #e2bd66);
  --p-goldln:var(--gold-line, rgba(201,166,84,.26));
  --p-ink:   var(--ink, #e9e5da);
  --p-ink2:  var(--ink-2, #9b978c);
  --p-ink3:  var(--ink-3, #62605a);
  --p-ok:    var(--nominal, #74a06e);
  --p-cond:  var(--cond, 'Satoshi', sans-serif);
  --p-sans:  var(--sans, 'Satoshi', sans-serif);
  --p-mono:  var(--mono, 'IBM Plex Mono', monospace);

  max-width: 1040px;
  margin: 0 auto;
  font-family: var(--p-sans);
  color: var(--p-ink);
}

.tgp-kicker { font-family: var(--p-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--p-gold); }

/* top bar */
.tgp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--p-line); margin-bottom: 26px; }
.tgp-hello { font-family: var(--p-cond); font-weight: 700; font-size: clamp(26px,4vw,40px); letter-spacing: -.02em; margin: 10px 0 0; line-height: 1.05; }
.tgp-co { color: var(--p-ink2); font-family: var(--p-mono); font-size: 13px; margin: 8px 0 0; }
.tgp-top__meta { font-family: var(--p-mono); font-size: 12px; color: var(--p-ink2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tgp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-ok); box-shadow: 0 0 0 3px rgba(116,160,110,.16); display: inline-block; }
.tgp-logout { color: var(--p-ink2); border: 1px solid var(--p-line2); padding: 7px 13px; text-decoration: none; transition: .2s; }
.tgp-logout:hover { border-color: var(--p-gold); color: var(--p-goldbr); }

.tgp-note { font-family: var(--p-mono); font-size: 12.5px; color: var(--p-ink2); background: var(--p-panel); border: 1px solid var(--p-line); padding: 12px 16px; margin-bottom: 22px; }
.tgp-note a { color: var(--p-goldbr); }
.tgp-note--preview { border-color: var(--p-goldln); color: var(--p-ink); }
.tgp-note--due { border-color: rgba(210,162,63,.5); color: var(--p-ink); }
.tgp-note--due::before { content: "● "; color: #d2a23f; }

.tgp-h3 { font-family: var(--p-cond); font-weight: 600; font-size: 18px; letter-spacing: .01em; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.tgp-count { font-family: var(--p-mono); font-size: 12px; color: var(--p-ink3); border: 1px solid var(--p-line); border-radius: 999px; padding: 2px 9px; }

/* cards */
.tgp-card { background: var(--p-panel); border: 1px solid var(--p-line); padding: 20px; }
.tgp-empty { color: var(--p-ink2); font-size: 14.5px; }

.tgp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 14px; }
.tgp-site { position: relative; transition: border-color .2s, background .2s; }
.tgp-site:hover { border-color: var(--p-line2); background: var(--p-panel2); }
.tgp-site__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tgp-site h4 { font-family: var(--p-cond); font-weight: 600; font-size: 18px; margin: 0; letter-spacing: -.01em; }
.tgp-site__stack { font-family: var(--p-mono); font-size: 12px; color: var(--p-ink3); margin: 10px 0 0; }
.tgp-site__url { display: inline-block; margin-top: 14px; font-family: var(--p-mono); font-size: 12.5px; color: var(--p-goldbr); text-decoration: none; }
.tgp-site__url:hover { text-decoration: underline; }

.tgp-status { font-family: var(--p-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--p-line2); color: var(--p-ink2); white-space: nowrap; }
.tgp-status--live { color: var(--p-ok); border-color: rgba(116,160,110,.4); }
.tgp-status--in_progress { color: var(--p-goldbr); border-color: var(--p-goldln); }
.tgp-status--maintenance { color: #d2a23f; border-color: rgba(210,162,63,.4); }
.tgp-status--paused { color: var(--p-ink3); }

/* coming-soon row */
.tgp-soon { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 30px; }
.tgp-soon__card { display: flex; flex-direction: column; gap: 8px; opacity: .75; }
.tgp-soon__lbl { font-family: var(--p-cond); font-weight: 600; font-size: 16px; }
.tgp-soon__v { font-family: var(--p-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--p-ink3); }

/* login */
.tgp--login { max-width: 440px; }
.tgp-login { background: var(--p-panel); border: 1px solid var(--p-line); padding: clamp(24px,4vw,38px); position: relative; }
.tgp-login::before { content:""; position:absolute; top:-1px; left:-1px; width:12px; height:12px; border-top:1.5px solid var(--p-gold); border-left:1.5px solid var(--p-gold); }
.tgp-login::after { content:""; position:absolute; bottom:-1px; right:-1px; width:12px; height:12px; border-bottom:1.5px solid var(--p-gold); border-right:1.5px solid var(--p-gold); }
.tgp-login__head h2 { font-family: var(--p-cond); font-weight: 700; font-size: 26px; letter-spacing: -.02em; margin: 12px 0 8px; }
.tgp-login__head p { color: var(--p-ink2); font-size: 14px; margin: 0 0 22px; }
.tgp-login .login-username, .tgp-login .login-password { margin-bottom: 14px; }
.tgp-login label { display: block; font-family: var(--p-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--p-ink2); margin-bottom: 7px; }
.tgp-login input[type=text], .tgp-login input[type=password] { width: 100%; background: var(--p-bg); border: 1px solid var(--p-line2); color: var(--p-ink); padding: 12px 14px; font-family: var(--p-sans); outline: none; }
.tgp-login input[type=text]:focus, .tgp-login input[type=password]:focus { border-color: var(--p-gold); box-shadow: 0 0 0 1px var(--p-gold); }
.tgp-login .login-remember { font-family: var(--p-mono); font-size: 12px; color: var(--p-ink2); margin: 6px 0 16px; }
.tgp-login .login-remember label { display: inline; text-transform: none; letter-spacing: 0; font-family: var(--p-sans); }
.tgp-login .button, .tgp-login input[type=submit] { width: 100%; background: var(--p-gold); color: #0a0b0c; border: none; padding: 13px; font-family: var(--p-sans); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; transition: .2s; }
.tgp-login .button:hover, .tgp-login input[type=submit]:hover { background: var(--p-goldbr); }
.tgp-login__lost { margin-top: 16px; text-align: center; }
.tgp-login__lost a { font-family: var(--p-mono); font-size: 12px; color: var(--p-ink2); }
.tgp-login__lost a:hover { color: var(--p-goldbr); }

/* ---- requests + timeline ---- */
.tgp-reqform { margin: 6px 0 20px; }
.tgp-reqform summary { cursor: pointer; font-family: var(--p-mono); font-size: 12.5px; color: var(--p-goldbr); display: inline-block; padding: 9px 15px; border: 1px solid var(--p-goldln); list-style: none; }
.tgp-reqform summary::-webkit-details-marker { display: none; }
.tgp-reqform[open] summary { margin-bottom: 14px; }
.tgp-reqform form { display: grid; gap: 10px; max-width: 580px; }
.tgp-reqform input, .tgp-reqform textarea { background: var(--p-bg); border: 1px solid var(--p-line2); color: var(--p-ink); padding: 11px 13px; font-family: var(--p-sans); outline: none; }
.tgp-reqform input:focus, .tgp-reqform textarea:focus { border-color: var(--p-gold); box-shadow: 0 0 0 1px var(--p-gold); }
.tgp-reqform__btn { background: var(--p-gold); color: #0a0b0c; border: none; font-weight: 600; padding: 11px 18px; cursor: pointer; justify-self: start; font-family: var(--p-sans); }
.tgp-reqform__btn:hover { background: var(--p-goldbr); }

/* overview timeline */
.tgp-tl { margin-top: 4px; }
.tgp-tl__item { display: flex; gap: 15px; position: relative; text-decoration: none; color: inherit; }
.tgp-tl__item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -4px; width: 1px; background: var(--p-line); }
.tgp-tl__item:last-child::before { display: none; }
.tgp-tl__dot { position: relative; z-index: 1; flex: 0 0 11px; width: 11px; height: 11px; border-radius: 50%; margin-top: 18px; background: var(--p-ink3); box-shadow: 0 0 0 4px var(--p-bg), 0 0 0 5px var(--p-line2); }
.tgp-tl--new .tgp-tl__dot, .tgp-tl--quoted .tgp-tl__dot { background: var(--p-goldbr); }
.tgp-tl--approved .tgp-tl__dot, .tgp-tl--in_progress .tgp-tl__dot, .tgp-tl--completed .tgp-tl__dot { background: var(--p-ok); }
.tgp-tl--declined .tgp-tl__dot { background: #c4604f; }
.tgp-tl__body { flex: 1; background: var(--p-panel); border: 1px solid var(--p-line); padding: 14px 16px; margin-bottom: 10px; transition: .2s; }
.tgp-tl__item:hover .tgp-tl__body { border-color: var(--p-line2); background: var(--p-panel2); }
.tgp-tl__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tgp-tl__top b { font-family: var(--p-cond); font-weight: 600; font-size: 16px; }
.tgp-tl__meta { font-family: var(--p-mono); font-size: 11.5px; color: var(--p-ink3); margin-top: 5px; }

/* request status pill */
.tgp-rstatus { font-family: var(--p-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--p-line2); color: var(--p-ink2); white-space: nowrap; }
.tgp-rstatus--new, .tgp-rstatus--quoted { color: var(--p-goldbr); border-color: var(--p-goldln); }
.tgp-rstatus--approved, .tgp-rstatus--in_progress, .tgp-rstatus--completed { color: var(--p-ok); border-color: rgba(116,160,110,.4); }
.tgp-rstatus--declined { color: #c4604f; border-color: rgba(196,96,79,.5); }

/* request detail + scope timeline */
.tgp-back { display: inline-block; font-family: var(--p-mono); font-size: 12px; color: var(--p-ink2); margin: 4px 0 14px; }
.tgp-back:hover { color: var(--p-goldbr); }
.tgp-reqdetail { padding: 24px; }
.tgp-reqdetail__hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tgp-reqdetail__hd h4 { font-family: var(--p-cond); font-weight: 700; font-size: 22px; margin: 0; }
.tgp-reqdetail__desc { color: var(--p-ink2); font-size: 14.5px; margin: 14px 0 22px; white-space: pre-wrap; line-height: 1.6; }
.tgp-scope { display: grid; }
.tgp-scope__item { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.tgp-scope__item::before { content: ""; position: absolute; left: 5px; top: 15px; bottom: -2px; width: 1px; background: var(--p-line); }
.tgp-scope__item:last-child::before { display: none; }
.tgp-scope__dot { flex: 0 0 11px; width: 11px; height: 11px; border-radius: 50%; margin-top: 3px; background: var(--p-ink3); box-shadow: 0 0 0 1px var(--p-line2); z-index: 1; }
.tgp-scope--in_progress .tgp-scope__dot { background: var(--p-goldbr); }
.tgp-scope--done .tgp-scope__dot { background: var(--p-ok); }
.tgp-scope__body { flex: 1; }
.tgp-scope__top { display: flex; justify-content: space-between; gap: 12px; }
.tgp-scope__top b { font-family: var(--p-sans); font-weight: 600; font-size: 15px; color: var(--p-ink); }
.tgp-scope__amt { font-family: var(--p-cond); font-weight: 700; color: var(--p-ink); white-space: nowrap; }
.tgp-scope__st { font-family: var(--p-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--p-ink3); }
.tgp-scope--done .tgp-scope__st { color: var(--p-ok); }
.tgp-scope--in_progress .tgp-scope__st { color: var(--p-goldbr); }
.tgp-scope__total { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--p-line); margin-top: 4px; padding-top: 16px; }
.tgp-scope__total span { font-family: var(--p-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--p-ink3); }
.tgp-scope__total b { font-family: var(--p-cond); font-weight: 800; font-size: 24px; color: var(--p-goldbr); }
.tgp-approve { margin-top: 20px; background: var(--p-gold); color: #0a0b0c; border: none; font-weight: 700; font-family: var(--p-sans); padding: 13px 22px; cursor: pointer; font-size: 15px; }
.tgp-approve:hover { background: var(--p-goldbr); }
.tgp-approve__note { font-family: var(--p-mono); font-size: 11px; color: var(--p-ink3); margin-top: 10px; }
.tgp-note--ok { border-color: rgba(116,160,110,.4); color: var(--p-ink); margin-top: 18px; }

/* ---- updates / checklist / files (per request) ---- */
.tgp-updates, .tgp-checklist, .tgp-files { margin-top: 14px; }
.tgp-card h5 { font-family: var(--p-cond); font-weight: 600; font-size: 15px; margin: 0; }
.tgp-updates__hd, .tgp-checklist__hd, .tgp-files__hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.tgp-update { border-top: 1px solid var(--p-line); padding: 12px 0; }
.tgp-update:first-of-type { border-top: none; padding-top: 0; }
.tgp-update__hd { display: flex; gap: 10px; align-items: baseline; }
.tgp-update__hd b { font-family: var(--p-cond); font-weight: 600; font-size: 14px; }
.tgp-update__hd span { font-family: var(--p-mono); font-size: 11px; color: var(--p-ink3); }
.tgp-update__body { color: var(--p-ink2); font-size: 14px; margin-top: 5px; line-height: 1.55; }

.tgp-checklist__prog { font-family: var(--p-mono); font-size: 12px; color: var(--p-ink2); }
.tgp-checklist__bar { height: 5px; background: var(--p-panel2); margin: 0 0 14px; overflow: hidden; }
.tgp-checklist__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--p-gold), var(--p-ok)); transition: width .3s ease; }
.tgp-checks { list-style: none; margin: 0; padding: 0; }
.tgp-check { padding: 9px 0; border-top: 1px solid var(--p-line); }
.tgp-check:first-child { border-top: none; }
.tgp-check label { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.tgp-check__box { width: 18px; height: 18px; accent-color: var(--p-ok); flex: 0 0 auto; cursor: pointer; }
.tgp-check span { font-size: 14.5px; color: var(--p-ink); transition: .2s; }
.tgp-check.is-done span { color: var(--p-ink3); text-decoration: line-through; }

.tgp-filelist { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.tgp-filelist li { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; padding: 9px 12px; background: var(--p-bg); border: 1px solid var(--p-line); }
.tgp-filelist a { color: var(--p-goldbr); text-decoration: none; word-break: break-all; }
.tgp-filelist a:hover { text-decoration: underline; }
.tgp-filelist span { font-family: var(--p-mono); font-size: 11px; color: var(--p-ink3); white-space: nowrap; }
.tgp-files__empty { color: var(--p-ink2); font-size: 14px; margin: 0 0 14px; }
.tgp-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tgp-upload input[type=file] { color: var(--p-ink2); font-size: 13px; font-family: var(--p-sans); max-width: 100%; }
.tgp-upload button { background: var(--p-gold); color: #0a0b0c; border: none; font-weight: 600; padding: 9px 16px; cursor: pointer; font-family: var(--p-sans); }
.tgp-upload button:hover { background: var(--p-goldbr); }
.tgp-upload__note { font-family: var(--p-mono); font-size: 11px; color: var(--p-ink3); margin: 10px 0 0; }
.tgp-files__err { color: #d98a7a; font-size: 13px; margin: 0 0 10px; }

/* ---- subscription (monthly billing) ---- */
.tgp-sub { margin-top: 14px; }
.tgp-sub__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tgp-sub__lbl { font-family: var(--p-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--p-ink3); display: block; margin-bottom: 4px; }
.tgp-sub__amt { font-family: var(--p-cond); font-weight: 800; font-size: 24px; color: var(--p-ink); }
.tgp-sub__amt small { font-family: var(--p-mono); font-weight: 400; font-size: 12px; color: var(--p-ink3); }
.tgp-sub__meta { color: var(--p-ink2); font-size: 14px; margin: 12px 0 0; }
.tgp-sub__btn { margin-top: 14px; background: none; border: 1px solid var(--p-line2); color: var(--p-ink); font-family: var(--p-sans); font-size: 14px; padding: 10px 18px; cursor: pointer; }
.tgp-sub__btn:hover { border-color: var(--p-gold); color: var(--p-goldbr); }
.tgp-sub__btn--gold { background: var(--p-gold); border-color: var(--p-gold); color: #0a0b0c; font-weight: 600; }
.tgp-sub__btn--gold:hover { background: var(--p-goldbr); color: #0a0b0c; }

/* ---- invoices ---- */
.tgp-invoices { display: grid; gap: 10px; }
.tgp-inv { display: flex; align-items: center; gap: 14px; background: var(--p-panel); border: 1px solid var(--p-line); padding: 14px 16px; transition: border-color .2s; }
.tgp-inv:hover { border-color: var(--p-line2); }
.tgp-inv__main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.tgp-inv__main b { font-family: var(--p-cond); font-weight: 600; font-size: 15px; }
.tgp-inv__amt { font-family: var(--p-cond); font-weight: 700; font-size: 16px; color: var(--p-ink); }
.tgp-inv__btn { font-family: var(--p-mono); font-size: 12.5px; color: var(--p-goldbr); text-decoration: none; white-space: nowrap; }
.tgp-inv__btn:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .tgp-soon { grid-template-columns: 1fr; }
  .tgp-inv { flex-wrap: wrap; }
}
