/* ── Reset & variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --yellow: rgb(255, 219, 50);
    --black: #111113;
    --card-bg: #1e1e22;
    --border: rgba(255,255,255,0.12);
}

/* ── Base ── */
body {
    font-family: 'Lato', sans-serif;
    background: var(--black);
    color: #fff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Flash ── */
.flash {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
}
.flash--error { background: #ff3b3b; color: #fff; }

/* ── Import status bar ── */
.import-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12.5px;
    color: #777;
    margin-bottom: 1.75rem;
}
.import-status--stale {
    background: rgba(255, 160, 0, 0.08);
    border-color: rgba(255, 160, 0, 0.3);
    color: #c8900a;
}
.import-status__icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #555;
}
.import-status--stale .import-status__icon {
    color: #d4930c;
}
.import-status strong {
    color: #aaa;
    font-weight: 600;
}
.import-status--stale strong {
    color: #d4930c;
}
.import-status code {
    font-family: monospace;
    font-size: 11px;
    background: rgba(255,160,0,0.12);
    border-radius: 3px;
    padding: 1px 5px;
    color: #d4930c;
}
.import-status__age {
    color: #555;
}
.import-status--new {
    background: rgba(77, 101, 255, 0.08);
    border-color: rgba(77, 101, 255, 0.3);
    color: #4d65ff;
}
.import-status--new .import-status__icon {
    color: #4d65ff;
}
.import-status--new strong {
    color: #4d65ff;
}

/* ════════════════════════════════
   Login page
════════════════════════════════ */
.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 2.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* ── Logo ── */
.logo img,
.logo svg {
    height: 28px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* ── Login card ── */
.card {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2.5rem;
}

.card__title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.card__sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* ── Google button ── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--yellow);
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
    letter-spacing: -0.01em;
}

.btn-google:hover {
    background: #ffe033;
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
}

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.25rem;
    color: rgba(255,255,255,0.15);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

/* ── Note ── */
.note {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.25);
    line-height: 1.6;
}

.note strong { color: rgba(255,255,255,0.4); }

/* ── Footer ── */
.footer {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.15);
    text-align: center;
}

/* ════════════════════════════════
   Dashboard
════════════════════════════════ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: #1a1a1f;
    border-bottom: 1px solid rgba(255, 214, 0, 0.18);
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.topbar__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.topbar__logo img {
    height: 22px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}
.topbar__brand-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.topbar__version {
    font-size: 0.62rem;
    font-family: monospace;
    color: #fff;
    margin-left: 0.3rem;
    font-weight: 400;
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4d65ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.875rem;
    overflow: hidden;
}

.topbar__avatar img { width: 100%; height: 100%; object-fit: cover; }

.topbar__identity {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.topbar__name {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    line-height: 1;
}

.topbar__role {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--yellow);
    line-height: 1;
}

.topbar__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    border-radius: 7px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.topbar__logout svg { width: 18px; height: 18px; }
.topbar__logout:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.08);
}

.main { padding: 2.5rem; max-width: 1200px; margin: 0 auto; }

.welcome { margin-bottom: 2.5rem; }

.welcome__greeting {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.welcome__greeting span { color: var(--yellow); }

.welcome__sub {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.dashboard-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.5rem;
}

.dashboard-card__icon {
    width: 40px;
    height: 40px;
    background: rgba(255,214,0,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.dashboard-card__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.4rem;
}

.dashboard-card__value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #fff;
}

.dashboard-card__note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin-top: 0.4rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: rgba(255,255,255,0.7);
}

.placeholder-box {
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    color: rgba(255,255,255,0.25);
    font-size: 0.875rem;
}

/* ════════════════════════════════
   Settings
════════════════════════════════ */

.topbar__nav {
    display: flex;
    gap: 0.25rem;
}

.topbar__nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.topbar__nav-link:hover { color: rgba(255,255,255,0.9); }
.topbar__nav-link--active { color: #fff; background: rgba(255,255,255,0.1); }

.nav-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.8;
}
.topbar__nav-link--active .nav-icon { opacity: 1; }

/* ── Settings gear button (right side) ── */
.topbar__settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: rgba(255,255,255,0.45);
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.topbar__settings-btn svg {
    width: 18px;
    height: 18px;
}
.topbar__settings-btn:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.08);
}
.topbar__settings-btn--active {
    color: var(--yellow);
    background: rgba(255,219,50,0.1);
}
.topbar__settings-btn--active:hover {
    color: var(--yellow);
    background: rgba(255,219,50,0.15);
}

/* ── Page header ── */
.settings-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.settings-back {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    display: block;
    margin-bottom: 0.4rem;
    transition: color 0.2s;
}
.settings-back:hover { color: rgba(255,255,255,0.85); }

.settings-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.settings-title__count {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
    margin-left: 0.5rem;
}

/* ── Settings nav cards ── */
.settings-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.settings-nav__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.settings-nav__item:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255, 219, 50, 0.25);
}

.settings-nav__icon {
    font-size: 1.5rem;
}

.settings-nav__label {
    font-weight: 700;
    font-size: 0.9rem;
}

.settings-nav__sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.15rem;
}

/* ── Team grid ── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.team-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
}

.team-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.team-card__header--aqua   { background: rgba(0, 180, 210, 0.15); color: #00c8e8; }
.team-card__header--coral  { background: rgba(255, 90, 90, 0.15);  color: #ff7a7a; }
.team-card__header--yellow { background: rgba(255, 219, 50, 0.15); color: var(--yellow); }
.team-card__header--other  { background: rgba(255,255,255,0.06);   color: rgba(255,255,255,0.4); }

.team-card__count {
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 0.1rem 0.5rem;
    font-size: 0.7rem;
}

.team-card__list {
    list-style: none;
    padding: 0.5rem 0;
}

.team-card__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.team-card__item:last-child { border-bottom: none; }

.team-card__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.team-card__edit {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--yellow);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.team-card__edit:hover { opacity: 1; }

/* ── Team badges ── */
.team-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.team-badge--aqua   { background: rgba(0, 180, 210, 0.15); color: #00c8e8; }
.team-badge--coral  { background: rgba(255, 90, 90, 0.15);  color: #ff7a7a; }
.team-badge--yellow { background: rgba(255, 219, 50, 0.15); color: var(--yellow); }
.team-badge--other  { background: rgba(255,255,255,0.06);   color: rgba(255,255,255,0.4); }

/* ── Projects table ── */
.search-form { display: flex; }

.search-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.875rem;
    width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus { border-color: rgba(255, 219, 50, 0.4); }
.search-input::placeholder { color: rgba(255,255,255,0.25); }

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.data-table th {
    padding: 0.75rem 1.25rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.data-table td {
    padding: 0.7rem 1.25rem;
    color: rgba(255,255,255,0.82);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.04); }

.td-name { color: #fff; max-width: 380px; }
.td-num  { color: rgba(255,255,255,0.45); font-size: 0.72rem; white-space: nowrap; }
.td-action {
    text-align: right;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.inline-form { display: inline; margin: 0; }

.btn-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.btn-link:hover { opacity: 1; }
.btn-link--danger { color: #ff6b6b; }
.btn-link--primary { color: #4d65ff; text-decoration: underline; }

/* ── Side-by-side form fields ── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Edit form ── */
.edit-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 2rem;
    max-width: 560px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    border-color: rgba(255, 219, 50, 0.5);
}

.form-group select option { background: #1a1a1a; }

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.btn-primary {
    background: var(--yellow);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover { background: #ffe033; transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.7rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* ── Alert ── */
.alert {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.alert--success { background: rgba(0, 200, 100, 0.15); color: #00c864; border: 1px solid rgba(0,200,100,0.2); }

/* ── Budget / status badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.badge--active   { background: rgba(0, 200, 100, 0.15); color: #00c864; }
.badge--inactive { background: rgba(255,255,255,0.06);  color: rgba(255,255,255,0.35); }

/* ── Small button variants ── */
.btn-secondary--sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: rgba(220, 50, 50, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(220, 50, 50, 0.25);
    border-radius: 8px;
    padding: 0.7rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-danger:hover { background: rgba(220, 50, 50, 0.25); }
.btn-danger--sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

/* ── Form hint ── */
.form-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
}


/* ════════════════════════════════
   Projects dashboard
════════════════════════════════ */

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    overflow: hidden;
}

.filter-bar--inline {
    flex-direction: row;
    align-items: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    gap: 1.5rem;
}

.filter-bar__group {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.6rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: transparent;
}
.filter-bar__group:nth-child(even) {
    background: rgba(255,255,255,0.02);
}
.filter-bar__group:last-child {
    border-bottom: none;
}

.filter-bar__label {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    min-width: 5.5rem;
    flex-shrink: 0;
    padding-right: 1rem;
    border-right: 1px solid rgba(255,255,255,0.07);
    margin-right: 0.9rem;
    line-height: 1.8;
}

.filter-bar__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.22rem 0.65rem;
    border-radius: 5px;
    font-size: 0.76rem;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
    white-space: nowrap;
}
.pill:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
}
.pill--active {
    background: rgba(255,219,50,0.1);
    color: #ffd93d;
    border-color: rgba(255,219,50,0.22);
    font-weight: 600;
}

.pill--team-aqua.pill--active   { background: rgba(0,200,232,0.1);   color: #00c8e8; border-color: rgba(0,200,232,0.22); }
.pill--team-coral.pill--active  { background: rgba(255,122,122,0.1);  color: #ff7a7a; border-color: rgba(255,122,122,0.22); }
.pill--team-yellow.pill--active { background: rgba(255,219,50,0.1);   color: var(--yellow); border-color: rgba(255,219,50,0.22); }
.pill--team-other.pill--active  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.12); }

/* ── Team section ── */
.projects-team-section {
    margin-bottom: 2.5rem;
    margin-top: 1.5rem;
}

.projects-team-header {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}
.projects-team-header--aqua   { background: rgba(0,200,232,0.12);  color: #00c8e8; }
.projects-team-header--coral  { background: rgba(255,122,122,0.12); color: #ff7a7a; }
.projects-team-header--yellow { background: rgba(255,219,50,0.12);  color: var(--yellow); }
.projects-team-header--other  { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }

.projects-team-section .table-wrap {
    border-radius: 0 0 10px 10px;
}

/* ── Projects table columns ── */
.projects-table .col-client  { width: 14%; }
.projects-table .col-project { width: auto; }
.projects-table .col-hours   { width: 8%; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.projects-table .col-total   { font-weight: 700; color: rgba(255,255,255,0.9); }
.projects-table .col-dev     { color: #5b9cf6; }
.projects-table .col-backlog { color: #a78bfa; }
.projects-table .col-support { color: #fb923c; }
.projects-table .col-pm      { color: #34d399; }

.td-client {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: top;
    padding-top: 0.85rem;
    border-right: 1px solid var(--border);
}

/* ── Project type labels (inline in table) ── */
.type-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-right: 0.4rem;
    vertical-align: middle;
}
.type-label--build { background: rgba(91,156,246,0.15); color: #5b9cf6; }
.type-label--extra { background: rgba(251,146,60,0.15);  color: #fb923c; }

/* ── Project type badge (settings table) ── */
.badge--type-build { background: rgba(91,156,246,0.15); color: #5b9cf6; }
.badge--type-extra { background: rgba(251,146,60,0.15);  color: #fb923c; }

/* ── Extra project rows — amber tint at bottom of table ── */
.row-extra-divider td {
    padding: 0;
    height: 3px;
    background: rgba(251,146,60,0.2);
}

.row-extra td {
    background: rgba(251,146,60,0.05);
    border-bottom: 1px solid rgba(251,146,60,0.08);
}
.row-extra:hover td {
    background: rgba(251,146,60,0.1);
}
.row-extra .td-client--extra {
    border-left: 3px solid rgba(251,146,60,0.4);
    color: rgba(255,200,130,0.8);
}

/* ── Expandable build rows ── */
.row-expandable.has-detail {
    cursor: pointer;
}
.row-expandable.has-detail:hover td {
    background: rgba(255,255,255,0.04);
}

.expand-icon {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    margin-left: 0.5rem;
    color: rgba(255,255,255,0.5);
    transition: transform 0.2s, color 0.2s;
    vertical-align: middle;
}
.row-expandable.has-detail:hover .expand-icon {
    color: rgba(255,255,255,0.85);
}
.row-expandable.is-expanded .expand-icon {
    transform: rotate(90deg);
    color: var(--yellow);
}

.project-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin-left: 0.5rem;
}

/* Detail rows — hidden by default, revealed on expand */
.row-build-detail {
    display: none;
}
.row-build-detail.is-visible {
    display: table-row;
}
.row-build-detail td {
    background: rgba(91,156,246,0.07);
    border-bottom: 1px solid rgba(91,156,246,0.1);
}
.row-build-detail.is-visible:first-of-type td {
    border-top: 1px solid rgba(91,156,246,0.15);
}
.row-build-detail td:first-child {
    border-left: 3px solid rgba(91,156,246,0.45);
}
.row-build-detail:hover td {
    background: rgba(91,156,246,0.11);
}

.td-name--detail {
    padding-left: 2rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
}

/* ── Project type toggle button (settings projects list) ── */
.type-toggle {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s, transform 0.1s;
}
.type-toggle:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}
.type-toggle:active { transform: translateY(0); }
.type-toggle--build { background: rgba(91,156,246,0.15); color: #5b9cf6; border-color: rgba(91,156,246,0.25); }
.type-toggle--extra { background: rgba(251,146,60,0.15);  color: #fb923c; border-color: rgba(251,146,60,0.25); }

/* ── Inline edit links on projects dashboard ── */
.col-edit {
    width: 28px;
    padding: 0 0.5rem 0 0 !important;
    text-align: right;
}

.row-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    color: rgba(255,255,255,0.2);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}
.row-edit-link svg { width: 12px; height: 12px; }
.row-edit-link:hover {
    color: var(--yellow);
    background: rgba(255,219,50,0.1);
}

/* Show edit links only on row hover */
.row-edit-link { opacity: 0; }
tr:hover .row-edit-link { opacity: 1; }

.project-logs-link {
    color: inherit;
    text-decoration: none;
}
.project-logs-link:hover {
    color: var(--yellow);
    text-decoration: underline;
}

/* ── Project logs page ── */
.kpi-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.kpi-card {
    flex: 1 1 140px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .85rem 1.1rem;
}
.kpi-card__label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.kpi-card__value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.td-mono { font-family: monospace; font-size: .85rem; }
.td-description { max-width: 320px; font-size: .82rem; color: var(--text-muted); }
.component-label { font-size: .75rem; background: rgba(255,255,255,.06); border-radius: 4px; padding: 2px 6px; }
.status-label { font-size: .75rem; color: var(--text-muted); }
.tfoot-total td { border-top: 2px solid var(--border); padding-top: .6rem; }
.badge { display: inline-block; font-size: .72rem; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.badge--ok { background: rgba(74,222,128,.15); color: #4ade80; }
.badge--neutral { background: rgba(255,255,255,.06); color: var(--text-muted); }
.settings-subtitle { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }

/* ════════════════════════════════
   Projects sub-nav
════════════════════════════════ */
.projects-subnav {
    background: #131316;
    border-bottom: 1px solid var(--border);
}

.projects-subnav__inner {
    display: flex;
    gap: 0.25rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.projects-subnav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

.projects-subnav__link .nav-icon {
    width: 13px;
    height: 13px;
    opacity: 0.7;
}

.projects-subnav__link:hover {
    color: rgba(255,255,255,0.85);
}

.projects-subnav__link--active {
    color: var(--yellow);
    border-bottom-color: var(--yellow);
}

.projects-subnav__link--active .nav-icon {
    opacity: 1;
}

/* ════════════════════════════════
   PM Insights table
════════════════════════════════ */
.td-client--detail { border-right: 1px solid var(--border); }

.pmi-table .pmi-col-pm     { width: 70px;  text-align: right; color: #34d399; }
.pmi-table .pmi-col-dev    { width: 70px;  text-align: right; color: rgba(255,255,255,0.45); }
.pmi-table .pmi-col-total  { width: 70px;  text-align: right; font-weight: 700; color: rgba(255,255,255,0.9); }
.pmi-table .pmi-col-pct    { width: 80px;  text-align: right; }
.pmi-table .pmi-col-target { width: 65px;  text-align: center; color: rgba(255,255,255,0.35); font-size: 0.8rem; }
.pmi-table .pmi-col-gap    { width: 160px; }

.pmi-pct {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
}
.pmi-pct--low  { background: rgba(255,159,10,0.15);  color: #ff9f0a; }
.pmi-pct--good { background: rgba(52,199,89,0.15);   color: #34c759; }
.pmi-pct--over { background: rgba(91,156,246,0.15);  color: #5b9cf6; }

.pmi-gap {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.pmi-gap--need-pm  { background: rgba(255,159,10,0.12); color: #ff9f0a; }
.pmi-gap--need-dev { background: rgba(91,156,246,0.12); color: #5b9cf6; }
.pmi-gap--on-target { background: rgba(52,199,89,0.12); color: #34c759; }

/* ════════════════════════════════
   Settings nav icons
════════════════════════════════ */
.settings-nav__svg { width: 22px; height: 22px; }

/* ════════════════════════════════
   Users settings page
════════════════════════════════ */
.user-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-avatar--initials {
    background: rgba(255,219,50,0.15);
    color: var(--yellow);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge--role-deliverymanager { background: rgba(255,219,50,0.15);  color: var(--yellow); }
.badge--role-projectmanager  { background: rgba(91,156,246,0.15);  color: #5b9cf6; }
.badge--role-default         { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }

.pill--sm { padding: 0.1rem 0.55rem; font-size: 0.72rem; }

.text-muted { color: rgba(255,255,255,0.4); font-size: 0.85rem; }

.td-actions { text-align: right; width: 80px; }

.btn-sm { padding: 0.25rem 0.65rem; font-size: 0.8rem; }

/* ════════════════════════════════
   Budgets page
════════════════════════════════ */
.budget-table .bud-col-type      { width: 90px; }
.budget-table .bud-col-hours     { width: 80px; text-align: right; }
.budget-table .bud-col-budget    { width: 80px; text-align: right; }
.budget-table .bud-col-remaining { width: 100px; text-align: right; }
.budget-table .bud-col-extra     { width: 140px; }

.bud-type-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.bud-type-badge--monthly { background: rgba(91,156,246,0.15); color: #5b9cf6; }
.bud-type-badge--total   { background: rgba(168,85,247,0.15); color: #a855f7; }

.bud-remaining {
    font-weight: 600;
    font-size: 0.875rem;
}
.bud-remaining--ok      { color: #4ade80; }
.bud-remaining--over    { color: #fb923c; }
.bud-remaining--neutral { color: rgba(255,255,255,0.3); }
.bud-remaining--warn    { color: #fbbf24; }
.bud-remaining--behind  { color: #f87171; }

/* Build-project velocity bar */
.bud-velocity {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.bud-vel-bar {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: visible;
    min-width: 60px;
}
.bud-vel-fill {
    position: absolute;
    inset: 0;
    border-radius: 2px;
    height: 100%;
    transition: width 0.3s;
}
.bud-vel-fill--ok     { background: #4ade80; }
.bud-vel-fill--warn   { background: #fbbf24; }
.bud-vel-fill--behind { background: #f87171; }
.bud-vel-fill--over   { background: #fb923c; }
.bud-vel-marker {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 10px;
    background: rgba(255,255,255,0.55);
    border-radius: 1px;
    transform: translateX(-50%);
    z-index: 1;
}

/* Extra allowance inline display */
.bud-col-extra__inner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.bud-extra-total {
    font-size: 0.8rem;
    color: rgba(255,219,50,0.8);
    font-weight: 600;
}
.bud-extra-hours {
    color: rgba(255,219,50,0.7);
    font-size: 0.85rem;
}

/* Add-extra button */
.bud-add-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 4px;
    transition: color 0.15s;
    margin-left: auto;
}
.bud-add-btn svg { width: 16px; height: 16px; }
.bud-add-btn:hover { color: rgba(255,219,50,0.8); }

/* Delete extra button */
.bud-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 4px;
    transition: color 0.15s;
}
.bud-delete-btn svg { width: 14px; height: 14px; }
.bud-delete-btn:hover { color: #f87171; }

/* Extra detail row */
.bud-extra-row td { background: rgba(255,219,50,0.04); }
.bud-extra-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.6);
}
.bud-extra-icon { width: 12px; height: 12px; color: rgba(255,219,50,0.5); }

/* Over-budget row highlight */
tr.row-build td.bud-col-remaining .bud-remaining--over,
tr.row-extra td.bud-col-remaining .bud-remaining--over {
    background: rgba(248,113,113,0.12);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* Dialog */
.bud-dialog {
    background: #26262c;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem;
    color: #fff;
    width: 380px;
    max-width: 95vw;
}
.bud-dialog::backdrop { background: rgba(0,0,0,0.6); }
.bud-dialog__form { display: flex; flex-direction: column; gap: 1rem; }
.bud-dialog__title { font-size: 1rem; font-weight: 700; }
.bud-dialog__subtitle { font-size: 0.8rem; color: rgba(255,255,255,0.45); margin-top: -0.5rem; }
.bud-dialog__actions { display: flex; gap: 0.75rem; padding-top: 0.25rem; }

/* Inline-add form in project settings */
.inline-add-form__fields {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.form-group--sm { margin-bottom: 0; }
.form-control--sm {
    height: 34px;
    padding: 0 0.6rem;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    width: 120px;
}
.form-control--sm:focus { outline: none; border-color: rgba(255,219,50,0.5); }

/* ── Hours stepper ── */
.hours-stepper {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
    width: 100%;
}
.hours-stepper:focus-within {
    border-color: rgba(255, 219, 50, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 219, 50, 0.08);
}
.hours-stepper__btn {
    flex-shrink: 0;
    width: 38px;
    height: 46px;
    background: rgba(255,255,255,0.04);
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.hours-stepper__btn:hover {
    background: rgba(255, 219, 50, 0.12);
    color: var(--yellow);
}
.hours-stepper__btn:active {
    background: rgba(255, 219, 50, 0.2);
}
.hours-stepper__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0;
    /* hide browser spinners */
    -moz-appearance: textfield;
}
.hours-stepper__input::-webkit-outer-spin-button,
.hours-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hours-stepper__input::placeholder { color: rgba(255,255,255,0.2); font-weight: 400; }
.hours-stepper__unit {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    padding-right: 4px;
    font-weight: 500;
    flex-shrink: 0;
}

/* Compact variant (settings inline form) */
.hours-stepper--sm {
    border-radius: 7px;
    width: 140px;
}
.hours-stepper--sm .hours-stepper__btn {
    width: 30px;
    height: 34px;
    font-size: 1rem;
}
.hours-stepper--sm .hours-stepper__input {
    font-size: 0.875rem;
    font-weight: 600;
}
.hours-stepper--sm .hours-stepper__unit {
    font-size: 0.75rem;
}

.edit-card__header { margin-bottom: 1rem; }
.edit-card__title  { font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.8); }

/* ════════════════════════════════
   Jira page
════════════════════════════════ */
.jira-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #f87171;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Table columns */
.jira-table .jira-col-key      { width: 100px; white-space: nowrap; }
.jira-table .jira-col-type     { width: 28px; padding-right: 0; }
.jira-table .jira-col-summary  { min-width: 260px; }
.jira-table .jira-col-project  { width: 140px; }
.jira-table .jira-col-status   { width: 130px; }
.jira-table .jira-col-priority { width: 36px; text-align: center; padding: 0; }
.jira-table .jira-col-assignee { width: 150px; }
.jira-table .jira-col-updated  { width: 80px; white-space: nowrap; color: rgba(255,255,255,0.4); font-size: 0.8rem; }

.jira-issue-key {
    font-family: monospace;
    font-size: 0.8rem;
    color: #7b9ef7;
    text-decoration: none;
    font-weight: 600;
}
.jira-issue-key:hover { text-decoration: underline; }

.jira-summary-link {
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
}
.jira-summary-link:hover { color: rgba(255,255,255,0.85); }

.jira-type-icon,
.jira-priority-icon { width: 16px; height: 16px; vertical-align: middle; }

/* Status badge */
.jira-status {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.55);
}
.jira-status--new        { background: rgba(100,116,255,0.15); color: #8fa0ff; }
.jira-status--indeterminate { background: rgba(255,160,0,0.12); color: #f0a030; }
.jira-status--done       { background: rgba(52,211,153,0.12); color: #34d399; }

/* Assignee */
.jira-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}
.jira-assignee__avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}
.jira-unassigned { color: rgba(255,255,255,0.25); font-size: 0.8rem; }

/* Jira sync badge */
.jira-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}
.jira-sync-badge__icon { width: 13px; height: 13px; flex-shrink: 0; }
.jira-sync-badge--stale {
    background: rgba(251,191,36,0.08);
    color: #fbbf24;
    border-color: rgba(251,191,36,0.25);
}

.jira-total-note {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    margin-top: 0.75rem;
    text-align: right;
}

/* ── Jira mappings settings page ── */
.jira-mappings-intro {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 1.5rem;
}
.jira-mappings-table th,
.jira-mappings-table td { font-size: 0.875rem; }
.jira-key-badge {
    font-family: monospace;
    font-size: 0.8rem;
    background: rgba(123,158,247,0.12);
    color: #7b9ef7;
    padding: 2px 7px;
    border-radius: 4px;
}
.jira-map-actions { display: flex; gap: 6px; align-items: center; }
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.3);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    transition: color 0.15s, background 0.15s;
}
.btn-icon:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.75); }
.btn-icon--danger:hover { background: rgba(248,113,113,0.1); color: #f87171; }
.btn-icon svg { width: 15px; height: 15px; }

.jira-inline-edit-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 4px 0;
}
.jira-add-form { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.07); }
.jira-add-form__fields {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.jira-project-select {
    width: 420px;
    max-width: 100%;
    height: auto;
    padding-top: 6px;
    padding-bottom: 6px;
}

/* ── Jira Analysis page ── */
.analysis-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.analysis-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 1.1rem 1.5rem;
    min-width: 140px;
}
.analysis-card--under {
    border-color: rgba(52,211,153,0.25);
    background: rgba(52,211,153,0.05);
}
.analysis-card--over {
    border-color: rgba(248,113,113,0.25);
    background: rgba(248,113,113,0.05);
}
.analysis-card--clickable {
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.analysis-card--clickable:hover {
    border-color: rgba(248,113,113,0.5);
    background: rgba(248,113,113,0.12);
}
.analysis-card--active {
    border-color: rgba(248,113,113,0.7) !important;
    background: rgba(248,113,113,0.15) !important;
    box-shadow: 0 0 0 1px rgba(248,113,113,0.3);
}
.analysis-card__value {
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.analysis-card__value-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.analysis-card__filter-icon {
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0.6;
    flex-shrink: 0;
}
.analysis-card--under .analysis-card__value { color: #34d399; }
.analysis-card--over  .analysis-card__value { color: #f87171; }
.analysis-card__label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 0;
}
@media (max-width: 900px) {
    .analysis-grid { grid-template-columns: 1fr; }
}

.analysis-section__title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.75rem;
    font-weight: 500;
}
.analysis-table td, .analysis-table th { font-size: 0.82rem; }
.text-right { text-align: right !important; }
.mono { font-variant-numeric: tabular-nums; }

.usage-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.usage-bar__track {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
}
.usage-bar__fill {
    height: 100%;
    border-radius: 3px;
    background: #7b9ef7;
    transition: width 0.3s ease;
}
.usage-bar__fill--over { background: #f87171; }
.usage-bar__label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Monthly invoice summary ── */
.monthly-summary {
    margin-bottom: 2.5rem;
    border: 1px solid rgba(123,158,247,0.18);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(123,158,247,0.03);
}
.monthly-summary__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(123,158,247,0.12);
    background: rgba(123,158,247,0.05);
}
.monthly-summary__icon { width: 16px; height: 16px; color: #7b9ef7; flex-shrink: 0; }
.monthly-summary__count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.3);
}
.monthly-summary .table-wrap { border-radius: 0; }
.monthly-summary-table tfoot td {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}
.monthly-summary__totals { background: rgba(255,255,255,0.02); }
.text-under { color: #34d399; }

/* ── Analysis ticket table ── */
.analysis-tickets-table .ticket-summary {
    font-size: 0.83rem;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ticket-expand-cell { width: 32px; padding-right: 0 !important; }
.ticket-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.25);
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.ticket-expand-btn:hover { color: rgba(255,255,255,0.7); }
.ticket-expand-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}
.ticket-row--expandable { cursor: default; }
.ticket-row--open { background: rgba(123,158,247,0.04); }
.ticket-row--open td { border-bottom-color: transparent; }
.ticket-row--done { opacity: 0.65; }

.ticket-worklogs__cell {
    padding: 0 !important;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.worklog-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.worklog-detail-table th {
    padding: 6px 12px 6px 12px;
    text-align: left;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.25);
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.worklog-detail-table td {
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.worklog-detail-table tr:last-child td { border-bottom: none; }
.worklog-detail-table th:first-child,
.worklog-detail-table td:first-child { padding-left: 48px; }
.worklog-comment {
    color: rgba(255,255,255,0.35);
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dim { color: rgba(255,255,255,0.28); }
.text-over { color: #f87171; }

/* ── Targets page ── */
.targets-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.targets-panel__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.targets-panel--aqua .targets-panel__header  { border-left: 4px solid #38bdf8; }
.targets-panel--coral .targets-panel__header { border-left: 4px solid #fb7185; }
.targets-panel__team {
    font-weight: 700;
    font-size: 1rem;
    min-width: 120px;
}
.targets-panel__totals {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    flex-wrap: wrap;
}
.targets-total__label { color: rgba(255,255,255,0.45); }
.targets-total__value { font-weight: 600; }
.targets-total__sep   { color: rgba(255,255,255,0.2); }
.targets-total__delta { font-weight: 700; }
.targets-total__delta--over  { color: #4ade80; }
.targets-total__delta--under { color: #f87171; }

.targets-months {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}
.targets-month {
    padding: 0.875rem 0.75rem;
    border-right: 1px solid var(--border);
    min-width: 0;
}
.targets-month:last-child { border-right: none; }
.targets-month--current {
    background: rgba(255,255,255,0.04);
}
.targets-month--future {
    opacity: 0.45;
}
.targets-month__name {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.5rem;
}
.targets-month__target {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.targets-month__target--empty { color: rgba(255,255,255,0.2); font-style: italic; }
.targets-month__revenue {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.targets-month__revenue--empty { color: rgba(255,255,255,0.25); }
.targets-bar__track {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.375rem;
}
.targets-bar__fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.targets-bar__fill--over  { background: #4ade80; }
.targets-bar__fill--near  { background: #facc15; }
.targets-bar__fill--under { background: #f87171; }
.targets-month__delta {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.targets-month__delta--over  { color: #4ade80; }
.targets-month__delta--under { color: #f87171; }
.targets-month__pct {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.4);
}

/* ── Velocity indicator ── */
.velocity {
    margin-top: 0.625rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.velocity__bar-wrap { margin-bottom: 0.3rem; }
.velocity__bar-track {
    position: relative;
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: visible;
}
.velocity__fill {
    height: 100%;
    border-radius: 3px;
    position: relative;
}
.velocity__fill--ahead  { background: #4ade80; }
.velocity__fill--ok     { background: #facc15; }
.velocity__fill--behind { background: #f87171; }
.velocity__marker {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 11px;
    background: rgba(255,255,255,0.5);
    border-radius: 1px;
    transform: translateX(-50%);
    z-index: 1;
}
.velocity__stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}
.velocity__label {
    font-size: 0.625rem;
    color: rgba(255,255,255,0.35);
}
.velocity__pace {
    font-size: 0.6875rem;
    font-weight: 700;
}
.velocity__pace--ahead  { color: #4ade80; }
.velocity__pace--ok     { color: #facc15; }
.velocity__pace--behind { color: #f87171; }
.velocity__proj {
    font-size: 0.625rem;
    color: rgba(255,255,255,0.35);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Clickable month */
.targets-month--clickable {
    cursor: pointer;
    transition: background 0.15s;
}
.targets-month--clickable:hover {
    background: rgba(255,255,255,0.06);
}

/* ── Targets detail panel ── */
.td-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
.td-overlay[hidden] { display: none; }
.td-panel {
    width: min(680px, 100vw);
    height: 100vh;
    background: #1a1a1e;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tdSlideIn 0.2s ease;
}
@keyframes tdSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
.td-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.td-panel__title {
    font-size: 1rem;
    font-weight: 700;
}
.td-panel__sub {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.45);
    margin-top: 0.2rem;
}
.td-panel__close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    border-radius: 4px;
    flex-shrink: 0;
}
.td-panel__close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.td-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem 2rem;
}
.td-loading {
    color: rgba(255,255,255,0.35);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.875rem;
}
.td-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.td-table thead th {
    text-align: left;
    padding: 0.5rem 0.5rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4);
    border-bottom: 1px solid var(--border);
}
.td-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.td-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.td-table td { padding: 0.6rem 0.5rem; vertical-align: middle; }
.td-num { text-align: right; font-variant-numeric: tabular-nums; }
.td-project {
    font-weight: 500;
    max-width: 220px;
    word-break: break-word;
    line-height: 1.3;
}
.td-client {
    color: rgba(255,255,255,0.5);
    max-width: 140px;
    word-break: break-word;
}
.td-type {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.td-type--build { background: rgba(56,189,248,0.15); color: #38bdf8; }
.td-type--extra { background: rgba(251,113,133,0.15); color: #fb7185; }
.td-revenue {
    position: relative;
    padding-left: 0.5rem !important;
}
.td-rev-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    pointer-events: none;
}
.td-rev-val { position: relative; }
.td-badge {
    display: inline-block;
    margin-left: 0.375rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}
.td-badge--cap      { background: rgba(250,204,21,0.15); color: #facc15; }
.td-badge--deducted { background: rgba(239,68,68,0.12); color: #f87171; margin-left: 0.35rem; }

.td-deduct-toggle-cell { width: 2rem; text-align: center; }
.td-deduct-toggle {
    background: none; border: 1px solid var(--border); border-radius: 4px;
    color: var(--text-secondary); cursor: pointer; font-size: 0.85rem;
    padding: 0.1rem 0.4rem; line-height: 1.4;
}
.td-deduct-toggle:hover { border-color: var(--accent); color: var(--accent); }

.td-deduct-cell   { padding: 0.5rem 0.75rem 0.75rem 1.5rem !important; background: var(--bg); }
.td-deduct-section { display: flex; flex-direction: column; gap: 0.5rem; }
.td-deduct-list    { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.td-deduct-item    { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.td-deduct-hours   { font-weight: 600; color: #f87171; min-width: 4rem; }
.td-deduct-note    { color: var(--text-secondary); flex: 1; }
.td-deduct-note--empty { font-style: italic; }
.td-deduct-del     {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 1rem; line-height: 1; padding: 0 0.25rem;
}
.td-deduct-del:hover { color: #f87171; }
.td-deduct-empty   { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin: 0; }
.td-deduct-form    { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; }
.td-deduct-input   { height: 28px; }
.td-table tfoot td {
    padding: 0.625rem 0.5rem;
    border-top: 1px solid var(--border);
}
.td-total-label { color: rgba(255,255,255,0.45); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.td-total { font-weight: 700; }

/* Settings: targets edit grid */
.edit-card--wide { max-width: 900px; }
.targets-edit-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}
@media (max-width: 900px) {
    .targets-edit-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .targets-edit-grid { grid-template-columns: repeat(3, 1fr); }
    .targets-months { grid-template-columns: repeat(6, 1fr); }
}

/* ── Perfect Webshop — Structured Data ─────────────────────────────────── */
.sd-scan-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.sd-scan-input {
    flex: 1;
    font-size: 0.875rem;
}

.sd-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: #f87171;
    font-size: 0.875rem;
}

/* Score summary */
.sd-summary {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.sd-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid;
    justify-content: center;
    flex-shrink: 0;
}
.sd-score--ok   { border-color: #4ade80; color: #4ade80; }
.sd-score--warn { border-color: #fbbf24; color: #fbbf24; }
.sd-score--fail { border-color: #f87171; color: #f87171; }
.sd-score__num  { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.sd-score__pct  { font-size: 0.65rem; line-height: 1; }
.sd-score__label{ font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.sd-summary__stats { display: flex; gap: 1.5rem; }
.sd-stat { display: flex; flex-direction: column; align-items: center; }
.sd-stat__val   { font-size: 1.25rem; font-weight: 700; }
.sd-stat__label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sd-ok   { color: #4ade80; }
.sd-warn { color: #fbbf24; }
.sd-fail { color: #f87171; }

.sd-formats { display: flex; gap: 0.5rem; align-items: center; }
.sd-format-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.sd-format-badge--active { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.sd-format-badge--off    { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.25); border: 1px solid var(--border); }

.sd-no-product {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #fbbf24;
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
}

/* Check sections */
.sd-sections { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }

.sd-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.sd-section__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}
.sd-section__icon svg { width: 16px; height: 16px; color: var(--text-secondary); }
.sd-section__title { font-weight: 600; font-size: 0.875rem; flex: 1; }
.sd-section__score {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
}

.sd-checks {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sd-check {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.82rem;
    transition: background 0.1s;
}
.sd-check:last-child { border-bottom: none; }
.sd-check:hover { background: rgba(255,255,255,0.03); }

.sd-check__icon { flex-shrink: 0; display: flex; align-items: center; }
.sd-check--pass .sd-check__icon svg { width: 15px; height: 15px; color: #4ade80; }
.sd-check--fail .sd-check__icon svg { width: 15px; height: 15px; color: #f87171; }

.sd-check__label { flex: 1; color: rgba(255,255,255,0.85); }
.sd-check--fail .sd-check__label { color: rgba(255,255,255,0.6); }

.sd-level {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    flex-shrink: 0;
}
.sd-level--required          { background: rgba(248,113,113,0.12); color: #f87171; }
.sd-level--required_merchant { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.sd-level--recommended       { background: rgba(148,163,184,0.1);  color: rgba(148,163,184,0.7); }

.sd-check__found {
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
    background: rgba(255,255,255,0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}
.sd-check--pass .sd-check__found { color: rgba(74,222,128,0.7); }
.sd-check__missing {
    font-size: 0.72rem;
    color: rgba(248,113,113,0.5);
    font-style: italic;
}

/* Raw data */
.sd-raw {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.sd-raw__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}
.sd-raw__toggle:hover { color: rgba(255,255,255,0.8); }
.sd-raw__toggle svg { width: 15px; height: 15px; }
.sd-raw__pre {
    margin: 0;
    padding: 1rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.6);
    overflow-x: auto;
    border-top: 1px solid var(--border);
    max-height: 500px;
    overflow-y: auto;
}

/* ── Claude AI analysis ─────────────────────────────────────────────────── */
.sd-claude-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.sd-claude-cta__hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.btn-claude {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.btn-claude:hover { opacity: 0.85; color: #fff; }
.btn-claude svg { width: 16px; height: 16px; }
.sd-claude {
    background: var(--surface);
    border: 1px solid #6366f133;
    border-left: 3px solid #8b5cf6;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.sd-claude__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #a78bfa;
    background: rgba(139,92,246,0.08);
    border-bottom: 1px solid #6366f133;
}
.sd-claude__header svg { width: 16px; height: 16px; }
.sd-claude__body {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
    white-space: pre-wrap;
}

/* ── Perfect Webshop overview ────────────────────────────────────────────── */
.pw-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
}
.pw-empty svg { width: 40px; height: 40px; opacity: 0.3; }
.pw-empty a { color: var(--accent); }

.pw-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.pw-table {
    width: 100%;
    border-collapse: collapse;
}
.pw-th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}
.pw-th--page { text-align: center; width: 130px; }
.pw-th--actions { width: 80px; }

.pw-row { border-bottom: 1px solid var(--border); }
.pw-row:last-child { border-bottom: none; }
.pw-row:hover { background: rgba(255,255,255,0.02); }

.pw-cell { padding: 0.7rem 1rem; vertical-align: middle; }
.pw-cell--client {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    font-size: 0.875rem;
}
.pw-cell--score { text-align: center; }
.pw-cell--actions { text-align: right; white-space: nowrap; }

.pw-team-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pw-team-dot--aqua   { background: #22d3ee; }
.pw-team-dot--coral  { background: #f87171; }
.pw-team-dot--yellow { background: #facc15; }
.pw-team-dot--other  { background: #94a3b8; }

.pw-scanned-at {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: auto;
}

.pw-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.pw-score:hover { opacity: 0.8; }
.pw-score--ok   { background: rgba(74,222,128,0.15); color: #4ade80; }
.pw-score--warn { background: rgba(251,191,36,0.15); color: #fbbf24; }
.pw-score--fail { background: rgba(248,113,113,0.15); color: #f87171; }
.pw-score--none { background: rgba(255,255,255,0.05); color: var(--text-secondary); cursor: default; border-radius: 6px; padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.pw-score--empty { font-size: 0.75rem; color: rgba(255,255,255,0.2); }

.pw-scan-btn, .pw-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.pw-scan-btn:hover, .pw-edit-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.pw-scan-btn svg, .pw-edit-btn svg { width: 14px; height: 14px; }

/* Detail expand row */
.pw-detail-cell { padding: 0; background: rgba(0,0,0,0.2); }
.pw-detail {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.pw-detail__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.pw-detail__label { font-weight: 600; font-size: 0.875rem; flex: 1; }
.pw-detail__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
}
.pw-detail__link svg { width: 13px; height: 13px; }
.pw-detail__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
}
.pw-detail__close:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.pw-detail__close svg { width: 14px; height: 14px; }

.pw-detail__stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.pw-detail__stats strong { color: rgba(255,255,255,0.85); }
.pw-format-badges { display: flex; gap: 0.4rem; }

.pw-detail__sections { display: flex; flex-direction: column; gap: 0.75rem; }
.pw-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.pw-section__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 600;
}
.pw-section__header svg { width: 14px; height: 14px; color: var(--text-secondary); }

/* settings form heading */
.form-group-heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 1.25rem 0 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pw-url-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.pw-url-bar svg { width: 14px; height: 14px; flex-shrink: 0; }
.pw-url-bar__link { flex: 1; color: rgba(255,255,255,0.6); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-url-bar__link:hover { color: rgba(255,255,255,0.9); }
.pw-url-bar__rescan { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.pw-url-bar__rescan svg { width: 13px; height: 13px; }

/* ── Score history dots (overview) ─────────────────────────────────────── */
.pw-cell--score .pw-score-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.pw-history { display: flex; gap: 4px; align-items: center; }
.pw-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.pw-dot--ok   { background: #4ade80; }
.pw-dot--warn { background: #fbbf24; }
.pw-dot--fail { background: #f87171; }
.pw-legend {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ── History bar (detail page) ─────────────────────────────────────────── */
.pw-history-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.pw-history-bar__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}
.pw-history-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-decoration: none;
    background: var(--surface);
    transition: opacity 0.15s;
    min-width: 54px;
}
.pw-history-item:hover { opacity: 0.8; }
.pw-history-item--active { border-width: 2px; }
.pw-history-item--ok     { border-color: rgba(74,222,128,0.4); }
.pw-history-item--warn   { border-color: rgba(251,191,36,0.4); }
.pw-history-item--fail   { border-color: rgba(248,113,113,0.4); }
.pw-history-item--active.pw-history-item--ok   { border-color: #4ade80; background: rgba(74,222,128,0.08); }
.pw-history-item--active.pw-history-item--warn { border-color: #fbbf24; background: rgba(251,191,36,0.08); }
.pw-history-item--active.pw-history-item--fail { border-color: #f87171; background: rgba(248,113,113,0.08); }
.pw-history-item__score { font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.9); }
.pw-history-item__date  { font-size: 0.7rem; color: var(--text-secondary); }

.pw-page-type-badge {
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.2rem 0.5rem;
    color: var(--text-secondary);
    vertical-align: middle;
    margin-left: 0.5rem;
}

.pw-url-bar__date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ── Schema inventory ───────────────────────────────────────────────────── */
.sd-inventory {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem 1rem;
    margin-bottom: 1.25rem;
}
.sd-inventory__title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
}
.sd-inventory__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.sd-inv-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.55rem 0.3rem 0.45rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    font-size: 0.78rem;
}
.sd-inv-item--missing { opacity: 0.55; }
.sd-inv-item__icon { display: flex; align-items: center; flex-shrink: 0; }
.sd-inv-item__icon svg { width: 13px; height: 13px; }

/* icon colours by status */
.sd-inv-item--required  .sd-inv-item__icon svg { color: #4ade80; }
.sd-inv-item--required.sd-inv-item--missing .sd-inv-item__icon svg { color: #f87171; }
.sd-inv-item--recommended .sd-inv-item__icon svg { color: #60a5fa; }
.sd-inv-item--recommended.sd-inv-item--missing .sd-inv-item__icon svg { color: #94a3b8; }
.sd-inv-item--bonus     .sd-inv-item__icon svg { color: #a78bfa; }
.sd-inv-item--detected  .sd-inv-item__icon svg { color: #94a3b8; }
.sd-inv-item--unexpected .sd-inv-item__icon svg { color: #fbbf24; }

.sd-inv-item__type  { font-weight: 500; color: rgba(255,255,255,0.85); }
.sd-inv-item--missing .sd-inv-item__type { color: rgba(255,255,255,0.4); }
.sd-inv-item__count { font-size: 0.7rem; color: var(--text-secondary); }

.sd-inv-item__badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}
.sd-inv-item__badge--required    { background: rgba(74,222,128,0.12);  color: #4ade80; }
.sd-inv-item__badge--recommended { background: rgba(96,165,250,0.12);  color: #60a5fa; }
.sd-inv-item__badge--bonus       { background: rgba(167,139,250,0.12); color: #a78bfa; }
.sd-inv-item__badge--detected    { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }
.sd-inv-item__badge--unexpected  { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.sd-inv-item--missing .sd-inv-item__badge--required    { background: rgba(248,113,113,0.12); color: #f87171; }
.sd-inv-item--missing .sd-inv-item__badge--recommended { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.35); }

/* ── Scan card delete button ────────────────────────────────────────────── */
.pw-history-item { position: relative; padding: 0; }
.pw-history-item__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.7rem;
    text-decoration: none;
    width: 100%;
}
.pw-history-item__delete-form { position: absolute; top: -5px; right: -5px; }
.pw-history-item__delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: none;
    background: rgba(248,113,113,0.85);
    color: #fff;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.pw-history-item__delete svg { width: 10px; height: 10px; }
.pw-history-item:hover .pw-history-item__delete { opacity: 1; }

/* ── Overview dot-score ─────────────────────────────────────────────────── */
.pw-dot-score { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.pw-dot-score__dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.pw-dot-score--ok   .pw-dot-score__dot { background: #4ade80; }
.pw-dot-score--warn .pw-dot-score__dot { background: #fbbf24; }
.pw-dot-score--fail .pw-dot-score__dot { background: #f87171; }
.pw-dot-score--none .pw-dot-score__dot { background: rgba(255,255,255,0.15); }
.pw-dot-score__pct { font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.75); }
.pw-dot-score__empty { font-size: 0.75rem; color: rgba(255,255,255,0.3); }

/* ── App version badge ──────────────────────────────────────────────────── */
