.nt-portal-login {
    padding: 96px 0 120px;
    background: var(--nt-soft);
}

.nt-portal-login-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.7fr);
    align-items: center;
    gap: clamp(70px, 9vw, 150px);
}

.nt-portal-login-copy h1 {
    max-width: 780px;
    margin: 28px 0 24px;
    font-size: clamp(50px, 5.6vw, 82px);
    letter-spacing: -0.06em;
    line-height: 1;
}

.nt-portal-login-copy > p {
    max-width: 650px;
    color: var(--nt-muted);
    font-size: 19px;
}

.nt-login-card {
    padding: 46px;
    border: 1px solid var(--nt-line);
    border-radius: 24px;
    background: var(--nt-white);
    box-shadow: var(--nt-shadow);
}

.nt-login-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 14px;
    background: var(--nt-ink);
    color: var(--nt-white);
}

.nt-login-card h2 {
    margin: 24px 0 6px;
    font-size: 28px;
    letter-spacing: -0.035em;
}

.nt-login-card > p,
.nt-login-form label,
.nt-login-form .login-remember {
    color: var(--nt-muted);
    font-size: 13px;
}

.nt-login-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.nt-login-form .login-password,
.nt-login-form .login-username {
    margin: 18px 0;
}

.nt-login-form .login-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nt-login-form input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    accent-color: var(--nt-blue);
}

.nt-login-form .button-primary {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--nt-ink);
    color: var(--nt-white);
    font-weight: 800;
    cursor: pointer;
}

.nt-login-help {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--nt-line);
    color: var(--nt-muted);
    font-size: 12px;
}

.nt-login-help i {
    color: var(--nt-blue);
    font-size: 20px;
}

.nt-login-help strong {
    display: block;
    color: var(--nt-ink);
}

.nt-portal-wrap {
    padding: 28px 22px 70px;
    background: #f1f5f9;
}

.nt-portal-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    width: min(100%, 1580px);
    min-height: 900px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--nt-line);
    border-radius: 22px;
    background: var(--nt-white);
    box-shadow: var(--nt-shadow-sm);
}

.nt-portal-sidebar {
    display: flex;
    flex-direction: column;
    padding: 24px 16px 16px;
    border-right: 1px solid var(--nt-line);
    background: #fbfcfe;
}

.nt-portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 25px;
    border-bottom: 1px solid var(--nt-line);
}

.nt-portal-brand > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    background: var(--nt-ink);
    color: var(--nt-white);
    font-size: 13px;
    font-weight: 800;
}

.nt-portal-brand strong,
.nt-portal-brand small {
    display: block;
}

.nt-portal-brand small {
    color: var(--nt-muted);
    font-size: 10px;
}

.nt-portal-nav {
    display: grid;
    gap: 4px;
    margin-top: 20px;
}

.nt-portal-tab {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #51647a;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.nt-portal-tab i {
    color: #7690a8;
    text-align: center;
}

.nt-portal-tab:hover {
    background: #edf4fb;
    color: var(--nt-ink);
}

.nt-portal-tab.is-active {
    background: var(--nt-ink);
    color: var(--nt-white);
    box-shadow: 0 8px 18px rgba(7, 22, 46, 0.14);
}

.nt-portal-tab.is-active i {
    color: var(--nt-cyan);
}

.nt-portal-tab b {
    display: grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    background: var(--nt-blue);
    color: var(--nt-white);
    font-size: 9px;
}

.nt-portal-nav-label {
    margin: 20px 12px 5px;
    color: #91a0b0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nt-portal-user {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 16px 8px 4px;
    border-top: 1px solid var(--nt-line);
}

.nt-portal-user strong,
.nt-portal-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nt-portal-user strong {
    font-size: 11px;
}

.nt-portal-user small {
    color: var(--nt-muted);
    font-size: 9px;
}

.nt-portal-user > a {
    color: #8798aa;
}

.nt-portal-content {
    min-width: 0;
    padding: 0 28px 42px;
}

.nt-portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 92px;
    margin: 0 -28px 28px;
    padding: 0 28px;
    border-bottom: 1px solid var(--nt-line);
}

.nt-portal-topbar > div:first-of-type {
    flex: 1;
}

.nt-portal-topbar span {
    color: var(--nt-muted);
    font-size: 10px;
    text-transform: uppercase;
}

.nt-portal-topbar h1 {
    margin: 1px 0 0;
    font-size: 21px;
    letter-spacing: -0.025em;
}

.nt-portal-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nt-icon-button,
.nt-portal-menu {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--nt-line);
    border-radius: 10px;
    background: var(--nt-white);
    color: var(--nt-ink);
    cursor: pointer;
}

.nt-icon-button b {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 2px solid var(--nt-white);
    border-radius: 50%;
    background: var(--nt-blue);
    color: var(--nt-white);
    font-size: 8px;
}

.nt-portal-menu {
    display: none;
}

.nt-portal-notice {
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid #a4e4ce;
    border-radius: 10px;
    background: #eafaf4;
    color: #146c53;
    font-size: 12px;
    font-weight: 700;
}

.nt-portal-panel[hidden] {
    display: none !important;
}

.nt-portal-welcome,
.nt-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.nt-portal-welcome h2,
.nt-panel-heading h2 {
    margin: 0 0 4px;
    font-size: 24px;
    letter-spacing: -0.035em;
}

.nt-portal-welcome p,
.nt-panel-heading p {
    margin: 0;
    color: var(--nt-muted);
    font-size: 12px;
}

.nt-portal-welcome > span {
    color: var(--nt-muted);
    font-size: 11px;
}

.nt-panel-heading input {
    width: 260px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid var(--nt-line);
    border-radius: 9px;
}

.nt-portal-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.nt-portal-kpis article {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--nt-line);
    border-radius: 13px;
    background: var(--nt-white);
}

.nt-kpi-icon,
.nt-list-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    background: #edf5ff;
    color: var(--nt-blue);
}

.nt-kpi-icon.cyan {
    background: #e9fafe;
    color: #058eaf;
}

.nt-kpi-icon.orange {
    background: #fff3e9;
    color: #d66d20;
}

.nt-kpi-icon.green {
    background: #eaf9f4;
    color: #138264;
}

.nt-portal-kpis small,
.nt-portal-kpis strong,
.nt-portal-kpis button {
    display: block;
}

.nt-portal-kpis small {
    color: var(--nt-muted);
    font-size: 9px;
}

.nt-portal-kpis strong {
    margin: 2px 0;
    font-size: 19px;
}

.nt-portal-kpis button,
.nt-portal-card header button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nt-blue);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.nt-portal-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nt-portal-card,
.nt-table-card,
.nt-project-detail,
.nt-message-card {
    border: 1px solid var(--nt-line);
    border-radius: 14px;
    background: var(--nt-white);
}

.nt-portal-card {
    padding: 20px;
}

.nt-portal-card-wide {
    grid-column: 1 / -1;
}

.nt-portal-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.nt-portal-card h3 {
    margin: 0 0 2px;
    font-size: 14px;
}

.nt-portal-card header p {
    margin: 0;
    color: var(--nt-muted);
    font-size: 9px;
}

.nt-project-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 44px auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid #edf1f5;
}

.nt-project-row:first-child {
    border-top: 0;
}

.nt-project-row-main strong,
.nt-project-row-main small {
    display: block;
}

.nt-project-row-main strong {
    font-size: 11px;
}

.nt-project-row-main small {
    margin-top: 3px;
    color: var(--nt-muted);
    font-size: 8px;
}

.nt-progress {
    height: 5px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eaf0f5;
}

.nt-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--nt-cyan);
}

.nt-project-row > b {
    font-size: 11px;
}

.nt-status {
    display: inline-flex;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e9faf4;
    color: #11805f;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.nt-status.review {
    background: #fff3e5;
    color: #bc6909;
}

.nt-status.done {
    background: #eaf3ff;
    color: var(--nt-blue);
}

.nt-portal-timeline article,
.nt-approval-compact,
.nt-security-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 0;
    border-top: 1px solid #edf1f5;
}

.nt-portal-timeline article:first-child,
.nt-approval-compact:first-of-type,
.nt-security-item:first-of-type {
    border-top: 0;
}

.nt-portal-timeline strong,
.nt-approval-compact strong {
    display: block;
    font-size: 10px;
}

.nt-portal-timeline p {
    margin: 2px 0;
    color: var(--nt-muted);
    font-size: 9px;
}

.nt-portal-timeline small,
.nt-approval-compact small {
    color: #8496a8;
    font-size: 8px;
}

.nt-portal-empty {
    display: grid;
    place-items: center;
    padding: 48px 20px;
    text-align: center;
}

.nt-portal-empty > i {
    margin-bottom: 12px;
    color: var(--nt-blue);
    font-size: 28px;
}

.nt-portal-empty strong {
    font-size: 13px;
}

.nt-portal-empty p {
    max-width: 360px;
    margin: 5px 0 0;
    color: var(--nt-muted);
    font-size: 10px;
}

.nt-project-detail-grid {
    display: grid;
    gap: 18px;
}

.nt-project-detail {
    padding: 24px;
}

.nt-project-detail > header {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
}

.nt-project-detail h3 {
    margin: 8px 0 4px;
    font-size: 18px;
}

.nt-project-detail header p {
    margin: 0;
    color: var(--nt-muted);
    font-size: 11px;
}

.nt-project-summary {
    display: grid;
    grid-template-columns: 1.4fr repeat(2, 0.8fr);
    gap: 14px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 11px;
    background: #f5f8fb;
}

.nt-project-summary small,
.nt-project-summary strong {
    display: block;
}

.nt-project-summary small {
    color: var(--nt-muted);
    font-size: 8px;
}

.nt-project-summary strong {
    margin-top: 4px;
    font-size: 12px;
}

.nt-milestones {
    margin-top: 22px;
}

.nt-milestones h4 {
    margin: 0 0 8px;
    font-size: 12px;
}

.nt-milestones > div {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #edf1f5;
    font-size: 10px;
}

.nt-milestones i {
    color: var(--nt-mint);
}

.nt-milestones b {
    color: var(--nt-muted);
    font-size: 8px;
}

.nt-table-card {
    overflow: hidden;
}

.nt-table-head,
.nt-table-row {
    display: grid;
    grid-template-columns: 1.45fr 0.9fr 0.75fr 0.7fr 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
}

.nt-table-head {
    background: #f5f8fb;
    color: var(--nt-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nt-table-row {
    min-height: 72px;
    border-top: 1px solid #edf1f5;
    color: #4c5f75;
    font-size: 10px;
}

.nt-table-row > div:first-child > strong,
.nt-table-row > div:first-child > small {
    display: block;
}

.nt-table-row > div:first-child > strong {
    color: var(--nt-ink);
}

.nt-table-row > div:first-child > small {
    margin-top: 3px;
    color: var(--nt-muted);
    font-size: 8px;
}

.nt-files-head,
.nt-files-row {
    grid-template-columns: 1.4fr 1fr 0.7fr 0.5fr;
}

.nt-files-row > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nt-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.nt-mini-button {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: 1px solid #cbd8e3;
    border-radius: 7px;
    background: var(--nt-white);
    color: var(--nt-ink);
    font-size: 8px;
    font-weight: 800;
    cursor: pointer;
}

.nt-mini-button.approve {
    border-color: var(--nt-blue);
    background: var(--nt-blue);
    color: var(--nt-white);
}

.nt-message-list {
    display: grid;
    gap: 12px;
}

.nt-message-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 13px;
    padding: 20px;
}

.nt-message-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nt-message-card header small,
.nt-message-card > div > span {
    color: var(--nt-muted);
    font-size: 8px;
}

.nt-message-card h3 {
    margin: 10px 0 4px;
    font-size: 13px;
}

.nt-message-card p {
    margin: 0 0 8px;
    color: #4e6074;
    font-size: 11px;
}

.nt-profile-grid {
    display: grid;
    grid-template-columns: 0.65fr 1.35fr;
    gap: 18px;
}

.nt-profile-avatar {
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    border-radius: 50%;
    background: #e5f1ff;
    color: var(--nt-blue);
    font-size: 20px;
    font-weight: 800;
}

.nt-profile-grid h3 {
    margin: 16px 0 2px;
}

.nt-profile-grid > section > p {
    margin: 0;
    color: var(--nt-muted);
    font-size: 11px;
}

.nt-profile-grid dl {
    margin-top: 24px;
}

.nt-profile-grid dl div {
    padding: 12px 0;
    border-top: 1px solid #edf1f5;
}

.nt-profile-grid dt,
.nt-profile-grid dd {
    margin: 0;
}

.nt-profile-grid dt {
    color: var(--nt-muted);
    font-size: 8px;
    text-transform: uppercase;
}

.nt-profile-grid dd {
    font-size: 11px;
    font-weight: 700;
}

.nt-security-item p {
    margin: 4px 0 10px;
    color: var(--nt-muted);
    font-size: 10px;
}

.nt-portal-dialog {
    width: min(calc(100% - 30px), 560px);
    max-height: 90vh;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--nt-line);
    border-radius: 18px;
    background: var(--nt-white);
    box-shadow: 0 30px 100px rgba(7, 22, 46, 0.28);
}

.nt-portal-dialog::backdrop {
    background: rgba(7, 22, 46, 0.6);
}

.nt-portal-form {
    display: grid;
    gap: 17px;
    padding: 28px;
}

.nt-portal-form header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.nt-portal-form header h2 {
    margin: 0 0 3px;
    font-size: 22px;
}

.nt-portal-form header p {
    margin: 0;
    color: var(--nt-muted);
    font-size: 11px;
}

.nt-portal-form header button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--nt-line);
    border-radius: 9px;
    background: var(--nt-white);
    cursor: pointer;
}

.nt-portal-form label {
    display: grid;
    gap: 6px;
    color: var(--nt-ink);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .nt-portal-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .nt-portal-kpis {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .nt-portal-login-grid {
        grid-template-columns: 1fr;
    }

    .nt-portal-login-copy {
        max-width: 720px;
    }

    .nt-portal-shell {
        grid-template-columns: 1fr;
    }

    .nt-portal-sidebar {
        position: fixed;
        z-index: 1200;
        top: 0;
        bottom: 0;
        left: 0;
        width: 260px;
        box-shadow: var(--nt-shadow);
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .nt-portal-sidebar.is-open {
        transform: translateX(0);
    }

    .nt-portal-menu {
        display: grid;
    }

    .nt-portal-topbar > div:first-of-type {
        flex: 1;
    }

    .nt-table-card {
        overflow-x: auto;
    }

    .nt-table-head,
    .nt-table-row {
        min-width: 850px;
    }
}

@media (max-width: 680px) {
    .nt-portal-wrap {
        padding: 0;
    }

    .nt-portal-shell {
        border: 0;
        border-radius: 0;
    }

    .nt-portal-content {
        padding: 0 15px 30px;
    }

    .nt-portal-topbar {
        margin: 0 -15px 22px;
        padding: 0 15px;
    }

    .nt-portal-top-actions .nt-button {
        width: 42px;
        padding: 0;
        font-size: 0;
    }

    .nt-portal-top-actions .nt-button i {
        font-size: 14px;
    }

    .nt-portal-kpis,
    .nt-portal-dashboard-grid,
    .nt-profile-grid,
    .nt-project-summary {
        grid-template-columns: 1fr;
    }

    .nt-portal-card-wide {
        grid-column: auto;
    }

    .nt-project-row {
        grid-template-columns: 38px minmax(0, 1fr) auto;
    }

    .nt-project-row > b {
        display: none;
    }

    .nt-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .nt-panel-heading input {
        width: 100%;
    }

    .nt-login-card {
        padding: 30px;
    }

    .nt-portal-login {
        padding: 72px 0;
    }

    .nt-portal-login-copy h1 {
        font-size: 46px;
    }
}
