:root {
    --dn-auth-primary: #2F80D9;
    --dn-auth-primary-hover: #2873C5;
    --dn-auth-primary-pressed: #2164AD;
    --dn-auth-primary-soft: #EDF6FE;
    --dn-auth-primary-border: #CFE3F7;
    --dn-auth-focus: rgba(47, 128, 217, .22);

    --dn-auth-ink: #31465D;
    --dn-auth-copy: #526479;
    --dn-auth-muted: #7B899A;
    --dn-auth-line: #DCE4ED;
    --dn-auth-soft-line: #E8EDF3;
    --dn-auth-white: #FFFFFF;

    --dn-auth-danger: #B42318;
    --dn-auth-danger-bg: #FFF4F2;
    --dn-auth-danger-border: #FECDCA;

    --dn-auth-success: #067647;
    --dn-auth-success-bg: #ECFDF3;
    --dn-auth-success-border: #ABEFC6;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        "Figtree",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--dn-auth-ink);
    background: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

/* =========================================================
   PAGE ARCHITECTURE
========================================================= */

.dn-auth-portal {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(440px, 40%) 1fr;
    background: #FFFFFF;
}

/* =========================================================
   LOGIN SIDE
========================================================= */

.dn-auth-login-pane {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 108px 52px 84px;
    background: #FFFFFF;
}

.dn-auth-logo {
    position: absolute;
    top: 34px;
    left: 46px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.dn-auth-logo img {
    display: block;
    width: auto;
    height: 25px;
}

.dn-auth-form {
    width: 100%;
    max-width: 365px;
}

.dn-auth-heading {
    margin-bottom: 31px;
}

.dn-auth-heading h1 {
    margin: 0;
    color: var(--dn-auth-ink);
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -.025em;
    font-weight: 650;
}

.dn-auth-heading p {
    margin: 10px 0 0;
    color: var(--dn-auth-muted);
    font-size: 14px;
    line-height: 1.55;
}

.dn-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 20px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.5;
}

.dn-auth-alert.success {
    border: 1px solid var(--dn-auth-success-border);
    background: var(--dn-auth-success-bg);
    color: var(--dn-auth-success);
}

.dn-auth-alert.danger {
    border: 1px solid var(--dn-auth-danger-border);
    background: var(--dn-auth-danger-bg);
    color: var(--dn-auth-danger);
}

.dn-auth-field {
    margin-bottom: 18px;
}

.dn-auth-field label {
    display: block;
    margin-bottom: 7px;
    color: #4D5F73;
    font-size: 12.5px;
    font-weight: 650;
}

.dn-auth-input-wrap {
    position: relative;
}

.dn-auth-input {
    width: 100%;
    height: 49px;
    padding: 0 14px;
    border: 1px solid #CFD9E4;
    border-radius: 10px;
    outline: none;
    background: #FFFFFF;
    color: var(--dn-auth-ink);
    font: inherit;
    font-size: 14px;

    transition:
        border-color .14s ease,
        box-shadow .14s ease;
}

.dn-auth-input.password {
    padding-right: 48px;
}

.dn-auth-input::placeholder {
    color: #9AA7B6;
}

.dn-auth-input:hover {
    border-color: #B9C7D5;
}

.dn-auth-input:focus {
    border-color: var(--dn-auth-primary);
    box-shadow: 0 0 0 4px var(--dn-auth-focus);
}

.dn-auth-input.is-invalid {
    border-color: #F04438;
}

.dn-auth-error {
    display: block;
    margin-top: 6px;
    color: var(--dn-auth-danger);
    font-size: 11.5px;
}

.dn-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    transform: translateY(-50%);

    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #78879A;
    cursor: pointer;
}

.dn-auth-password-toggle:hover {
    background: #F5F7F9;
    color: #4E6074;
}

.dn-auth-password-toggle:focus-visible {
    outline: 3px solid var(--dn-auth-focus);
}

.dn-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 1px 0 23px;
}

.dn-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #596A7D;
    font-size: 12.5px;
    font-weight: 550;
    cursor: pointer;
    user-select: none;
}

.dn-auth-remember input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--dn-auth-primary);
}

.dn-auth-link {
    color: var(--dn-auth-primary);
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
}

.dn-auth-link:hover {
    color: var(--dn-auth-primary-hover);
    text-decoration: underline;
}

.dn-auth-submit {
    width: 100%;
    height: 49px;

    border: 1px solid var(--dn-auth-primary);
    border-radius: 10px;

    background: var(--dn-auth-primary);
    color: #FFFFFF;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(47, 128, 217, .15);

    transition:
        background .14s ease,
        border-color .14s ease,
        box-shadow .14s ease;
}

.dn-auth-submit:hover {
    border-color: var(--dn-auth-primary-hover);
    background: var(--dn-auth-primary-hover);

    box-shadow:
        0 9px 20px rgba(47, 128, 217, .19);
}

.dn-auth-submit:active {
    border-color: var(--dn-auth-primary-pressed);
    background: var(--dn-auth-primary-pressed);
}

.dn-auth-submit:focus-visible {
    outline: 4px solid var(--dn-auth-focus);
    outline-offset: 2px;
}

.dn-auth-legal {
    position: absolute;
    left: 46px;
    bottom: 27px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 13px;

    color: #8A97A7;
    font-size: 11px;
}

.dn-auth-legal a {
    color: #758397;
    text-decoration: none;
}

.dn-auth-legal a:hover {
    color: var(--dn-auth-primary);
}

/* =========================================================
   PRODUCT STAGE
========================================================= */

.dn-auth-stage {
    position: relative;
    min-height: 100vh;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 64px 62px;

    background: #EDF5FD;
}

.dn-stage-inner {
    width: min(720px, 100%);
}

.dn-stage-kicker {
    margin: 0 0 10px;
    color: #66809B;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .025em;
}

.dn-stage-heading {
    max-width: 560px;
    margin: 0;
    color: #31465D;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.12;
    letter-spacing: -.03em;
    font-weight: 650;
}

.dn-stage-copy {
    max-width: 530px;
    margin: 14px 0 0;
    color: #718399;
    font-size: 14px;
    line-height: 1.65;
}

/* =========================================================
   PRODUCT VISUAL
========================================================= */

.dn-stage-visual {
    position: relative;
    min-height: 445px;
    margin-top: 32px;
}

.dn-stage-workspace {
    position: absolute;
    top: 20px;
    left: 0;

    width: 76%;
    min-height: 360px;

    padding: 22px;

    border-radius: 22px;
    background: rgba(255, 255, 255, .86);

    box-shadow:
        0 26px 70px rgba(49, 70, 93, .11);
}

.dn-stage-window-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 19px;
}

.dn-stage-window-head strong {
    color: #40536A;
    font-size: 11.5px;
    font-weight: 650;
}

.dn-stage-window-head span {
    color: #8A98A9;
    font-size: 9.5px;
    font-weight: 600;
}

.dn-stage-search {
    min-height: 44px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 0 13px;

    border: 1px solid var(--dn-auth-primary-border);
    border-radius: 10px;

    background: #F7FBFF;
    color: #50677E;

    font-size: 10.5px;
    font-weight: 600;
}

.dn-stage-search i {
    color: var(--dn-auth-primary);
    font-size: 14px;
}

.dn-stage-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 12px;
}

.dn-stage-filter {
    padding: 6px 9px;

    border: 1px solid #E1E8F0;
    border-radius: 8px;

    background: #FFFFFF;
    color: #708095;

    font-size: 9px;
    font-weight: 600;
}

.dn-stage-list {
    margin-top: 22px;
}

.dn-stage-row {
    display: grid;
    grid-template-columns: 34px 1.15fr .9fr;
    align-items: center;
    gap: 11px;

    min-height: 58px;

    border-top: 1px solid #E9EEF4;
}

.dn-stage-row:first-child {
    border-top: 0;
}

.dn-stage-avatar {
    width: 30px;
    height: 30px;

    border-radius: 9px;

    background: #EAF3FC;
}

.dn-stage-lines {
    display: grid;
    gap: 6px;
}

.dn-stage-line {
    height: 6px;
    border-radius: 999px;
    background: #DDE6EF;
}

.dn-stage-line.primary {
    width: 74%;
    background: #BFD4E7;
}

.dn-stage-line.medium {
    width: 58%;
}

.dn-stage-line.short {
    width: 39%;
}

/* AI module */

.dn-stage-ai {
    position: absolute;
    top: 85px;
    right: 0;

    width: 235px;

    padding: 18px;

    border-radius: 18px;
    background: #FFFFFF;

    box-shadow:
        0 22px 54px rgba(49, 70, 93, .14);
}

.dn-stage-module-head {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #40546B;
    font-size: 11px;
    font-weight: 650;
}

.dn-stage-module-head i {
    color: var(--dn-auth-primary);
}

.dn-stage-ai-title {
    margin: 15px 0 11px;
    color: #53677E;
    font-size: 11.5px;
    font-weight: 600;
}

.dn-stage-action {
    display: inline-flex;
    align-items: center;

    margin: 0 5px 7px 0;
    padding: 6px 8px;

    border-radius: 7px;
    background: #F2F7FC;
    color: #718399;

    font-size: 8.5px;
    font-weight: 600;
}

/* Company module */

.dn-stage-company {
    position: absolute;
    right: 36px;
    bottom: 18px;

    width: 210px;

    padding: 17px;

    border-radius: 17px;
    background: rgba(255, 255, 255, .94);

    box-shadow:
        0 20px 46px rgba(49, 70, 93, .11);
}

.dn-stage-company-lines {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}

.dn-stage-company-line {
    height: 7px;
    border-radius: 999px;
    background: #E2EAF2;
}

.dn-stage-company-line:nth-child(1) {
    width: 82%;
}

.dn-stage-company-line:nth-child(2) {
    width: 63%;
}

.dn-stage-company-line:nth-child(3) {
    width: 71%;
}

/* Connected modules */

.dn-stage-dock {
    position: absolute;
    left: 35px;
    bottom: 6px;

    display: flex;
    gap: 8px;
}

.dn-stage-dock-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 10px;

    border-radius: 9px;

    background: rgba(255, 255, 255, .84);
    color: #687A8F;

    font-size: 9px;
    font-weight: 600;

    box-shadow:
        0 10px 26px rgba(49, 70, 93, .07);
}

.dn-stage-dock-item i {
    color: #5D8CB7;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
    .dn-auth-portal {
        grid-template-columns: minmax(420px, 44%) 1fr;
    }

    .dn-auth-stage {
        padding: 54px 42px;
    }

    .dn-stage-ai {
        width: 210px;
    }
}

@media (max-width: 920px) {
    .dn-auth-portal {
        display: block;
    }

    .dn-auth-stage {
        display: none;
    }

    .dn-auth-login-pane {
        min-height: 100vh;
        padding: 100px 26px 88px;
    }

    .dn-auth-logo {
        top: 28px;
        left: 28px;
    }

    .dn-auth-legal {
        left: 28px;
        bottom: 24px;
    }
}

@media (max-width: 480px) {
    .dn-auth-login-pane {
        padding:
            88px
            20px
            82px;
    }

    .dn-auth-logo {
        left: 20px;
    }

    .dn-auth-heading h1 {
        font-size: 28px;
    }

    .dn-auth-options {
        align-items: flex-start;
    }

    .dn-auth-legal {
        left: 20px;
        right: 20px;
    }
}
