:root {
    --background: #f5f5f7;
    --surface: #ffffff;
    --surface-soft: #fafafa;
    --text: #1d1d1f;
    --secondary: #6e6e73;
    --tertiary: #9a9a9f;
    --line: #e5e5e7;
    --line-soft: #ededee;
    --blue: #0071e3;
    --blue-soft: #eaf4ff;
    --green: #28a263;
    --danger: #d92d20;
    --radius: 28px;
    --radius-small: 16px;
    --shadow:
        0 2px 3px rgba(0, 0, 0, 0.02),
        0 18px 45px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

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

body {
    background: var(--background);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        "Helvetica Neue",
        Arial,
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        radial-gradient(
            circle at 50% 10%,
            #ffffff 0%,
            #f8f8fa 38%,
            #f1f1f4 100%
        );
}

.login-content {
    width: 100%;
    max-width: 390px;
    text-align: center;
}

.logicen-symbol {
    width: 64px;
    height: 64px;
    margin: 0 auto 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text);
    color: #fff;
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -0.04em;
    box-shadow: var(--shadow);
}

.overline {
    display: block;
    color: var(--secondary);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.11em;
    font-weight: 700;
}

.login-copy h1 {
    margin: 9px 0 8px;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.login-copy p {
    margin: 0 0 35px;
    color: var(--secondary);
    font-size: 16px;
}

.pin-container {
    position: relative;
    margin-bottom: 22px;
}

#pinInput {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.pin-dots {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pin-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #b6b6ba;
    background: #fff;
    transition:
        transform 160ms ease,
        background 160ms ease,
        border-color 160ms ease;
}

.pin-dots span.filled {
    background: var(--text);
    border-color: var(--text);
    transform: scale(0.92);
}

.login-error {
    min-height: 22px;
    margin-top: 14px;
    color: var(--danger);
    font-size: 13px;
}

.button {
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    font-weight: 600;
    transition:
        transform 140ms ease,
        opacity 140ms ease,
        background 140ms ease;
}

.button:active {
    transform: scale(0.98);
}

.button:disabled {
    cursor: default;
    opacity: 0.35;
}

.button-dark {
    background: var(--text);
    color: #fff;
}

.button-dark:hover {
    background: #000;
}

.button-light {
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
}

.button-login {
    width: 100%;
}

.app {
    width: 100%;
    max-width: 1280px;
    min-height: 100vh;
    margin: 0 auto;
    padding:
        32px
        44px
        90px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 78px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 16px;
    font-weight: 650;
}

.brand-symbol {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 500;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow:
        0 0 0 4px rgba(40, 162, 99, 0.1);
}

.text-button {
    padding: 7px;
    border: 0;
    background: transparent;
    color: var(--secondary);
}

.workspace {
    width: 100%;
}

.intro {
    margin-bottom: 34px;
}

.intro-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-top: 8px;
}

.intro h1 {
    margin: 0;
    font-size: clamp(40px, 5vw, 62px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.intro p {
    max-width: 520px;
    margin: 15px 0 0;
    color: var(--secondary);
    font-size: 17px;
    line-height: 1.5;
}

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

.opportunity {
    width: 100%;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 30px;
    align-items: center;
    padding: 23px 25px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    text-align: left;
    box-shadow:
        0 5px 22px rgba(0, 0, 0, 0.025);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease;
}

.opportunity:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 34px rgba(0, 0, 0, 0.055);
}

.opportunity-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.opportunity-number {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f3;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 700;
}

.opportunity h3 {
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--text);
    font-size: 18px;
    letter-spacing: -0.015em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.opportunity p {
    margin: 0;
    color: var(--secondary);
    font-size: 13px;
}

.step-badge {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.empty-state {
    padding: 90px 25px;
    border: 1px dashed #d3d3d7;
    border-radius: var(--radius);
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 25px;
    letter-spacing: -0.03em;
}

.empty-state p {
    margin: 0;
    color: var(--secondary);
}

.back-button {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--secondary);
    font-size: 14px;
}

.flow-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin:
        34px
        0
        35px;
}

.flow-header h1 {
    max-width: 850px;
    margin: 8px 0 0;
    font-size: clamp(36px, 4vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.flow-status {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.step-rail {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.step-dot {
    height: 6px;
    border-radius: 999px;
    background: #dedee1;
    transition: background 180ms ease;
}

.step-dot.done {
    background: #a0a0a5;
}

.step-dot.current {
    background: var(--text);
}

.flow-card {
    padding: 42px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.step-header {
    max-width: 620px;
    margin-bottom: 38px;
}

.step-header h2 {
    margin: 8px 0 8px;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.step-header p {
    margin: 0;
    color: var(--secondary);
    font-size: 16px;
    line-height: 1.5;
}

.step-form {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

.field > span {
    color: #4d4d51;
    font-size: 13px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    background: var(--surface-soft);
    color: var(--text);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

input {
    min-height: 48px;
}

textarea {
    min-height: 115px;
    resize: vertical;
}

select {
    min-height: 48px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #9dc8f4;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(0, 113, 227, 0.075);
}

.flow-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 38px;
    padding-top: 27px;
    border-top: 1px solid var(--line-soft);
}

.flow-footer-right {
    display: flex;
    gap: 10px;
}

dialog {
    width: min(
        520px,
        calc(100% - 30px)
    );
    padding: 0;
    border: 0;
    border-radius: 28px;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.18);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(7px);
}

.dialog-form {
    display: grid;
    gap: 20px;
    padding: 34px;
}

.dialog-form header {
    margin-bottom: 5px;
}

.dialog-form h2 {
    margin: 8px 0 8px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.dialog-form header p {
    margin: 0;
    color: var(--secondary);
    line-height: 1.45;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100;
    padding: 11px 17px;
    border-radius: 999px;
    background: var(--text);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform:
        translate(-50%, 18px);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.toast.show {
    opacity: 1;
    transform:
        translate(-50%, 0);
}

@media (max-width: 760px) {
    .app {
        padding:
            24px
            18px
            60px;
    }

    .app-header {
        margin-bottom: 55px;
    }

    .live-status {
        display: none;
    }

    .intro-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .intro-row .button {
        width: 100%;
    }

    .flow-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .flow-card {
        padding:
            28px
            20px;
        border-radius: 25px;
    }

    .step-form {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .step-rail {
        gap: 5px;
    }

    .flow-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .flow-footer-right {
        display: grid;
        grid-template-columns:
            1fr
            1fr;
    }

    .flow-footer .button {
        width: 100%;
    }

    .opportunity {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .step-badge {
        width: fit-content;
        margin-left: 61px;
    }
}
