/* ProTracker dashboard styling. Bootstrap supplies the grid and form resets;
   everything visual below is ours, so the look does not drift with Bootstrap. */

/* Inter, self-hosted so the app keeps working offline and pulls nothing from a
   CDN. One variable file carries the whole 400-700 range, which is smaller than
   the four static cuts it replaces. Unlike a display face, Inter is drawn for
   small sizes: it is legible in a 12px table cell, which is most of this app.
   swap: text paints immediately in the fallback and reflows when Inter lands. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

:root {
    --pt-bg: #f5f6f8;
    --pt-surface: #ffffff;
    --pt-border: #e3e6ea;
    --pt-text: #1c2430;
    --pt-muted: #6b7684;
    --pt-accent: #2f6df6;
    --pt-accent-dark: #1f52c9;
    --pt-green: #12a150;
    --pt-amber: #d98a00;
    --pt-red: #d0342c;
    --pt-radius: 10px;

    --pt-shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 4px 14px rgba(20, 30, 45, .05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--pt-bg);
    color: var(--pt-text);
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--pt-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------- display type */
/* Headings stay on the system stack. It is the most legible thing available
   at 12-14px and it has real weights, so bold actually means bold instead of
   one heavy cut. Large sizes take slight negative tracking, which is what
   stops big text looking loose; small sizes are left alone. */
.pt-hero h1,
.pt-page-head h1,
.pt-auth h1,
.pt-stat-value {
    letter-spacing: -.02em;
    line-height: 1.2;
}

.pt-brand,
.pt-card h2,
.pt-empty h3,
.pt-feature h3 {
    line-height: 1.35;
}

/* ---------------------------------------------------------------- chrome */

.pt-nav {
    background: var(--pt-surface);
    border-bottom: 1px solid var(--pt-border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.pt-nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.pt-brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--pt-text);
    display: flex;
    align-items: center;
    gap: 9px;
}
.pt-brand:hover { text-decoration: none; }

.pt-logo {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: linear-gradient(135deg, var(--pt-accent), #7aa2ff);
    display: inline-block;
}

.pt-links { display: flex; gap: 20px; align-items: center; }
/* :not(.pt-btn) matters: these selectors are more specific than .pt-btn, so
   without it a button dropped into the nav loses its white label and renders
   muted grey on the blue fill, which is unreadable. */
.pt-links a:not(.pt-btn) { color: var(--pt-muted); font-weight: 500; }
.pt-links a:not(.pt-btn):hover { color: var(--pt-text); text-decoration: none; }

.pt-user { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pt-company { color: var(--pt-muted); font-size: 13px; }

.pt-link-btn {
    background: none;
    border: 0;
    color: var(--pt-muted);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}
.pt-link-btn:hover { color: var(--pt-text); }

.pt-main { max-width: 1240px; margin: 0 auto; padding: 26px 20px 60px; }

.pt-footer {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
    color: var(--pt-muted);
    font-size: 12px;
    border-top: 1px solid var(--pt-border);
}

/* ---------------------------------------------------------------- blocks */

.pt-card {
    background: var(--pt-surface);
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    box-shadow: var(--pt-shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.pt-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 14px; }

.pt-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.pt-page-head h1 { font-size: 22px; font-weight: 700; margin: 0; }
.pt-sub { color: var(--pt-muted); font-size: 13px; margin-top: 2px; }

.pt-flash {
    background: #e8f5ec;
    border: 1px solid #b7e0c4;
    color: #14663a;
    border-radius: var(--pt-radius);
    padding: 11px 14px;
    margin-bottom: 18px;
}

.pt-error-box {
    background: #fdeceb;
    border: 1px solid #f5c3c0;
    color: #8f231d;
    border-radius: var(--pt-radius);
    padding: 11px 14px;
    margin-bottom: 16px;
}

/* ---------------------------------------------------------------- stats */

.pt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.pt-stat {
    background: var(--pt-surface);
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    box-shadow: var(--pt-shadow);
    padding: 15px 17px;
}
.pt-stat-label { color: var(--pt-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.pt-stat-value { font-size: 26px; font-weight: 700; margin-top: 5px; font-variant-numeric: tabular-nums; }
.pt-stat-hint { color: var(--pt-muted); font-size: 12px; margin-top: 2px; }

/* ---------------------------------------------------------------- tables */

.pt-table { width: 100%; border-collapse: collapse; }
.pt-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--pt-muted);
    font-weight: 600;
    padding: 0 12px 9px;
    border-bottom: 1px solid var(--pt-border);
    white-space: nowrap;
}
.pt-table td { padding: 12px; border-bottom: 1px solid var(--pt-border); vertical-align: middle; }
.pt-table tbody tr:last-child td { border-bottom: 0; }
.pt-table tbody tr:hover { background: #fafbfc; }

.pt-num { text-align: right; font-variant-numeric: tabular-nums; }

/* `.pt-table th` sets text-align:left and, being a class plus an element, outranks
   the bare `.pt-num` class. Without this the heading of every numeric column sits
   left while its figures sit right, so nothing lines up with its own label. */
.pt-table th.pt-num { text-align: right; }

.pt-table-wrap { overflow-x: auto; }

.pt-person { display: flex; align-items: center; gap: 10px; }
.pt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e7ecf6;
    color: var(--pt-accent-dark);
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.pt-person-name { font-weight: 600; }
.pt-person-mail { color: var(--pt-muted); font-size: 12px; }

/* ---------------------------------------------------------------- bits */

.pt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: #c9ced6;
    margin-right: 6px;
}
.pt-dot.live { background: var(--pt-green); box-shadow: 0 0 0 3px rgba(18, 161, 80, .16); }

.pt-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #eef1f5;
    color: var(--pt-muted);
}
.pt-badge.ok { background: #e8f5ec; color: var(--pt-green); }
.pt-badge.warn { background: #fdf3e0; color: var(--pt-amber); }
.pt-badge.bad { background: #fdeceb; color: var(--pt-red); }

.pt-bar { height: 6px; border-radius: 3px; background: #eceff3; overflow: hidden; min-width: 80px; }
.pt-bar span { display: block; height: 100%; border-radius: 3px; }
.act-high span { background: var(--pt-green); }
.act-mid span { background: var(--pt-amber); }
.act-low span { background: #c9ced6; }

.pt-btn {
    display: inline-block;
    background: var(--pt-accent);
    color: #fff;
    border: 1px solid var(--pt-accent);
    border-radius: 7px;
    padding: 8px 15px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.pt-btn:hover { background: var(--pt-accent-dark); color: #fff; text-decoration: none; }
.pt-btn-sm { padding: 5px 11px; font-size: 13px; }
.pt-btn-ghost { background: #fff; color: var(--pt-text); border-color: var(--pt-border); }
.pt-btn-ghost:hover { background: #f4f6f8; color: var(--pt-text); }
.pt-btn-danger { background: #fff; color: var(--pt-red); border-color: #f0c4c1; }
.pt-btn-danger:hover { background: #fdeceb; color: var(--pt-red); }

.pt-range { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-range a {
    padding: 6px 13px;
    border-radius: 7px;
    border: 1px solid var(--pt-border);
    background: #fff;
    color: var(--pt-muted);
    font-size: 13px;
    font-weight: 500;
}
.pt-range a:hover { text-decoration: none; color: var(--pt-text); }
.pt-range a.active { background: var(--pt-accent); border-color: var(--pt-accent); color: #fff; }

/* ---------------------------------------------------------------- forms */

.pt-form { max-width: 460px; }
.pt-form-wide { max-width: 100%; }
.pt-field { margin-bottom: 15px; }
.pt-field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 13px; }
.pt-field input[type=text],
.pt-field input[type=email],
.pt-field input[type=password],
.pt-field input[type=number],
.pt-field input[type=date],
.pt-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--pt-border);
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
    color: var(--pt-text);
}
.pt-field input:focus, .pt-field select:focus {
    outline: none;
    border-color: var(--pt-accent);
    box-shadow: 0 0 0 3px rgba(47, 109, 246, .13);
}
.pt-field .pt-hint { color: var(--pt-muted); font-size: 12px; margin-top: 4px; }
.pt-check { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 13px; }
.pt-check input { margin-top: 3px; }
.pt-check label { font-weight: 500; margin: 0; }
.field-validation-error, .validation-summary-errors { color: var(--pt-red); font-size: 12.5px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

.pt-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 22px; }

/* ---------------------------------------------------------------- auth pages */

.pt-auth { max-width: 420px; margin: 50px auto; }
.pt-auth .pt-card { padding: 26px 26px 22px; }
.pt-auth h1 { font-size: 20px; margin: 0 0 4px; }
.pt-auth .pt-sub { margin-bottom: 20px; }
.pt-auth-alt { text-align: center; margin-top: 16px; color: var(--pt-muted); font-size: 13px; }

/* ---------------------------------------------------------------- invite */

.pt-invite-box { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-invite-box input {
    flex: 1 1 320px;
    padding: 9px 11px;
    border: 1px solid var(--pt-border);
    border-radius: 7px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
    background: #fbfcfd;
}

.pt-code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: .12em;
    background: #eef3fe;
    border: 1px dashed #b9cdfb;
    color: var(--pt-accent-dark);
    border-radius: var(--pt-radius);
    padding: 18px;
    text-align: center;
    margin: 16px 0;
}

.pt-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.pt-steps li {
    counter-increment: step;
    position: relative;
    padding-left: 34px;
    margin-bottom: 12px;
}
.pt-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: var(--pt-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------- gallery */

.pt-shots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 14px;
}

.pt-shot {
    border: 1px solid var(--pt-border);
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}
.pt-shot.idle-shot { border-color: #f0c4c1; box-shadow: 0 0 0 2px rgba(208, 52, 44, .09); }
.pt-shot img { width: 100%; height: 132px; object-fit: cover; display: block; background: #f0f2f5; }
.pt-shot-meta { padding: 8px 10px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pt-shot-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-shot-title { color: var(--pt-muted); font-size: 11px; padding: 0 10px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- timeline */

.pt-timeline { display: flex; gap: 2px; align-items: flex-end; height: 56px; margin-top: 8px; }
.pt-timeline div {
    flex: 1;
    background: #eceff3;
    border-radius: 2px 2px 0 0;
    min-height: 3px;
    position: relative;
}
.pt-timeline div.has-data { background: var(--pt-accent); opacity: .28; }

.pt-empty { text-align: center; padding: 44px 20px; color: var(--pt-muted); }
.pt-empty h3 { font-size: 15px; color: var(--pt-text); margin-bottom: 10px; }

/* ---------------------------------------------------------------- landing */

.pt-hero { text-align: center; padding: 56px 20px 34px; }
.pt-hero h1 { font-size: 34px; font-weight: 700; margin-bottom: 12px; }
.pt-hero p { color: var(--pt-muted); font-size: 16px; max-width: 560px; margin: 0 auto 24px; }
.pt-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.pt-feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.pt-feature p { color: var(--pt-muted); font-size: 13px; margin: 0; line-height: 1.6; }

@media (max-width: 720px) {
    .pt-nav-inner { gap: 14px; }
    .pt-links { gap: 12px; font-size: 13px; }
    .pt-company { display: none; }
}

/* Delete control on a gallery tile. Deliberately understated: removing evidence
   should be possible but never the easiest thing to click by accident. */
.pt-shot-tags { display: inline-flex; align-items: center; gap: 6px; }

.pt-shot-delete {
    background: none;
    border: 0;
    color: #c9ced6;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
}
.pt-shot-delete:hover { color: var(--pt-red); }

/* The one-click hand-off from the join page into the desktop app. Made the
   obvious thing on the page, with the type-it-in-yourself route folded away
   underneath for when the app is not installed. */
.pt-btn-connect {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 18px;
    font-size: 15px;
    margin-top: 4px;
}
.pt-btn-connect:hover { text-decoration: none; }

.pt-manual {
    margin-top: 22px;
    border-top: 1px solid var(--pt-border);
    padding-top: 14px;
}
.pt-manual summary {
    cursor: pointer;
    color: var(--pt-muted);
    font-size: 13px;
    list-style: revert;
}
.pt-manual summary:hover { color: var(--pt-text); }
.pt-manual .pt-code { font-size: 26px; margin: 8px 0 10px; }

/* The clock logo replaces the old gradient square; img needs its own sizing
   because the original rule styled a bare span. */
img.pt-logo { width: 20px; height: 20px; border-radius: 0; background: none; display: inline-block; }
