/* ============================================================
   Nuno Billing — Client Portal (v5.3.1 editorial pass)
   ============================================================
   Self-contained styles. The full-bleed body chrome strip lives
   in class-frontend.php's suppress_admin_bar(); this file owns
   everything inside .ncp2.
============================================================ */

.ncp2 {
    /* ----- tokens ----- */
    --bg:        #FAFAF7;
    --bg-soft:   #F4F2EB;
    --paper:     #FFFFFF;
    --ink:       #111111;
    --ink-soft:  #4A4A48;
    --mute:      #8A8A86;
    --line:      #E6E5E0;
    --line-soft: #EFEEEA;
    --accent:    #FF5A1F;
    --accent-ink:#FFFFFF;
    --good:      #2D6A4F;
    --warn:      #B45309;
    --danger:    #B91C1C;

    --c-pm:       #5B8DEF;
    --c-design:   #FF5A1F;
    --c-dev:      #2D6A4F;
    --c-strategy: #8E4FE0;
    --c-other:    #8A8A86;

    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

    /* shell */
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: block;
}
.ncp2 * { box-sizing: border-box; }

/* ============================================================
   PAGE LAYOUT
   The portal owns the full viewport — no header/footer chrome.
   .ncp2-wrap is the inner container, generous but bounded.
============================================================ */
.ncp2-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 40px 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   TOP STRIP — the only thing that looks like a "header" now.
   Brand left, nav middle, sign-out right. One line.
============================================================ */
.ncp2-topstrip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 40px;
}

.ncp2-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ncp2-brand-logo {
    width: 38px; height: 38px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    overflow: hidden;
}
.ncp2-brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.ncp2-brand-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}
.ncp2-brand-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
}
.ncp2-brand-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}

/* ============================================================
   CLIENT SWITCHER
   Native <details>/<summary> dropdown — no extra JS needed for show/hide.
============================================================ */
.ncp2-client-switcher {
    position: relative;
}
.ncp2-client-switcher > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
    transition: background .12s;
}
.ncp2-client-switcher > summary::-webkit-details-marker { display: none; }
.ncp2-client-switcher > summary:hover { background: var(--bg-soft); }
.ncp2-client-switcher > summary svg {
    color: var(--mute);
    transition: transform .15s;
}
.ncp2-client-switcher[open] > summary svg { transform: rotate(180deg); }

.ncp2-client-switcher-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: -6px;
    z-index: 10;
    min-width: 220px;
    padding: 4px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.ncp2-client-switcher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--ink);
    text-align: left;
    border-radius: 4px;
    transition: background .1s;
}
.ncp2-client-switcher-item:hover:not(:disabled) { background: var(--bg-soft); }
.ncp2-client-switcher-item.is-active {
    color: var(--ink);
    cursor: default;
}
.ncp2-client-switcher-item:disabled {
    opacity: 1;  /* the "active" state isn't really disabled visually */
}
.ncp2-csw-check {
    color: var(--accent);
    font-weight: 600;
    margin-left: 12px;
}

/* Inline nav, no underline, mono caps */
.ncp2-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    justify-self: center;
}
.ncp2-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--mute);
    text-decoration: none;
    padding: 4px 0;
    position: relative;
    transition: color .15s;
}
.ncp2-nav a:hover { color: var(--ink-soft); }
.ncp2-nav a.is-active { color: var(--ink); }
.ncp2-nav a.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: -29px;       /* sits on the topstrip border */
    height: 2px;
    background: var(--ink);
}
.ncp2-nav-badge {
    display: inline-flex;
    align-items: center; justify-content: center;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    background: var(--bg-soft);
    color: var(--ink);
    letter-spacing: 0;
}
.ncp2-nav a.is-active .ncp2-nav-badge { background: var(--accent); color: var(--accent-ink); }

.ncp2-topstrip-right { justify-self: end; }

/* ============================================================
   EDITORIAL PERIOD HEADER
   Replaces the period-bar with a single typographic block.
============================================================ */
.ncp2-editorial {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 32px;
    margin-bottom: 36px;
    padding-bottom: 0;
}
.ncp2-editorial-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ncp2-editorial-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mute);
}
.ncp2-editorial h1 {
    font-size: 56px;
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 0.95;
    margin: 0;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.ncp2-editorial h1 .year {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--mute);
    font-weight: 400;
    letter-spacing: 0.06em;
    transform: translateY(-12px);
}
.ncp2-editorial-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--mute);
    text-transform: uppercase;
}

/* Period switcher — quiet mono inline nav, not pills */
.ncp2-period-switcher {
    display: flex;
    align-items: baseline;
    gap: 18px;
}
.ncp2-period-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--mute);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 1.5px solid transparent;
    transition: color .12s, border-color .12s;
}
.ncp2-period-pill:hover { color: var(--ink-soft); }
.ncp2-period-pill.is-active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

/* ============================================================
   SUMMARY ROW — one feature card, the rest are quiet supporting numbers
============================================================ */
.ncp2-summary {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 48px;
}
.ncp2-summary-card {
    background: var(--paper);
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 132px;
    position: relative;
}
.ncp2-summary-card.is-feature {
    background: var(--ink);
    color: var(--paper);
}
.ncp2-summary-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
}
.ncp2-summary-card.is-feature .ncp2-summary-label { color: rgba(255,255,255,.55); }

.ncp2-summary-value {
    font-size: 38px;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-top: auto;
}
.ncp2-summary-card.is-feature .ncp2-summary-value {
    font-size: 48px;
    color: var(--paper);
}
.ncp2-summary-value .unit {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--mute);
    font-weight: 400;
    margin-left: 6px;
    letter-spacing: 0.04em;
}
.ncp2-summary-card.is-feature .ncp2-summary-value .unit { color: rgba(255,255,255,.5); }

.ncp2-summary-sub {
    font-size: 12px;
    color: var(--mute);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}
.ncp2-summary-card.is-feature .ncp2-summary-sub { color: rgba(255,255,255,.6); }

/* ============================================================
   DASHBOARD GRID — breakdown left, activity feed right
============================================================ */
.ncp2-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    align-items: start;
    margin-bottom: 24px;
}
.ncp2-dash-left { min-width: 0; }
.ncp2-dash-right { min-width: 0; }

/* ============================================================
   ACTIVITY FEED
============================================================ */
.ncp2-feed {
    border-top: 1px solid var(--line);
    max-height: 640px;
    overflow-y: auto;
    /* nicer scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}
.ncp2-feed::-webkit-scrollbar { width: 8px; }
.ncp2-feed::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 4px;
}
.ncp2-feed::-webkit-scrollbar-thumb:hover { background: var(--mute); }

.ncp2-feed-date {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute);
    padding: 18px 4px 8px;
    border-bottom: 1px solid var(--line-soft);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1;
}
.ncp2-feed-date:first-child { padding-top: 14px; }

.ncp2-feed-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line-soft);
}
.ncp2-feed-item:last-child { border-bottom: none; }

.ncp2-feed-line {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-soft);
}
.ncp2-feed-line strong {
    color: var(--ink);
    font-weight: 600;
}
.ncp2-feed-line em {
    color: var(--ink);
    font-style: normal;
    font-weight: 500;
}
.ncp2-feed-subject {
    color: var(--ink);
    font-weight: 500;
}

.ncp2-feed-hrs {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    text-align: right;
    white-space: nowrap;
}
.ncp2-feed-hrs .unit {
    color: var(--mute);
    font-weight: 400;
    margin-left: 2px;
}

.ncp2-feed-empty {
    padding: 32px 12px;
    text-align: center;
    color: var(--mute);
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}

@media (max-width: 1000px) {
    .ncp2-dash-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .ncp2-feed { max-height: 480px; }
}


.ncp2-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 18px;
    padding: 0 2px;
}
.ncp2-section-head h2 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
    color: var(--ink);
    font-family: var(--font-mono);
}
.ncp2-section-head-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute);
}

.ncp2-alloc-list {
    border-top: 1px solid var(--line);
    margin-bottom: 32px;
}

.ncp2-alloc-row {
    display: grid;
    grid-template-columns: 1fr auto 280px;
    gap: 32px;
    align-items: center;
    padding: 22px 4px;
    border-bottom: 1px solid var(--line);
}
.ncp2-alloc-name {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}
.ncp2-alloc-rule {
    width: 3px;
    align-self: stretch;
    background: var(--mute);
    border-radius: 1.5px;
    flex-shrink: 0;
}
.ncp2-alloc-label {
    font-weight: 500;
    color: var(--ink);
    font-size: 16px;
    letter-spacing: -0.005em;
    line-height: 1.25;
    margin-bottom: 4px;
}
.ncp2-alloc-rolelist {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--mute);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ncp2-alloc-numbers {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--mute);
    letter-spacing: 0.02em;
    text-align: right;
    white-space: nowrap;
}
.ncp2-alloc-numbers .used {
    color: var(--ink);
    font-weight: 600;
    font-size: 18px;
}
.ncp2-alloc-numbers .sep {
    margin: 0 4px;
    color: var(--mute);
}

.ncp2-alloc-bar-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ncp2-bar {
    flex: 1;
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    overflow: hidden;
}
.ncp2-bar-fill {
    height: 100%;
    background: var(--mute);
    border-radius: 2px;
    transition: width .35s ease;
}
.ncp2-bar-fill.is-over { background: var(--danger); }
.ncp2-alloc-pct {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    min-width: 42px;
    text-align: right;
    letter-spacing: 0.02em;
}
.ncp2-alloc-pct.is-over { color: var(--danger); }
.ncp2-alloc-pct.is-warn { color: var(--warn); }

.ncp2-alloc-empty {
    padding: 56px 0;
    text-align: center;
    color: var(--mute);
    font-size: 14px;
    border-bottom: 1px solid var(--line);
}

/* Metadata strip below allocations — chapter-marker treatment */
.ncp2-alloc-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 4px 0;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mute);
}
.ncp2-alloc-foot a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 1px;
}
.ncp2-alloc-foot a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   BANNER (admin-only warning when no allocations are set)
============================================================ */
.ncp2-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-sm);
    margin-bottom: 28px;
    color: var(--ink-soft);
    font-size: 13px;
}
.ncp2-banner strong { color: var(--ink); }

/* ============================================================
   BUTTONS
============================================================ */
.ncp2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background .15s, border-color .15s, color .15s;
}
.ncp2-btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ncp2-btn-primary:hover { background: #000; color: var(--paper); }
.ncp2-btn-accent  { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ncp2-btn-accent:hover  { background: #E64A0F; color: var(--accent-ink); }
.ncp2-btn-ghost   { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.ncp2-btn-ghost:hover { color: var(--ink); border-color: var(--ink); }
.ncp2-btn-sm { padding: 7px 11px; font-size: 11px; }
.ncp2-btn-lg {
    padding: 14px 22px;
    font-size: 13px;
    letter-spacing: 0.08em;
}

/* Topstrip identity label (submitter name) sits next to Sign Out */
.ncp2-who {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--mute);
    margin-right: 12px;
    text-transform: uppercase;
}

/* Compact editorial header (used on the submitter landing) — same type
   register as the dashboard header but tighter and with a right-side CTA. */
.ncp2-editorial-compact {
    align-items: center;
    margin-bottom: 32px;
}
.ncp2-editorial-compact h1 { font-size: 44px; }

/* ============================================================
   TICKETS LIST — denser, mono tags, priority as left rule
============================================================ */
.ncp2-ticket-list {
    border-top: 1px solid var(--line);
}
.ncp2-ticket-row {
    display: grid;
    grid-template-columns: 4px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 4px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    transition: background .12s;
}
.ncp2-ticket-row:hover {
    background: var(--bg-soft);
    margin: 0 -16px;
    padding-left: 20px;
    padding-right: 20px;
}
.ncp2-ticket-rule {
    align-self: stretch;
    width: 3px;
    background: var(--mute);
    border-radius: 1.5px;
}
.ncp2-ticket-rule.pri-high   { background: var(--danger); }
.ncp2-ticket-rule.pri-medium { background: var(--warn); }
.ncp2-ticket-rule.pri-low    { background: var(--mute); }

.ncp2-ticket-main { min-width: 0; }
.ncp2-ticket-title {
    font-weight: 500;
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.005em;
}
.ncp2-ticket-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--mute);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    gap: 12px;
    align-items: center;
}
.ncp2-ticket-meta .dot { width: 3px; height: 3px; background: var(--mute); border-radius: 50%; }

.ncp2-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0;
    color: var(--mute);
}
.ncp2-tag-pending    { color: var(--warn); }
.ncp2-tag-inprogress { color: var(--c-pm); }
.ncp2-tag-complete   { color: var(--good); }

.ncp2-pri {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--mute);
}

.ncp2-tickets-empty {
    padding: 64px 0;
    text-align: center;
    color: var(--mute);
    border-bottom: 1px solid var(--line);
}
.ncp2-tickets-empty p { margin: 0 0 16px; font-size: 14px; }

/* ============================================================
   SINGLE TICKET VIEW
============================================================ */
.ncp2-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mute);
    text-decoration: none;
    margin-bottom: 24px;
}
.ncp2-back:hover { color: var(--ink); }

.ncp2-ticket-header { margin-bottom: 28px; }
.ncp2-ticket-header h1 {
    font-size: 36px;
    font-weight: 500;
    margin: 0 0 14px;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.ncp2-ticket-header-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--mute);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ncp2-status-card {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-sm);
    margin-bottom: 28px;
    align-items: flex-start;
    border: 1px solid var(--line);
    background: var(--paper);
    border-left: 3px solid var(--mute);
}
.ncp2-status-card.status-pending     { border-left-color: var(--warn); }
.ncp2-status-card.status-in_progress { border-left-color: var(--c-pm); }
.ncp2-status-card.status-complete    { border-left-color: var(--good); }
.ncp2-status-card-icon { font-size: 18px; line-height: 1; }
.ncp2-status-card strong { display: block; font-weight: 600; margin-bottom: 2px; color: var(--ink); }
.ncp2-status-card-desc { font-size: 13px; color: var(--ink-soft); }

.ncp2-ticket-section { margin-bottom: 28px; }
.ncp2-ticket-section h3 {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute);
    margin: 0 0 12px;
    font-weight: 600;
}
.ncp2-ticket-desc {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 20px 22px;
    color: var(--ink-soft);
    line-height: 1.7;
}
.ncp2-ticket-desc :first-child { margin-top: 0; }
.ncp2-ticket-desc :last-child  { margin-bottom: 0; }

.ncp2-assigned-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ncp2-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 12px;
    color: var(--ink-soft);
}
.ncp2-chip-role {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--mute);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ncp2-file-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ncp2-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 12px;
    color: var(--ink-soft);
    text-decoration: none;
    transition: border-color .15s;
}
.ncp2-file:hover { border-color: var(--ink); color: var(--ink); }

/* ============================================================
   FORM (new ticket)
============================================================ */
.ncp2-form-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 32px;
}
.ncp2-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.ncp2-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ncp2-field-wide { grid-column: 1 / -1; }
.ncp2-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mute);
    font-weight: 600;
}
.ncp2-label .optional {
    text-transform: none;
    letter-spacing: 0;
    color: var(--mute);
    font-weight: 400;
    margin-left: 6px;
    font-family: var(--font-sans);
}
.ncp2-input,
.ncp2-select,
.ncp2-textarea {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 14px;
    color: var(--ink);
    background: var(--paper);
    font-family: inherit;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.ncp2-input:focus,
.ncp2-select:focus,
.ncp2-textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.ncp2-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.ncp2-rich-editor {
    min-height: 140px;
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    padding: 14px;
    background: var(--paper);
    font-size: 14px;
    color: var(--ink);
    line-height: 1.65;
    outline: none;
    transition: border-color .15s;
}
.ncp2-rich-editor.focused { border-color: var(--ink); }
.ncp2-rich-editor:empty:before { content: attr(data-placeholder); color: var(--mute); }
.ncp2-editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.ncp2-editor-toolbar button {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 9px;
    font-size: 12px;
    cursor: pointer;
    color: var(--ink-soft);
    font-family: inherit;
}
.ncp2-editor-toolbar button:hover { background: var(--paper); border-color: var(--line); }

.ncp2-file-drop {
    border: 1.5px dashed var(--line);
    border-radius: var(--r-sm);
    padding: 28px;
    text-align: center;
    color: var(--mute);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 13px;
}
.ncp2-file-drop:hover { border-color: var(--ink); color: var(--ink-soft); }
.ncp2-file-drop.drag-over {
    border-color: var(--accent);
    background: #FFF7ED;
    color: var(--ink);
}
.ncp2-file-drop .browse-link {
    color: var(--ink);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.ncp2-file-drop-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ncp2-file-drop-list .ncp2-file-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    padding: 6px 10px;
    border-radius: var(--r-sm);
    font-size: 12px;
    color: var(--ink-soft);
}
.ncp2-file-drop-list .ncp2-file-item button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.ncp2-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.ncp2-notice {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    margin-bottom: 20px;
}
.ncp2-notice-success { background: #D1FAE5; color: #064E3B; border: 1px solid #6EE7B7; }
.ncp2-notice-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* ============================================================
   PAGE HEADER (used for tickets list, new ticket form titles)
============================================================ */
.ncp2-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.ncp2-page-head h1 {
    font-size: 44px;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
    line-height: 1;
}
.ncp2-page-head .sub {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mute);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1000px) {
    .ncp2-wrap { padding: 28px 28px 60px; }
    .ncp2-summary { grid-template-columns: 1fr 1fr; }
    .ncp2-editorial h1 { font-size: 44px; }
    .ncp2-page-head h1 { font-size: 36px; }
}

@media (max-width: 760px) {
    .ncp2-wrap { padding: 24px 20px 60px; }
    .ncp2-topstrip {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 14px 16px;
    }
    .ncp2-nav {
        grid-column: 1 / -1;
        justify-self: start;
        gap: 20px;
    }
    .ncp2-nav a.is-active::after { bottom: -15px; }
    .ncp2-editorial {
        grid-template-columns: 1fr;
        gap: 18px;
        align-items: start;
    }
    .ncp2-editorial h1 { font-size: 38px; }
    .ncp2-summary { grid-template-columns: 1fr; }
    .ncp2-summary-card.is-feature .ncp2-summary-value { font-size: 36px; }
    .ncp2-alloc-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .ncp2-alloc-numbers { text-align: left; }
    .ncp2-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .ncp2-editorial h1 { font-size: 32px; }
    .ncp2-page-head h1 { font-size: 28px; }
    .ncp2-period-switcher { flex-wrap: wrap; gap: 14px; }
}

/* ============================================================
   LOGIN — same shell, smaller card, full-bleed background
============================================================ */
.ncp2-login-wrap {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: var(--font-sans);
}
.ncp2-login-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 44px 40px 36px;
    width: 100%;
    max-width: 420px;
}
