:root {
    --surface: #f5f7fb;
    --surface-strong: #ffffff;
    --surface-soft: #edf7f5;
    --surface-dark: #111827;
    --surface-dark-soft: #172033;
    --text: #172033;
    --text-on-dark: #f8fafc;
    --muted-on-dark: #c7d2de;
    --muted: #65738a;
    --line: #d9e0ea;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --brand-soft: #d7f1ed;
    --app-bg-a: #0f766e;
    --app-bg-b: #172033;
    --warning: #b45309;
    --text-color: var(--text);
    --text-color-secondary: var(--muted);
    --primary-color: var(--brand);
    --primary-color-text: #ffffff;
    --surface-ground: var(--surface);
    --surface-section: var(--surface-strong);
    --surface-card: var(--surface-strong);
    --surface-overlay: var(--surface-strong);
    --surface-border: var(--line);
    --surface-hover: #eef3f8;
    --maskbg: rgba(23, 32, 51, .55);
    --border-radius: 8px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    background: var(--surface);
}

.app-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .95), rgba(23, 32, 51, .94)),
        url("");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.app-body .topbar {
    background: rgba(255, 255, 255, .94);
    border-radius: 0;
    border-width: 0 0 1px 0;
    border-color: rgba(255, 255, 255, .18);
    min-height: 58px;
    box-shadow: 0 8px 26px rgba(23, 32, 51, .18);
}

.page-shell {
    width: min(1360px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.page-title,
.brand-title {
    margin: 0;
    letter-spacing: 0;
}

.page-title {
    font-size: 2rem;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}

.eyebrow {
    color: var(--brand-soft);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.toolbar-band {
    padding: 16px;
    margin-bottom: 18px;
    color: var(--text-on-dark);
    background: rgba(17, 24, 39, .9);
    border: 1px solid rgba(215, 241, 237, .18);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(23, 32, 51, .16);
}

.contents {
    display: contents;
}

.app-body .ui-outputlabel {
    color: var(--text-on-dark);
}

.metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 62px;
    padding: 10px 12px;
    border-left: 3px solid var(--brand-soft);
    background: rgba(15, 118, 110, .16);
    border-radius: 6px;
}

.metric span,
.dev-hint {
    color: var(--muted);
    font-size: .9rem;
}

.app-body .metric span,
.app-body .counter-text,
.app-body .summary-item span {
    color: var(--muted-on-dark);
}

.metric strong {
    margin-top: 4px;
    font-size: 1.25rem;
    color: #ffffff;
}

.table-title {
    color: var(--text-on-dark);
    font-size: 1rem;
    font-weight: 700;
}

.search-field {
    width: min(360px, 100%);
}

.search-field .ui-inputtext {
    width: 100%;
}

.competencia-range,
.competencia-range .p-datepicker-input,
.competencia-range .ui-inputfield {
    width: 100%;
}

.competencia-range.p-datepicker {
    display: inline-flex;
    align-items: stretch;
}

.competencia-range.p-datepicker .p-datepicker-trigger,
.competencia-range.p-datepicker .ui-datepicker-trigger {
    flex: 0 0 auto;
    white-space: nowrap;
}

.note-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.note-cell strong {
    color: var(--text-on-dark);
    line-height: 1.3;
}

.note-cell span {
    color: var(--muted-on-dark);
    font-size: .86rem;
}

.service-cell strong {
    max-width: 36rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-column {
    width: 8.5rem;
}

.actions-column {
    width: 9rem;
    text-align: center;
    white-space: nowrap;
}

.action-button {
    min-width: 2.4rem;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0 .1rem;
}

.notes-table .ui-datatable-tablewrapper {
    border-radius: 8px;
}

.counter-text {
    font-size: .85rem;
    min-height: 1rem;
}

.summary-item {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(215, 241, 237, .16);
}

.summary-item span {
    color: var(--muted);
    font-size: .86rem;
}

.summary-item strong {
    line-height: 1.35;
}

.note-detail-dialog .ui-dialog-titlebar {
    color: var(--text-on-dark);
    background: linear-gradient(180deg, #1f2937, #111827);
    border-color: rgba(215, 241, 237, .18);
}

.note-detail-dialog .ui-dialog-content {
    color: var(--text-on-dark);
    background: rgba(17, 24, 39, .96);
}

.note-detail-dialog .summary-item span {
    color: var(--muted-on-dark);
}

.note-detail-dialog .summary-item .ui-tag {
    align-self: flex-start;
    color: var(--text);
}

.note-detail-dialog .summary-item .ui-tag .ui-tag-value {
    color: var(--text);
}

.result-panel {
    margin-top: 16px;
    border-color: rgba(15, 118, 110, .35);
}

.result-status {
    color: var(--brand-soft);
}

.result-status i {
    font-size: 2rem;
}

.profile-callout {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    color: var(--text-on-dark);
    background: rgba(15, 118, 110, .16);
    border: 1px solid rgba(215, 241, 237, .14);
    border-radius: 8px;
}

.profile-callout span {
    color: var(--muted-on-dark);
    line-height: 1.5;
}

.profile-select {
    width: 100%;
    min-height: 42px;
    padding: .75rem .875rem;
    color: hsla(0, 0%, 100%, .87);
    background: rgba(17, 24, 39, .92);
    border: 1px solid rgba(215, 241, 237, .18);
    border-radius: 6px;
}

.profile-select.ui-state-error {
    border-color: #fca5a5;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, .45);
}

.profile-status {
    padding: 12px 14px;
    color: var(--text-on-dark);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(215, 241, 237, .12);
    border-radius: 8px;
}

.profile-status.info {
    border-color: rgba(59, 130, 246, .35);
}

.profile-status.processing {
    border-color: rgba(245, 158, 11, .35);
}

.profile-status.success {
    border-color: rgba(34, 197, 94, .35);
}

.profile-status.warn,
.profile-status.error {
    border-color: rgba(239, 68, 68, .35);
}

.profile-empty {
    color: var(--muted-on-dark);
}

.app-body .data-panel .text-color,
.app-body .data-panel .text-color li {
    color: var(--muted-on-dark);
}

.app-body .data-panel #resultadoAtividades,
.app-body .data-panel #resultadoAtividades li {
    text-align: justify;
}

.data-panel,
.side-panel,
.login-panel {
    border-radius: 8px;
    overflow: hidden;
}

.app-body .data-panel,
.app-body .side-panel {
    border-color: rgba(215, 241, 237, .18);
    box-shadow: 0 16px 38px rgba(23, 32, 51, .18);
}

.app-body .data-panel .ui-panel-titlebar,
.app-body .side-panel .ui-panel-titlebar {
    color: var(--text-on-dark);
    background: linear-gradient(180deg, #1f2937, #111827);
    border-color: rgba(215, 241, 237, .18);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.app-body .data-panel .ui-panel-content,
.app-body .side-panel .ui-panel-content {
    color: var(--text-on-dark);
    background: rgba(17, 24, 39, .92);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.task-row {
    padding: 12px 0;
    border-bottom: 1px solid rgba(215, 241, 237, .16);
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(110deg, rgba(15, 118, 110, .92), rgba(23, 32, 51, .88)),
        url("");
    background-size: cover;
    background-position: center;
}

.login-shell {
    width: min(440px, calc(100% - 28px));
}

.login-panel .ui-panel-content {
    padding: 28px;
}

.login-panel .ui-outputlabel {
    color: var(--text-on-dark);
}

.login-panel .ui-inputfield,
.login-panel .ui-password input {
    color: hsla(0, 0%, 100%, .87);
    background: #121212;
    border-color: #383838;
}

.login-panel .ui-inputfield:-webkit-autofill,
.login-panel .ui-inputfield:-webkit-autofill:hover,
.login-panel .ui-inputfield:-webkit-autofill:focus,
.login-panel .ui-password input:-webkit-autofill,
.login-panel .ui-password input:-webkit-autofill:hover,
.login-panel .ui-password input:-webkit-autofill:focus {
    -webkit-text-fill-color: hsla(0, 0%, 100%, .87);
    -webkit-box-shadow: 0 0 0 1000px #121212 inset;
    transition: background-color 9999s ease-in-out 0s;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    color: #ffffff;
    background: #000000;
    border-radius: 8px;
    font-weight: 700;
    font-size: .72rem;
    line-height: 1.1;
    letter-spacing: 0;
    text-align: center;
}

@media (max-width: 900px) {
    .search-field {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 20px, 1360px);
        padding-top: 18px;
    }

    .page-title {
        font-size: 1.6rem;
    }
}
