/* ============================================================
   Nuno Billing — Frontend Styles
   ============================================================ */

/* ---- Reset scoping ---- */
.nuno-dashboard, .nuno-login-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #1a1a2e;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LOGIN
   ============================================================ */
.nuno-login-wrap {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.nuno-login-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 44px 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.nuno-login-logo {
    text-align: center;
    margin-bottom: 24px;
}
.nuno-login-logo img { max-height: 50px; }
.nuno-site-name { font-size: 20px; font-weight: 700; color: #2d3748; margin: 0; }

.nuno-login-heading {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
    color: #1a202c;
}
.nuno-login-sub { text-align: center; color: #718096; font-size: 14px; margin: 0 0 28px; }

.nuno-login-form .nuno-field { margin-bottom: 18px; }
.nuno-login-form label { display: block; font-size: 13px; font-weight: 600; color: #4a5568; margin-bottom: 6px; }
.nuno-login-form input[type=email],
.nuno-login-form input[type=password] {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    color: #1a202c;
    background: #f7fafc;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.nuno-login-form input:focus { border-color: #4a6fa5; box-shadow: 0 0 0 3px rgba(74,111,165,.15); background:#fff; }

.nuno-fe-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 10px 14px;
    color: #c53030;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.nuno-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    transition: background .15s, transform .1s, box-shadow .15s;
    line-height: 1;
}
.nuno-btn:active { transform: scale(.98); }

.nuno-btn-primary  { background: #4a6fa5; color: #fff; }
.nuno-btn-primary:hover { background: #3a5a8a; color: #fff; }

.nuno-btn-secondary { background: #edf2f7; color: #2d3748; border: 1.5px solid #e2e8f0; }
.nuno-btn-secondary:hover { background: #e2e8f0; color: #1a202c; }

.nuno-btn-ghost { background: transparent; color: #718096; border: 1.5px solid #e2e8f0; }
.nuno-btn-ghost:hover { background: #f7fafc; color: #4a5568; }

.nuno-btn-full { width: 100%; padding: 12px 20px; font-size: 15px; }

.nuno-btn-submit {
    background: linear-gradient(135deg, #2f855a, #276749);
    color: #fff;
    padding: 13px 36px;
    font-size: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(39,103,73,.3);
}
.nuno-btn-submit:hover { background: linear-gradient(135deg, #276749, #22543d); color:#fff; }

.nuno-btn-sm { padding: 7px 14px; font-size: 13px; }
.nuno-btn:disabled, .nuno-btn.disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   DASHBOARD HEADER
   ============================================================ */
.nuno-dashboard { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

/* ============================================================
   DASHBOARD HEADER — identity + stats + filters + actions
   ============================================================ */
.nuno-dash-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    flex-wrap: wrap;
}
.nuno-dash-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-right: 12px;
    border-right: 1px solid #e8edf2;
    margin-right: 4px;
}
.nuno-user-name  { font-size: 14px; font-weight: 700; color: #1a202c; }
.nuno-user-roles { font-size: 11px; color: #a0aec0; margin-top: 1px; }

/* Stats */
.nuno-dash-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 12px;
    border-right: 1px solid #e8edf2;
    margin-right: 4px;
    flex-shrink: 0;
}
.nuno-dash-stat { display: flex; flex-direction: column; align-items: center; }
.nuno-dash-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
    letter-spacing: -.4px;
}
.nuno-dash-stat-money { color: #276749; }
.nuno-dash-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #a0aec0;
    margin-top: 2px;
}
.nuno-dash-stat-divider { width: 1px; height: 28px; background: #e2e8f0; }

/* Filter selects in header */
.nuno-dash-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.nuno-filter-select {
    padding: 5px 9px;
    font-size: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    background: #f7fafc;
    color: #2d3748;
    outline: none;
    font-family: inherit;
    min-width: 120px;
    max-width: 170px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.nuno-filter-select:focus,
.nuno-filter-select:not([value=""]) { border-color: #4a6fa5; background: #fff; }

/* ============================================================
   PERIOD STRIP — top of the timesheet card, flows into table
   ============================================================ */
/* Unified timesheet card */
.nuno-ts-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    margin-bottom: 20px;
    background: #fff;
}

.nuno-period-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 11px 18px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}
.nuno-period-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    flex-shrink: 0;
    transition: background .12s, border-color .12s, color .12s;
    font-family: inherit;
}
.nuno-period-nav-btn:hover { background: #ebf4ff; border-color: #4a6fa5; color: #2b6cb0; text-decoration: none; }
.nuno-period-nav-btn:disabled,
.nuno-period-nav-btn--disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

.nuno-period-info { flex: 1; text-align: center; }
.nuno-period-label { font-size: 15px; font-weight: 700; color: #1a202c; }
.nuno-period-sub   { font-size: 11px; color: #a0aec0; margin-top: 1px; }

/* ============================================================
   FILTER TOOLBAR
   ============================================================ */
.nuno-ts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.nuno-ts-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nuno-filter-select {
    padding: 6px 10px;
    font-size: 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #2d3748;
    outline: none;
    font-family: inherit;
    min-width: 140px;
    cursor: pointer;
    transition: border-color .15s;
}
.nuno-filter-select:focus { border-color: #4a6fa5; }
.nuno-filter-stats {
    font-size: 13px;
    color: #718096;
    padding: 4px 10px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    white-space: nowrap;
}
.nuno-filter-stats strong { color: #2d3748; }
.nuno-ts-save-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #718096;
    flex-shrink: 0;
}

/* ============================================================
   SAVE STATUS
   ============================================================ */
.nuno-save-status {
    text-align: right;
    font-size: 13px;
    min-height: 22px;
    margin-bottom: 6px;
    padding-right: 4px;
}
.nuno-save-status .status-saved  { color: #2f855a; }
.nuno-save-status .status-saving { color: #718096; }
.nuno-save-status .status-error  { color: #c53030; }

/* ============================================================
   TIMESHEET TABLE
   ============================================================ */
.nuno-ts-wrap {
    background: #fff;
    /* borders and shadow come from .nuno-ts-card */
    overflow: hidden;
    margin-bottom: 0;
}

.nuno-ts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.nuno-ts-table thead th {
    background: #edf2f7;
    padding: 9px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #4a5568;
    border-bottom: 2px solid #cbd5e0;
    white-space: nowrap;
}

.nuno-ts-table tbody tr {
    border-bottom: 1px solid #f0f4f8;
    transition: background .1s;
}
.nuno-ts-table tbody tr:hover { background: #f7fafc; }
.nuno-ts-table tbody tr:last-child { border-bottom: none; }

.nuno-ts-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.nuno-ts-table tfoot td {
    padding: 12px 10px;
    font-weight: 600;
    background: #f7fafc;
    border-top: 2px solid #e2e8f0;
    font-size: 14px;
}

/* Column widths */
.nuno-ts-table .col-date    { width: 130px; }
.nuno-ts-table .col-hours   { width: 90px; }
.nuno-ts-table .col-client  { width: 160px; }
.nuno-ts-table .col-project { width: 160px; }
.nuno-ts-table .col-role    { width: 140px; }
.nuno-ts-table .col-desc    { min-width: 200px; }
.nuno-ts-table .col-actions { width: 40px; text-align: center; }

/* Inputs inside table */
.nuno-input, .nuno-select {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 9px;
    font-size: 13px;
    color: #2d3748;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    font-family: inherit;
}
.nuno-input:focus, .nuno-select:focus {
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74,111,165,.12);
}
input.nuno-input[type=number] { width: 80px; }
input.nuno-input[type=date]   { width: 120px; }

/* Delete row button */
.nuno-row-delete {
    width: 28px; height: 28px;
    border-radius: 6px;
    border: 1px solid #fed7d7;
    background: #fff5f5;
    color: #e53e3e;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.nuno-row-delete:hover { background: #fed7d7; }

/* Row error */
.row-error {
    font-size: 11px;
    color: #c53030;
    margin-top: 4px;
}

/* Table footer */
.nuno-ts-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}
.nuno-ts-totals-inline { font-size: 14px; color: #4a5568; }
.nuno-ts-totals-inline strong { color: #2d3748; font-size: 16px; }

/* ============================================================
   SUBMIT SECTION
   ============================================================ */
.nuno-submit-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    text-align: center;
    margin-top: -1px;
}
.nuno-submit-warning {
    font-size: 13px;
    color: #4a5568;
    max-width: 560px;
}
.nuno-submit-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.nuno-save-status-line {
    font-size: 12px;
    color: #a0aec0;
    min-height: 18px;
}
.nuno-save-status-line .status-error { color: #e53e3e; }

/* ============================================================
   SUBMITTED STATE
   ============================================================ */
.nuno-submitted-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #276749;
}
.nuno-submitted-icon {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #38a169;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Readonly table */
.nuno-ts-readonly {
    overflow: hidden;
}
.nuno-ts-table .nuno-ts-totals td { background: #f0fff4; color: #276749; font-size: 15px; }

/* ============================================================
   MODAL
   ============================================================ */
.nuno-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.nuno-modal {
    background: #fff;
    border-radius: 14px;
    padding: 32px 36px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
.nuno-modal h3 { margin: 0 0 14px; font-size: 20px; color: #1a202c; }
.nuno-modal p  { color: #4a5568; margin: 0 0 10px; }
.nuno-modal-actions { display: flex; gap: 10px; margin-top: 24px; justify-content: flex-end; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .nuno-dashboard { padding: 16px 10px 40px; }

    .nuno-ts-wrap { overflow-x: auto; }
    .nuno-ts-table { min-width: 700px; }

    .nuno-dash-header { flex-direction: column; gap: 12px; align-items: flex-start; }

    .nuno-login-card { padding: 32px 24px; }

    .nuno-period-strip { flex-wrap: wrap; }
    .nuno-period-info { order: -1; width: 100%; }

    .nuno-summary-bar { flex-wrap: wrap; }
    .nuno-summary-item { flex: 1; min-width: 100px; }

    .nuno-modal { padding: 24px 20px; }
    .nuno-modal-actions { flex-direction: column; }
    .nuno-modal-actions .nuno-btn { width: 100%; }
}

@media (max-width: 480px) {
    .nuno-period-label { font-size: 15px; }
    .nuno-ts-footer { flex-direction: column; gap: 10px; text-align: center; }
    .nuno-submit-section { padding: 20px 16px; }
}

/* ============================================================
   DASHBOARD ENHANCEMENTS — summary identity card, action bar
   ============================================================ */
.nuno-summary-identity {
    flex-direction: row !important;
    gap: 10px;
    align-items: center;
    padding: 12px 18px !important;
    min-width: 0;
}
.nuno-summary-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.nuno-summary-avatar-placeholder {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #4a6fa5;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    flex-shrink: 0;
}
.summary-name { font-size: 14px; font-weight: 600; color: #2d3748; }
.nuno-summary-billing .summary-num { color: #2f855a; }
.summary-money { font-size: 22px !important; }
.totals-sep { color: #cbd5e0; margin: 0 4px; }
.totals-money { color: #2f855a; }

.nuno-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 6px 2px;
    min-height: 32px;
}

/* ============================================================
   FRONTEND ADMIN PANEL — unified header, full-width, modern
   ============================================================ */

/* Hide WP admin bar for nuno-admin users on frontend */
.nuno-fe-admin ~ * #wpadminbar,
body.logged-in.nuno-admin-page #wpadminbar { display: none !important; }
body.nuno-admin-page { margin-top: 0 !important; padding-top: 0 !important; }

.nuno-fe-admin {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #1A1814;
    background: #FAFAF7;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 60px;
    min-height: 100vh;
}

/* ============================================================
   fe-admin design tokens — editorial pass, aligned with the
   client portal (.ncp2) and the ALIV SRS look. Warm cream
   surfaces, warm ink, JetBrains Mono for figures.
============================================================ */
.nuno-fe-admin {
    --fa-bg:        #FAFAF7;
    --fa-bg-soft:   #F4F2EB;
    --fa-paper:     #FFFFFF;
    --fa-ink:       #1A1814;
    --fa-ink-soft:  #4A4A48;
    --fa-mute:      #8A8A86;
    --fa-line:      #E6E5E0;
    --fa-line-soft: #EFEEEA;

    --fa-accent:     #BC3E08;   /* SRS warm rust */
    --fa-accent-ink: #FFFFFF;
    --fa-accent-bg:  #F6E9E0;

    --fa-good:     #0F4F47;     /* SRS deep teal */
    --fa-good-bg:  #E4EDEB;
    --fa-warn:     #8a5a10;
    --fa-warn-bg:  #F3E9D2;
    --fa-danger:   #B91C1C;
    --fa-danger-bg:#F6E2E0;

    --fa-r-sm: 6px;
    --fa-r-md: 10px;
    --fa-r-lg: 14px;

    --fa-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---- Unified Header ---- */
.nfea-header {
    display: flex;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid var(--fa-line);
    margin-bottom: 28px;
    background: var(--fa-paper);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--fa-line);
}

.nfea-header-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px 0 4px;
    border-right: 1px solid var(--fa-line);
    margin-right: 4px;
    flex-shrink: 0;
}
.nfea-logo-mark {
    width: 28px;
    height: 28px;
    background: var(--fa-accent);
    color: var(--fa-accent-ink);
    font-size: 14px;
    font-weight: 800;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -.5px;
}
.nfea-logo-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--fa-ink);
    letter-spacing: -.2px;
}

/* ---- Tabs inside header ---- */
.nfea-header .nfea-tabs {
    display: flex;
    align-items: stretch;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    height: 52px;
}
.nfea-header .nfea-tabs::-webkit-scrollbar { display: none; }

.nfea-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fa-mute);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .12s, border-color .12s, background .12s;
}
.nfea-tab svg { flex-shrink: 0; opacity: .6; transition: opacity .12s; }
.nfea-tab:hover { color: var(--fa-ink); background: var(--fa-bg-soft); text-decoration: none; }
.nfea-tab:hover svg { opacity: 1; }
.nfea-tab.active {
    color: var(--fa-accent);
    border-bottom-color: var(--fa-accent);
    font-weight: 600;
    background: var(--fa-accent-bg);
}
.nfea-tab.active svg { opacity: 1; }

/* ---- User menu in header ---- */
.nfea-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    flex-shrink: 0;
    border-left: 1px solid var(--fa-line);
    height: 52px;
    position: relative;
}
.nfea-wp-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--fa-mute);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid var(--fa-line);
    transition: all .12s;
}
.nfea-wp-link:hover { color: var(--fa-ink); border-color: var(--fa-mute); background: var(--fa-bg-soft); text-decoration: none; }
.nfea-user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .12s;
}
.nfea-user-menu:hover { background: var(--fa-bg-soft); }
.nfea-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--fa-ink);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Checkbox toggle for fe-admin user dropdown */
.nfea-menu-cb {
    display: none !important;
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}
.nfea-user-menu {
    cursor: pointer;
    user-select: none;
}
.nfea-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    cursor: default;
}
.nfea-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--fa-paper);
    border: 1px solid var(--fa-line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(26,24,20,.12);
    min-width: 170px;
    z-index: 200;
    overflow: hidden;
}
.nfea-menu-cb:checked ~ .nfea-user-dropdown { display: block; }
.nfea-menu-cb:checked ~ .nfea-menu-overlay  { display: block; }
.nfea-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--fa-ink);
    text-decoration: none;
    transition: background .1s;
}
.nfea-user-dropdown a:hover { background: var(--fa-bg-soft); text-decoration: none; }
.nfea-user-dropdown a.nfea-signout { color: var(--fa-danger); border-top: 1px solid var(--fa-line-soft); }
.nfea-user-dropdown a.nfea-signout:hover { background: var(--fa-danger-bg); }

/* ---- Content area ---- */
.nfea-content { padding: 0; }

.nfea-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.nfea-page-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--fa-ink);
}
.nfea-period-subtitle {
    font-size: 13px;
    color: var(--fa-mute);
    margin: 2px 0 0;
}
.nfea-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--fa-ink);
}
.nfea-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.nfea-card-header h3 { margin: 0; }
.nfea-card-sub { font-size: 12px; color: var(--fa-mute); font-weight: 500; }

/* ---- KPI Strip ---- */
.nfea-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.nfea-kpi {
    background: var(--fa-paper);
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-r-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(26,24,20,.04);
}
.nfea-kpi-profit { border-left: 3px solid var(--fa-good); }
.nfea-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--fa-r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nfea-kpi-icon-hours   { background: var(--fa-bg-soft); color: var(--fa-ink-soft); }
.nfea-kpi-icon-billable { background: var(--fa-good-bg); color: var(--fa-good); }
.nfea-kpi-icon-cost    { background: var(--fa-warn-bg); color: var(--fa-warn); }
.nfea-kpi-icon-profit  { background: var(--fa-good-bg); color: var(--fa-good); }
.nfea-kpi-num {
    font-family: var(--fa-mono);
    font-size: 21px;
    font-weight: 700;
    color: var(--fa-ink);
    letter-spacing: -.5px;
    line-height: 1.1;
}
.nfea-kpi-label {
    font-size: 11px;
    color: var(--fa-mute);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.nfea-kpi-badge {
    background: var(--fa-good-bg);
    color: var(--fa-good);
    padding: 1px 6px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

/* ---- Margin pill ---- */
.nfea-margin-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--fa-mono);
}
.nfea-margin-pill.high { background: var(--fa-good-bg); color: var(--fa-good); }
.nfea-margin-pill.mid  { background: var(--fa-warn-bg); color: var(--fa-warn); }
.nfea-margin-pill.low  { background: var(--fa-danger-bg); color: var(--fa-danger); }

/* ---- Cards ---- */
.nfea-card {
    background: var(--fa-paper);
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-r-md);
    padding: 20px 22px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(26,24,20,.04);
}

/* ---- List cards ---- */
.nfea-list-card {
    background: var(--fa-paper);
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-r-md);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(26,24,20,.04);
}
.nfea-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fa-line-soft);
    gap: 12px;
    transition: background .1s;
}
.nfea-list-row:hover { background: var(--fa-bg-soft); }
.nfea-list-row:last-child { border-bottom: none; }

/* ---- Tables ---- */
.nfea-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.nfea-table th {
    background: var(--fa-bg-soft);
    padding: 9px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--fa-mute);
    border-bottom: 1px solid var(--fa-line);
    white-space: nowrap;
}
.nfea-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--fa-line-soft);
    vertical-align: middle;
    color: var(--fa-ink);
}
.nfea-table tr:last-child td { border-bottom: none; }
.nfea-table tbody tr:hover td { background: var(--fa-bg-soft); }
.nfea-tfoot td {
    font-weight: 700;
    background: var(--fa-bg-soft);
    border-top: 2px solid var(--fa-line);
    border-bottom: none !important;
}
/* numeric cells render in mono for column alignment */
.nfea-num { font-family: var(--fa-mono); }
.nfea-amt-good   { color: var(--fa-good); font-weight: 600; }
.nfea-amt-cost   { color: var(--fa-mute); }
.nfea-amt-profit { font-weight: 600; }
.nfea-amt-pos    { color: var(--fa-good); }
.nfea-amt-neg    { color: var(--fa-danger); }

/* ---- Project grid ---- */
.nfea-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.nfea-project-card {
    background: var(--fa-paper);
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-r-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(26,24,20,.04);
    transition: box-shadow .15s, transform .15s;
}
.nfea-project-card:hover { box-shadow: 0 4px 16px rgba(26,24,20,.08); transform: translateY(-1px); }
.nfea-proj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.nfea-proj-name { font-size: 14px; font-weight: 700; color: var(--fa-ink); }
.nfea-proj-client { font-size: 12px; color: var(--fa-mute); margin-top: 2px; }
.nfea-proj-due { font-size: 11px; color: var(--fa-accent); font-weight: 500; }
.nfea-proj-actions { display: flex; gap: 6px; margin-top: 2px; }

/* Status pills */
.nfea-status-pill {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nfea-status-pill.status-active    { background: var(--fa-good-bg); color: var(--fa-good); }
.nfea-status-pill.status-on-hold   { background: var(--fa-warn-bg); color: var(--fa-warn); }
.nfea-status-pill.status-completed { background: var(--fa-bg-soft); color: var(--fa-ink-soft); }
.nfea-status-pill.status-cancelled { background: var(--fa-danger-bg); color: var(--fa-danger); }

/* Budget bar */
.nfea-proj-budget {}
.nfea-budget-bar-track {
    height: 5px;
    background: var(--fa-line-soft);
    border-radius: 3px;
    overflow: hidden;
}
.nfea-budget-bar-fill { height: 100%; border-radius: 3px; }
.nfea-budget-nums { display: flex; justify-content: space-between; font-size: 11px; color: var(--fa-mute); margin-top: 3px; font-family: var(--fa-mono); }

/* Empty state */
.nfea-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--fa-mute);
    font-size: 14px;
    background: var(--fa-paper);
    border: 1px dashed var(--fa-line);
    border-radius: var(--fa-r-md);
}
.nfea-empty a { color: var(--fa-accent); }

/* ---- Buttons ---- */
.nfea-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fa-ink);
    background: var(--fa-paper);
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-r-sm);
    text-decoration: none;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    white-space: nowrap;
}
.nfea-btn-sm:hover { background: var(--fa-bg-soft); border-color: var(--fa-mute); text-decoration: none; color: var(--fa-ink); }
.nfea-btn-sm-ghost {
    background: transparent;
    color: var(--fa-mute);
    border-color: var(--fa-line);
}

.nfea-link {
    font-size: 13px;
    color: var(--fa-accent);
    text-decoration: none;
    font-weight: 500;
}
.nfea-link:hover { text-decoration: underline; }

/* ---- Form elements ---- */
.nfea-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--fa-ink-soft);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}
.nfea-select-sm {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-r-sm);
    background: var(--fa-paper);
    color: var(--fa-ink);
    outline: none;
    font-family: inherit;
}
.nfea-select-sm:focus { border-color: var(--fa-accent); }

.nfea-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.nfea-field { display: flex; flex-direction: column; }
.nfea-field-wide { grid-column: span 2; }
.nfea-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8edf2;
}
.nfea-admin-badge {
    display: inline-block;
    font-size: 10px;
    background: #ebf8ff;
    color: #2b6cb0;
    border-radius: 3px;
    padding: 1px 6px;
    font-weight: 700;
    margin-left: 4px;
    text-transform: uppercase;
}

/* ---- Inputs (reused from frontend) ---- */
.nuno-fe-input, .nuno-fe-select {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    padding: 8px 11px;
    font-size: 13px;
    color: #2d3748;
    background: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.nuno-fe-input:focus, .nuno-fe-select:focus {
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74,111,165,.1);
}
textarea.nuno-fe-input { resize: vertical; }
.nuno-btn-danger { background: #fff5f5; color: #e53e3e; border: 1.5px solid #fed7d7; }
.nuno-btn-danger:hover { background: #fed7d7; color: #c53030; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nfea-header { flex-wrap: wrap; height: auto; }
    .nfea-header-logo { padding: 10px 14px; border-right: none; }
    .nfea-header .nfea-tabs { order: 3; width: 100%; border-top: 1px solid #e8edf2; height: 42px; }
    .nfea-tab span { display: none; }
    .nfea-tab { padding: 0 12px; }
    .nfea-header-user { border-left: none; margin-left: auto; padding: 0 10px; height: 44px; }
    .nfea-kpi-strip { grid-template-columns: 1fr 1fr; }
    .nfea-form-grid { grid-template-columns: 1fr; }
    .nfea-field-wide { grid-column: span 1; }
    .nfea-project-grid { grid-template-columns: 1fr; }
    .nfea-user-name { display: none; }
}

/* ============================================================
   NAV MENU INJECTED ITEMS
   ============================================================ */
.nuno-nav-user { position: relative; }

/* Hidden checkbox — the toggle mechanism */
.nuno-menu-toggle-cb {
    display: none !important;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Toggle button (label) */
.nuno-nav-user-toggle {
    display: flex !important;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background .12s;
}
.nuno-nav-user-toggle:hover { background: rgba(0,0,0,.06); }
.nuno-nav-username { font-size: 14px; font-weight: 600; }
.nuno-menu-caret { font-size: 9px; color: #a0aec0; margin-left: 1px; transition: transform .15s; }

/* Click-away overlay — invisible fullscreen layer behind the dropdown */
.nuno-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    cursor: default;
}

/* Dropdown panel */
.nuno-user-dropdown {
    display: none !important;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.13);
    z-index: 9999;
    overflow: hidden;
    padding: 4px 0;
    list-style: none !important;
    margin: 0 !important;
}
.nuno-user-dropdown li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.nuno-user-dropdown a {
    display: block !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    color: #2d3748 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .1s;
    line-height: 1.4 !important;
}
.nuno-user-dropdown a:hover { background: #f7fafc !important; color: #1a202c !important; }
.nuno-signout-item { border-top: 1px solid #f0f4f8 !important; margin-top: 4px !important; }
.nuno-signout-item a { color: #e53e3e !important; }
.nuno-signout-item a:hover { background: #fff5f5 !important; }

/* OPEN STATE — checkbox checked */
.nuno-menu-toggle-cb:checked ~ .nuno-user-dropdown { display: block !important; }
.nuno-menu-toggle-cb:checked ~ .nuno-menu-overlay  { display: block; }
.nuno-menu-toggle-cb:checked ~ .nuno-nav-user-toggle .nuno-menu-caret { transform: rotate(180deg); }

.nuno-nav-user-toggle .nuno-initials-avatar,
.nuno-nav-user-toggle img {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================================================
   INITIALS AVATARS
   ============================================================ */
.nuno-initials-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    user-select: none;
    letter-spacing: -.5px;
}
.nuno-initials-avatar.sz-sm { width:32px; height:32px; font-size:13px; }
.nuno-initials-avatar.sz-md { width:44px; height:44px; font-size:17px; }
.nuno-initials-avatar.sz-lg { width:56px; height:56px; font-size:22px; }
.nuno-initials-avatar.sz-xl { width:72px; height:72px; font-size:28px; }
.nuno-av-a,.nuno-av-n { background:#4a6fa5; }
.nuno-av-b,.nuno-av-o { background:#e07b39; }
.nuno-av-c,.nuno-av-p { background:#2f855a; }
.nuno-av-d,.nuno-av-q { background:#805ad5; }
.nuno-av-e,.nuno-av-r { background:#c53030; }
.nuno-av-f,.nuno-av-s { background:#2b6cb0; }
.nuno-av-g,.nuno-av-t { background:#276749; }
.nuno-av-h,.nuno-av-u { background:#b7791f; }
.nuno-av-i,.nuno-av-v { background:#2c7a7b; }
.nuno-av-j,.nuno-av-w { background:#9b2c2c; }
.nuno-av-k,.nuno-av-x { background:#553c9a; }
.nuno-av-l,.nuno-av-y { background:#2d3748; }
.nuno-av-m,.nuno-av-z { background:#285e61; }

/* ============================================================
   PERIOD STATUS BADGE
   ============================================================ */
.nuno-period-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================================
   PERIOD STATE BANNERS
   ============================================================ */
.nuno-alert-banner,
.nuno-overdue-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.nuno-alert-banner {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}
.nuno-overdue-banner {
    background: #fffaf0;
    border: 1px solid #feebc8;
    color: #9c4221;
}

/* ============================================================
   UNAVAILABLE PERIOD
   ============================================================ */
.nuno-period-unavailable {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}
.nuno-period-unavailable h3 {
    font-size: 18px;
    font-weight: 600;
    color: #718096;
    margin: 16px 0 8px;
}
.nuno-period-unavailable p {
    font-size: 14px;
    color: #a0aec0;
}
.nuno-period-unavailable strong { color: #718096; }

/* Save bar — sits between period+table card and submit section */
.nuno-ts-save-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 8px 4px;
    font-size: 12px;
    color: #a0aec0;
    min-height: 36px;
}

/* Card-internal banner rows */
.nuno-ts-card-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    border-bottom: 1px solid transparent;
}
.nuno-ts-card-banner--alert {
    background: #fff5f5;
    color: #c53030;
    border-bottom-color: #fed7d7;
}
.nuno-ts-card-banner--warn {
    background: #fffaf0;
    color: #9c4221;
    border-bottom-color: #feebc8;
}

/* Card toolbar (save button) */
.nuno-ts-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 7px 14px;
    background: #fafbfc;
    border-bottom: 1px solid #edf2f7;
    min-height: 40px;
}

/* Period unavailable inside card */
.nuno-ts-card .nuno-period-unavailable {
    padding: 48px 20px;
    background: #fff;
}

/* Period AJAX loading transition */
#nuno-period-region {
    transition: opacity .2s ease;
}
#nuno-period-region.nuno-loading {
    opacity: .45;
    /* pointer-events removed — JS periodLoading flag prevents double-clicks */
}

/* Role select disabled state (no client chosen yet) */
.entry-role:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f7fafc;
}

/* ============================================================
   TIMESHEET ENTRY ROWS — flex card layout (replaces table)
   ============================================================ */

/* Column headers bar */
.nuno-ts-col-headers {
    display: grid;
    grid-template-columns: 130px 1fr 140px 150px 80px 1fr 36px;
    gap: 6px;
    padding: 7px 14px;
    background: #edf2f7;
    border-bottom: 2px solid #cbd5e0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #4a5568;
}

/* Each entry row */
.nuno-entry-row {
    display: grid;
    grid-template-columns: 130px 1fr 140px 150px 80px 1fr 36px;
    gap: 6px;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid #f0f4f8;
    transition: background .1s;
}
.nuno-entry-row:last-of-type { border-bottom: none; }
.nuno-entry-row:hover { background: #fafbfc; }

/* Each field within a row */
.nts-f { display: flex; flex-direction: column; }
.nts-mobile-label { display: none; font-size: 10px; font-weight: 700; color: #a0aec0; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; }

.nts-f-date    {}
.nts-f-project {}
.nts-f-taskgroup {}
.nts-f-role    {}
.nts-f-hours   {}
.nts-f-desc    {}
.nts-f-del     { align-items: center; justify-content: center; }

/* Delete button */
.nuno-row-delete {
    width: 30px; height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #a0aec0;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .1s;
    flex-shrink: 0;
    padding: 0;
}
.nuno-row-delete:hover { background: #fff5f5; border-color: #fed7d7; color: #e53e3e; }

/* Disabled selects */
.nuno-select:disabled,
.entry-taskgroup:disabled,
.entry-role:disabled {
    opacity: .45;
    cursor: not-allowed;
    background: #f7fafc;
}

/* Add Row button */
.nuno-btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px dashed #cbd5e0;
    border-radius: 8px;
    background: transparent;
    color: #4a6fa5;
    cursor: pointer;
    transition: all .12s;
}
.nuno-btn-add-row:hover { background: #ebf4ff; border-color: #4a6fa5; border-style: solid; }

/* Responsive: stack on small screens */
@media (max-width: 900px) {
    .nuno-ts-col-headers { display: none; }
    .nuno-entry-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px 14px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin: 6px 10px;
        background: #fff;
    }
    .nts-mobile-label { display: block; }
    .nts-f-date    { grid-column: 1; }
    .nts-f-hours   { grid-column: 2; }
    .nts-f-project { grid-column: 1 / -1; }
    .nts-f-taskgroup { grid-column: 1 / -1; }
    .nts-f-role    { grid-column: 1 / -1; }
    .nts-f-desc    { grid-column: 1 / -1; }
    .nts-f-del     { grid-column: 1 / -1; align-items: flex-end; }
    .nuno-ts-wrap { overflow-x: visible; }
}

/* Task Group rows in project edit */
.nfea-tg-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    margin-bottom: 6px;
    background: #fff;
}
.nfea-tg-name { flex: 1; font-size: 14px; color: #2d3748; }
.nfea-tg-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ============================================================
   CLIENT PORTAL
   ============================================================ */
.nuno-client-portal { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 860px; margin: 0 auto; }

.ncp-header { background: linear-gradient(135deg,#2d3748 0%,#4a5568 100%); color: #fff; border-radius: 12px 12px 0 0; padding: 20px 28px; }
.ncp-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ncp-client-name { font-size: 18px; font-weight: 700; }
.ncp-header-sub { font-size: 12px; opacity: .7; margin-top: 2px; }
.ncp-header-right { display: flex; gap: 10px; }

.ncp-body { padding: 24px 0; }
.ncp-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.ncp-section-header h2 { margin: 0; font-size: 18px; color: #2d3748; }
.ncp-back { font-size: 13px; color: #4a6fa5; text-decoration: none; }
.ncp-back:hover { text-decoration: underline; }

.ncp-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 24px; }

/* Ticket list */
.ncp-ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ncp-ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; text-decoration: none; color: inherit; transition: box-shadow .12s, border-color .12s; }
.ncp-ticket-row:hover { border-color: #4a6fa5; box-shadow: 0 2px 8px rgba(74,111,165,.12); }
.ncp-ticket-title { font-weight: 600; color: #2d3748; font-size: 14px; }
.ncp-ticket-meta { font-size: 12px; color: #718096; margin-top: 3px; }
.ncp-ticket-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Badges */
.ncp-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.ncp-badge-pending    { background: #fef3c7; color: #92400e; }
.ncp-badge-inprogress { background: #dbeafe; color: #1e40af; }
.ncp-badge-complete   { background: #d1fae5; color: #065f46; }
.ncp-priority-low     { color: #718096; }
.ncp-priority-medium  { color: #d97706; }
.ncp-priority-high    { color: #e53e3e; font-weight: 700; }

/* Form */
.ncp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ncp-field { display: flex; flex-direction: column; gap: 5px; }
.ncp-field-wide { grid-column: 1 / -1; }
.ncp-label { font-size: 13px; font-weight: 600; color: #4a5568; }
.ncp-optional { font-weight: 400; color: #a0aec0; }
.ncp-input, .ncp-select { padding: 9px 12px; border: 1.5px solid #cbd5e0; border-radius: 7px; font-size: 14px; color: #2d3748; background: #f7fafc; font-family: inherit; width: 100%; box-sizing: border-box; transition: border-color .15s; }
.ncp-input:focus, .ncp-select:focus { border-color: #4a6fa5; outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(74,111,165,.1); }

/* Rich editor */
.ncp-rich-editor { min-height: 120px; border: 1.5px solid #cbd5e0; border-bottom: none; border-radius: 7px 7px 0 0; padding: 10px 12px; background: #f7fafc; font-size: 14px; color: #2d3748; line-height: 1.6; outline: none; }
.ncp-rich-editor.focused { border-color: #4a6fa5; background: #fff; }
.ncp-rich-editor:empty:before { content: attr(data-placeholder); color: #a0aec0; }
.ncp-editor-toolbar { display: flex; gap: 6px; padding: 6px 10px; background: #edf2f7; border: 1.5px solid #cbd5e0; border-top: none; border-radius: 0 0 7px 7px; }
.ncp-editor-toolbar button { background: none; border: 1px solid transparent; border-radius: 4px; padding: 3px 8px; font-size: 13px; cursor: pointer; color: #4a5568; }
.ncp-editor-toolbar button:hover { background: #fff; border-color: #cbd5e0; }

/* File upload */
.ncp-file-drop { border: 2px dashed #cbd5e0; border-radius: 8px; padding: 24px; text-align: center; color: #718096; cursor: pointer; transition: border-color .15s; }
.ncp-file-drop.drag-over { border-color: #4a6fa5; background: #ebf4ff; }
.ncp-file-drop p { margin: 8px 0 0; font-size: 13px; }
.ncp-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.ncp-file-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px; color: #4a5568; text-decoration: none; }
.ncp-file-item:hover { border-color: #4a6fa5; color: #4a6fa5; }

/* Notices */
.ncp-notice { padding: 12px 16px; border-radius: 7px; font-size: 14px; margin-bottom: 16px; }
.ncp-notice-success { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; }
.ncp-notice-error { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; }

/* View ticket */
.ncp-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; margin-bottom: 20px; }
.ncp-meta-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #a0aec0; margin-bottom: 3px; }
.ncp-description h3, .ncp-attachments h3 { font-size: 14px; font-weight: 700; color: #4a5568; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .5px; }
.ncp-description-body { background: #f7fafc; padding: 14px; border-radius: 6px; font-size: 14px; line-height: 1.7; }
.ncp-description { margin-bottom: 20px; }

/* Empty state */
.ncp-empty { text-align: center; padding: 48px 20px; color: #a0aec0; }
.ncp-empty p { margin: 12px 0 20px; }

/* Form actions */
.ncp-form-actions { display: flex; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #e2e8f0; }

@media (max-width: 600px) {
    .ncp-form-grid { grid-template-columns: 1fr; }
    .ncp-field-wide { grid-column: 1; }
    .ncp-header-inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   DASHBOARD TABS (Timesheets / Tasks)
   ============================================================ */
.nuno-dash-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: transparent; color: #718096;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .12s;
}
.nuno-dash-tab--active,
.nuno-dash-tab:hover {
    background: #4a6fa5; border-color: #4a6fa5; color: #fff;
}
.nuno-task-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: #e53e3e; color: #fff;
    border-radius: 10px; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; padding: 0 5px;
    line-height: 1;
}
.nuno-dash-tab--active .nuno-task-badge { background: rgba(255,255,255,.3); }

/* ============================================================
   TASKS PANEL
   ============================================================ */
.nuno-tasks-wrap { padding: 16px 0; }
.nuno-tasks-section { margin-bottom: 8px; }
.nuno-tasks-heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #4a5568; margin: 0 0 10px; }
.nuno-tasks-empty { text-align: center; padding: 48px 20px; color: #a0aec0; }
.nuno-tasks-empty p { margin: 12px 0 0; }

.nuno-task-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 16px 18px; margin-bottom: 8px;
    transition: box-shadow .12s;
}
.nuno-task-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.nuno-task-card--done { opacity: .65; }
.nuno-task-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nuno-task-title { font-weight: 600; color: #2d3748; font-size: 14px; }
.nuno-task-meta { font-size: 12px; color: #718096; margin-top: 3px; }
.nuno-task-badges { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.nuno-task-priority { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.nuno-task-status-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.nuno-task-desc { font-size: 13px; color: #718096; margin: 10px 0 0; line-height: 1.5; }
.nuno-task-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
