:root {
    --navy-950: #03182c;
    --navy-900: #06233e;
    --navy-800: #07385f;
    --blue-700: #075c9b;
    --blue-600: #0875bf;
    --blue-500: #1597dd;
    --cyan-300: #74d4f4;
    --white: #ffffff;
    --gray-50: #f7f9fc;
    --gray-100: #eef2f6;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #172033;
    --red-50: #fff1f2;
    --red-700: #be123c;
    --amber-50: #fffbeb;
    --amber-800: #92400e;
    --shadow: 0 24px 60px rgba(3, 24, 44, .12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: var(--gray-50);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.site-header,
.dashboard-header {
    position: relative;
    z-index: 10;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(24px, 4vw, 72px);
    color: var(--white);
    background: var(--navy-950);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .18);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: inherit;
    text-decoration: none;
}

.brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand strong {
    font-size: 22px;
    letter-spacing: .01em;
}

.brand small {
    margin-top: 5px;
    color: #b8d4e8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.brand-mark {
    position: relative;
    width: 35px;
    height: 38px;
}

.brand-mark span {
    position: absolute;
    display: block;
    width: 12px;
    height: 30px;
    border-radius: 2px;
    background: var(--white);
    transform: skewY(32deg);
}

.brand-mark span:nth-child(1) {
    left: 1px;
    top: 1px;
}

.brand-mark span:nth-child(2) {
    left: 12px;
    top: 7px;
    background: var(--cyan-300);
}

.brand-mark span:nth-child(3) {
    left: 23px;
    top: 13px;
    background: var(--blue-500);
}

.header-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #c6dbea;
    font-size: 13px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 0 5px rgba(45, 212, 191, .1);
}

.login-layout {
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: minmax(480px, 42%) 1fr;
}

.login-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px clamp(32px, 6vw, 100px);
    background: var(--white);
}

.login-content {
    min-width: 0;
    width: min(100%, 440px);
}

.eyebrow,
.integration-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--blue-700);
    background: #e9f6fd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-content h1 {
    max-width: 420px;
    margin: 18px 0 12px;
    color: var(--navy-900);
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.intro {
    margin: 0 0 32px;
    color: var(--gray-500);
    font-size: 16px;
    line-height: 1.65;
}

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.alert-error {
    color: var(--red-700);
    border-color: #fecdd3;
    background: var(--red-50);
}

.alert-warning {
    color: var(--amber-800);
    border-color: #fde68a;
    background: var(--amber-50);
}

.alert-success {
    color: #0f766e;
    border-color: #99f6e4;
    background: #f0fdfa;
}

.login-form {
    display: grid;
    gap: 20px;
}

.form-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.field label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 750;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    min-height: 52px;
    padding: 0 48px;
    color: var(--gray-900);
    border: 1px solid var(--gray-300);
    border-radius: 11px;
    outline: none;
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
}

.input-wrap input::placeholder {
    color: #94a3b8;
}

.input-wrap input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(8, 117, 191, .11);
}

.field-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    z-index: 1;
    color: var(--blue-700);
    font-size: 17px;
    font-weight: 750;
    transform: translateY(-50%);
}

.lock-icon {
    width: 13px;
    height: 12px;
    border: 2px solid var(--blue-700);
    border-radius: 2px;
}

.lock-icon::before {
    content: "";
    position: absolute;
    left: 1px;
    top: -9px;
    width: 7px;
    height: 9px;
    border: 2px solid var(--blue-700);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: var(--gray-100);
}

.password-toggle span {
    position: absolute;
    left: 10px;
    top: 13px;
    width: 18px;
    height: 12px;
    border: 2px solid var(--gray-500);
    border-radius: 50% / 60%;
}

.password-toggle span::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gray-500);
}

.password-toggle[aria-pressed="true"] span::before {
    content: "";
    position: absolute;
    left: -3px;
    top: 3px;
    width: 22px;
    height: 2px;
    background: var(--gray-500);
    transform: rotate(-42deg);
}

.primary-button {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
    padding: 0 24px;
    color: var(--white);
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
    box-shadow: 0 12px 25px rgba(7, 92, 155, .22);
    font-size: 15px;
    font-weight: 750;
    transition: transform .2s, box-shadow .2s;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(7, 92, 155, .28);
}

.primary-button:focus-visible {
    outline: 3px solid rgba(21, 151, 221, .28);
    outline-offset: 3px;
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 24px 0 0;
    color: var(--gray-500);
    font-size: 12px;
    line-height: 1.5;
}

.feature-panel {
    position: relative;
    min-width: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 70px clamp(48px, 8vw, 130px);
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(3, 24, 44, .96), rgba(6, 56, 95, .91)),
        repeating-linear-gradient(45deg, transparent 0 18px, rgba(255,255,255,.025) 18px 19px);
}

.feature-panel::before,
.feature-panel::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(116, 212, 244, .12);
    border-radius: 50%;
}

.feature-panel::before {
    right: -260px;
    top: -310px;
    width: 700px;
    height: 700px;
}

.feature-panel::after {
    right: -120px;
    top: -170px;
    width: 420px;
    height: 420px;
}

.feature-glow {
    position: absolute;
    left: 10%;
    bottom: -280px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: rgba(8, 117, 191, .38);
    filter: blur(80px);
}

.feature-content {
    position: relative;
    z-index: 1;
    width: min(100%, 660px);
}

.feature-panel .integration-label,
.welcome-card .integration-label {
    color: var(--cyan-300);
    background: rgba(116, 212, 244, .1);
}

.feature-panel h2 {
    max-width: 620px;
    margin: 24px 0 18px;
    font-size: clamp(38px, 4vw, 60px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.feature-panel > .feature-content > p {
    max-width: 590px;
    margin: 0;
    color: #bfd5e5;
    font-size: 17px;
    line-height: 1.7;
}

.feature-list {
    display: grid;
    gap: 20px;
    margin: 38px 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #c8ddeb;
    font-size: 14px;
    line-height: 1.5;
}

.feature-list strong {
    display: block;
    margin-bottom: 2px;
    color: var(--white);
    font-size: 15px;
}

.feature-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    margin-top: 2px;
    border: 1px solid rgba(116, 212, 244, .45);
    border-radius: 50%;
    color: var(--cyan-300);
    background: rgba(116, 212, 244, .08);
    font-size: 13px;
    font-weight: 800;
}

.provider-note {
    position: absolute;
    left: clamp(48px, 8vw, 130px);
    bottom: 26px;
    z-index: 1;
    margin: 0;
    color: #88a8bd;
    font-size: 11px;
}

.dashboard-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 8%, rgba(21, 151, 221, .11), transparent 25%),
        var(--gray-50);
}

.installer-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 10%, rgba(21, 151, 221, .18), transparent 28%),
        linear-gradient(135deg, var(--navy-950), var(--navy-800));
}

.installer-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.installer-card {
    width: min(100%, 560px);
    padding: clamp(28px, 6vw, 52px);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.installer-brand {
    margin-bottom: 34px;
    color: var(--navy-900);
}

.installer-brand small {
    color: var(--blue-700);
}

.installer-card h1 {
    margin: 18px 0 10px;
    color: var(--navy-900);
    font-size: clamp(30px, 5vw, 42px);
    letter-spacing: -.04em;
}

.installer-card > p {
    margin: 0 0 28px;
    color: var(--gray-500);
    line-height: 1.6;
}

.installer-input input {
    padding: 0 16px;
}

.button-link {
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #d1e2ee;
    font-size: 13px;
}

.user-menu form {
    margin: 0;
}

.user-menu button {
    padding: 8px 15px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, .08);
}

.header-link {
    color: #d1e2ee;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
}

.welcome-card {
    padding: clamp(32px, 5vw, 58px);
    color: var(--white);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
    box-shadow: var(--shadow);
}

.welcome-card h1 {
    margin: 20px 0 10px;
    font-size: clamp(32px, 5vw, 50px);
    letter-spacing: -.04em;
}

.welcome-card p {
    max-width: 700px;
    margin: 0;
    color: #c2d8e7;
    line-height: 1.7;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.module-card {
    position: relative;
    min-height: 260px;
    padding: 28px;
    border: 1px solid #dce4ec;
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(3, 24, 44, .06);
}

.module-link {
    color: inherit;
    text-decoration: none;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.module-link:hover {
    border-color: #8bcff0;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(3, 24, 44, .1);
}

.module-card.module-active {
    border-color: #9bd6f3;
}

.module-number {
    color: var(--blue-600);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .12em;
}

.module-card h2 {
    margin: 28px 0 10px;
    color: var(--navy-900);
    font-size: 22px;
}

.module-card p {
    margin: 0;
    color: var(--gray-500);
    line-height: 1.6;
}

.module-status {
    position: absolute;
    left: 28px;
    bottom: 25px;
    padding: 6px 10px;
    color: #0f766e;
    border-radius: 999px;
    background: #ccfbf1;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.module-status.pending {
    color: var(--gray-500);
    background: var(--gray-100);
}

.integration-main {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
}

.integration-card {
    padding: clamp(28px, 6vw, 54px);
    border: 1px solid #dce4ec;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.integration-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
}

.integration-heading h1 {
    margin: 18px 0 10px;
    color: var(--navy-900);
    font-size: clamp(31px, 5vw, 46px);
    letter-spacing: -.04em;
}

.integration-heading p {
    margin: 0;
    color: var(--gray-500);
    line-height: 1.6;
}

.connection-badge {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.status-pending {
    color: var(--gray-500);
    background: var(--gray-100);
}

.status-connected {
    color: #0f766e;
    background: #ccfbf1;
}

.status-error {
    color: var(--red-700);
    background: var(--red-50);
}

.integration-form {
    display: grid;
    gap: 22px;
}

.field label small {
    margin-left: 7px;
    color: var(--gray-500);
    font-weight: 500;
}

.integration-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.secondary-button {
    min-height: 48px;
    padding: 0 22px;
    color: var(--navy-800);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    cursor: pointer;
    background: var(--white);
    font-weight: 750;
}

.compact-button {
    min-height: 48px;
    margin: 0;
}

.connection-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.connection-details div {
    padding: 16px;
    border-radius: 10px;
    background: var(--gray-50);
}

.connection-details span,
.connection-details strong {
    display: block;
}

.connection-details span {
    margin-bottom: 5px;
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.connection-details strong {
    color: var(--navy-900);
    font-size: 13px;
}

.integration-security {
    margin-bottom: 0;
}

.connection-page {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 72px;
}

.connection-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.connection-title h1 {
    margin: 15px 0 8px;
    color: var(--navy-900);
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.connection-title p {
    margin: 0;
    color: var(--gray-500);
    font-size: 15px;
}

.back-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: var(--blue-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}

.back-link span {
    font-size: 18px;
    transition: transform .2s;
}

.back-link:hover span {
    transform: translateX(-3px);
}

.connection-alert {
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(3, 24, 44, .05);
}

.connection-layout {
    display: grid;
    grid-template-columns: minmax(290px, .82fr) minmax(440px, 1.35fr);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid #dbe5ee;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 30px 70px rgba(3, 24, 44, .12);
}

.connection-overview {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 46px 40px;
    color: var(--white);
    background:
        radial-gradient(circle at 30% 100%, rgba(21, 151, 221, .42), transparent 42%),
        linear-gradient(155deg, #03192e 0%, #073e68 100%);
}

.overview-orbit {
    position: absolute;
    border: 1px solid rgba(116, 212, 244, .12);
    border-radius: 50%;
}

.overview-orbit-one {
    top: -170px;
    right: -190px;
    width: 430px;
    height: 430px;
}

.overview-orbit-two {
    top: -92px;
    right: -112px;
    width: 275px;
    height: 275px;
}

.overview-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.overview-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d8ecf8;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, .12);
}

.overview-badge.status-connected .badge-dot {
    background: #2dd4bf;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, .13);
}

.overview-badge.status-error .badge-dot {
    background: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, .13);
}

.connection-symbol {
    position: relative;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 54px 0 24px;
    border: 1px solid rgba(116, 212, 244, .25);
    border-radius: 22px;
    background: rgba(116, 212, 244, .1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.connection-symbol::before,
.connection-symbol::after {
    content: "";
    position: absolute;
    width: 25px;
    height: 15px;
    border: 3px solid var(--cyan-300);
    border-radius: 12px;
}

.connection-symbol::before {
    left: 16px;
    transform: rotate(-38deg);
}

.connection-symbol::after {
    right: 16px;
    transform: rotate(-38deg);
}

.connection-symbol span {
    position: relative;
    z-index: 2;
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: var(--cyan-300);
    transform: rotate(-38deg);
}

.status-symbol-error::before,
.status-symbol-error::after {
    border-color: #fb7185;
}

.status-symbol-error span {
    background: #fb7185;
}

.connection-overview h2 {
    margin: 0 0 10px;
    font-size: 29px;
    letter-spacing: -.025em;
}

.connection-overview > .overview-content > p {
    margin: 0;
    color: #b9d1e1;
    font-size: 14px;
    line-height: 1.65;
}

.overview-account {
    margin-top: 32px;
    padding: 17px 18px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: rgba(2, 19, 35, .28);
}

.overview-account span,
.overview-account strong {
    display: block;
}

.overview-account span {
    margin-bottom: 6px;
    color: #89adc4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.overview-account strong {
    overflow: hidden;
    color: var(--white);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-list {
    display: grid;
    gap: 13px;
    margin: auto 0 0;
    padding: 38px 0 0;
    color: #b9d1e1;
    list-style: none;
    font-size: 12px;
}

.security-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-list li span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--cyan-300);
    background: rgba(116, 212, 244, .1);
    font-size: 10px;
    font-weight: 900;
}

.connection-form-panel {
    min-width: 0;
    padding: 48px clamp(32px, 5vw, 62px);
    background:
        linear-gradient(rgba(255,255,255,.96), rgba(255,255,255,.96)),
        radial-gradient(circle at 100% 0, rgba(21,151,221,.15), transparent 30%);
}

.form-panel-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 36px;
}

.step-number {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--blue-700);
    border-radius: 11px;
    background: #e9f6fd;
    font-size: 12px;
    font-weight: 900;
}

.form-panel-heading h2 {
    margin: 0 0 5px;
    color: var(--navy-900);
    font-size: 22px;
    letter-spacing: -.02em;
}

.form-panel-heading p {
    margin: 0;
    color: var(--gray-500);
    font-size: 13px;
}

.connection-input input {
    min-height: 56px;
    padding: 0 18px 0 50px;
    border-color: #d3dee8;
    background: #fbfdff;
}

.connection-field-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    z-index: 2;
    color: var(--blue-700);
    font-size: 16px;
    font-weight: 850;
    transform: translateY(-50%);
}

.connection-lock {
    width: 13px;
    height: 12px;
    border: 2px solid var(--blue-700);
    border-radius: 2px;
}

.connection-lock::before {
    content: "";
    position: absolute;
    left: 1px;
    top: -9px;
    width: 7px;
    height: 9px;
    border: 2px solid var(--blue-700);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.connection-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.connection-label-row > span {
    margin-bottom: 8px;
    color: var(--gray-500);
    font-size: 11px;
}

.test-button-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7dd3fc;
    box-shadow: 0 0 0 4px rgba(125, 211, 252, .15);
}

.connection-history {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 32px;
    padding-top: 25px;
    border-top: 1px solid var(--gray-100);
}

.history-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e7edf3;
    border-radius: 12px;
    background: #fafcfe;
}

.history-icon {
    position: relative;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #e9f6fd;
}

.history-icon::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 7px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--blue-700);
    border-radius: 50%;
}

.history-icon::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 10px;
    width: 2px;
    height: 7px;
    background: var(--blue-700);
    transform-origin: bottom;
    transform: rotate(-35deg);
}

.history-check::before {
    left: 9px;
    top: 8px;
    width: 11px;
    height: 6px;
    border: 0;
    border-left: 2px solid var(--blue-700);
    border-bottom: 2px solid var(--blue-700);
    border-radius: 0;
    transform: rotate(-45deg);
}

.history-check::after {
    display: none;
}

.history-item div {
    min-width: 0;
}

.history-item span,
.history-item strong {
    display: block;
}

.history-item div > span {
    margin-bottom: 4px;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.history-item strong {
    overflow: hidden;
    color: var(--navy-900);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 11px;
    color: var(--gray-500);
    background: var(--gray-50);
}

.privacy-note p {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
}

.privacy-note strong {
    color: var(--gray-700);
}

.privacy-shield {
    position: relative;
    flex: 0 0 auto;
    width: 17px;
    height: 20px;
    border: 2px solid var(--blue-700);
    border-radius: 8px 8px 10px 10px;
}

.privacy-shield::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 5px;
    height: 3px;
    border-left: 2px solid var(--blue-700);
    border-bottom: 2px solid var(--blue-700);
    transform: rotate(-45deg);
}

.publications-main {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 72px;
}

.publications-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.publications-hero h1 {
    margin: 15px 0 8px;
    color: var(--navy-900);
    font-size: clamp(38px, 5vw, 54px);
    letter-spacing: -.05em;
}

.publications-hero p {
    margin: 0;
    color: var(--gray-500);
}

.sync-button {
    min-width: 188px;
    margin: 0;
}

.sync-icon {
    position: relative;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .85);
    border-left-color: transparent;
    border-radius: 50%;
}

.sync-icon::after {
    content: "";
    position: absolute;
    left: -3px;
    top: -2px;
    border-top: 4px solid transparent;
    border-right: 5px solid var(--white);
    border-bottom: 4px solid transparent;
    transform: rotate(18deg);
}

.publication-stats {
    display: grid;
    grid-template-columns: .7fr 1fr 1.4fr;
    gap: 15px;
    margin-bottom: 20px;
}

.publication-stats article {
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid #dde6ee;
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(3, 24, 44, .045);
}

.publication-stats span,
.publication-stats strong {
    display: block;
}

.publication-stats span {
    margin-bottom: 8px;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.publication-stats strong {
    overflow: hidden;
    color: var(--navy-900);
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.publication-stats article:first-child strong {
    color: var(--blue-700);
    font-size: 30px;
    line-height: 1;
}

.publication-list-card {
    overflow: hidden;
    border: 1px solid #dbe5ee;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.publication-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 25px 28px;
    border-bottom: 1px solid var(--gray-100);
}

.publication-toolbar h2 {
    margin: 0 0 4px;
    color: var(--navy-900);
    font-size: 21px;
}

.publication-toolbar p {
    margin: 0;
    color: var(--gray-500);
    font-size: 12px;
}

.publication-search {
    display: flex;
    min-width: min(100%, 410px);
}

.publication-search input {
    min-width: 0;
    flex: 1;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--gray-300);
    border-right: 0;
    border-radius: 9px 0 0 9px;
    outline: none;
}

.publication-search input:focus {
    border-color: var(--blue-600);
    box-shadow: inset 0 0 0 1px var(--blue-600);
}

.publication-search button {
    padding: 0 18px;
    color: var(--white);
    border: 0;
    border-radius: 0 9px 9px 0;
    cursor: pointer;
    background: var(--blue-700);
    font-weight: 750;
}

.publication-items {
    display: grid;
}

.publication-item {
    padding: 25px 28px;
    border-bottom: 1px solid var(--gray-100);
}

.publication-item:last-child {
    border-bottom: 0;
}

.publication-item:hover {
    background: #fbfdff;
}

.publication-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.publication-date,
.publication-code {
    font-size: 11px;
    font-weight: 800;
}

.publication-date {
    padding: 6px 10px;
    color: var(--blue-700);
    border-radius: 999px;
    background: #e9f6fd;
}

.publication-code {
    color: var(--gray-500);
}

.publication-identifiers {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 14px;
}

.publication-identifiers span {
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 750;
}

.publication-identifiers small {
    display: block;
    margin-bottom: 3px;
    color: var(--gray-500);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.publication-content {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--gray-700);
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.publication-item details {
    margin-top: 15px;
}

.publication-item summary {
    color: var(--blue-700);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.publication-item dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 14px 0 0;
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    background: var(--gray-100);
}

.publication-item dl div {
    min-width: 0;
    padding: 12px;
    background: var(--white);
}

.publication-item dt {
    margin-bottom: 4px;
    color: var(--gray-500);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.publication-item dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--gray-700);
    font-size: 12px;
    line-height: 1.5;
}

.empty-publications {
    display: grid;
    place-items: center;
    padding: 76px 24px;
    text-align: center;
}

.empty-icon {
    position: relative;
    width: 56px;
    height: 64px;
    margin-bottom: 18px;
    border: 2px solid #9bcfe9;
    border-radius: 9px;
    background: #eff9fd;
}

.empty-icon::before,
.empty-icon::after {
    content: "";
    position: absolute;
    left: 13px;
    height: 2px;
    border-radius: 2px;
    background: #6eb9df;
}

.empty-icon::before {
    top: 22px;
    width: 28px;
}

.empty-icon::after {
    top: 33px;
    width: 20px;
}

.empty-publications h3 {
    margin: 0 0 7px;
    color: var(--navy-900);
}

.empty-publications p {
    margin: 0;
    color: var(--gray-500);
    font-size: 13px;
}

.study-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding: 17px 20px;
    border: 1px solid #bae6fd;
    border-radius: 13px;
    color: var(--gray-700);
    background: #f0f9ff;
}

.study-notice strong {
    display: block;
    margin-bottom: 4px;
    color: var(--navy-900);
    font-size: 13px;
}

.study-notice p {
    margin: 0;
    color: var(--gray-500);
    font-size: 12px;
    line-height: 1.5;
}

.publication-study-card {
    overflow: hidden;
    border: 1px solid #dbe5ee;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.study-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 30px;
    color: var(--white);
    background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
}

.study-card-header span:first-child {
    color: #a9c9dc;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.study-card-header h2 {
    margin: 7px 0 0;
    font-size: 30px;
    letter-spacing: -.03em;
}

.study-status {
    padding: 7px 11px;
    border: 1px solid rgba(116, 212, 244, .3);
    border-radius: 999px;
    color: var(--cyan-300);
    background: rgba(116, 212, 244, .09);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.study-metadata {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-100);
}

.study-metadata div {
    min-width: 0;
    padding: 19px 22px;
    background: var(--white);
}

.study-metadata span,
.study-metadata strong {
    display: block;
}

.study-metadata span {
    margin-bottom: 6px;
    color: var(--gray-500);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.study-metadata strong {
    overflow: hidden;
    color: var(--navy-900);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.study-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .32fr);
    gap: 1px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-100);
}

.study-content {
    min-width: 0;
    padding: 28px 30px;
    background: var(--white);
}

.study-content > span {
    display: block;
    margin-bottom: 12px;
    color: var(--blue-700);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.study-content p {
    margin: 0;
    color: var(--gray-700);
    font-size: 13px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.study-content-type p {
    color: var(--navy-900);
    font-weight: 750;
}

.study-publication-summary {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.study-publication-summary > span {
    display: block;
    margin-bottom: 10px;
    color: var(--blue-700);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.study-publication-summary p {
    color: var(--navy-900);
    font-weight: 650;
}

.publication-event {
    margin: 0;
}

.publication-event-separator {
    display: block;
    width: 100%;
    height: 1px;
    margin: 18px 0;
    border: 0;
    background: #d8dee8;
}

.study-ai-summary {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid rgba(17, 85, 163, .14);
    border-radius: 12px;
    background: rgba(17, 85, 163, .035);
}

.study-ai-summary > span,
.study-source-type > span {
    display: block;
    margin-bottom: 10px;
    color: var(--blue-700);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.study-ai-summary p {
    color: var(--navy-900);
    font-weight: 650;
}

.study-ai-publication-type {
    margin-top: 14px;
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 750;
}

.study-ai-publication-type strong {
    color: var(--blue-700);
}

.study-ai-summary small {
    display: block;
    margin-top: 12px;
    color: var(--gray-500);
    font-size: 10px;
    line-height: 1.5;
}

.study-ai-deadline {
    margin-top: 16px;
    padding: 12px 14px;
    border-left: 3px solid var(--blue-700);
    border-radius: 4px;
    color: var(--navy-900);
    background: var(--white);
    font-size: 13px;
    font-weight: 750;
}

.study-ai-deadline strong {
    color: var(--blue-700);
    font-size: 16px;
}

.study-ai-tasks {
    margin-top: 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--blue-700);
    border-radius: 4px;
    background: var(--white);
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 650;
}

.study-ai-task-path {
    margin-top: 8px;
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 600;
    word-break: break-all;
}

.study-ai-task-path code {
    display: block;
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    background: #f3f6fb;
    color: var(--navy-900);
    font-size: 11px;
}

.study-ai-summary .study-deadline-warning {
    margin-top: 8px;
    color: #9a3412;
}

.study-task-action {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #f0f9ff;
}

.study-task-action > strong {
    color: var(--navy-900);
    font-size: 13px;
}

.study-task-action p {
    margin: 6px 0 12px;
    color: var(--gray-700);
    font-size: 12px;
    line-height: 1.5;
}

.study-task-form {
    margin: 0;
}

.study-task-result + .study-task-form {
    margin-top: 10px;
}

.task-create-button {
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
}

.study-task-result {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #166534;
    background: #dcfce7;
    font-size: 12px;
    font-weight: 700;
}

.study-ai-summary .study-ai-error {
    color: #9a3412;
    font-weight: 650;
}

.study-content-type .study-ai-type {
    color: var(--navy-900);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

.study-ai-confidence {
    margin-top: 10px;
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 800;
}

.study-content-type .study-ai-basis {
    margin-top: 14px;
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.55;
}

.study-review-required {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 9px;
    border-radius: 6px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 9px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.study-source-type {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-100);
}

.study-source-type p {
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 650;
}

.study-details {
    margin: 0 30px 30px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-100);
}

.study-details summary {
    color: var(--blue-700);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.study-details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 16px 0 0;
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    background: var(--gray-100);
}

.study-details dl div {
    min-width: 0;
    padding: 13px;
    background: var(--white);
}

.study-details dt {
    margin-bottom: 4px;
    color: var(--gray-500);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.study-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--gray-700);
    font-size: 12px;
    line-height: 1.5;
}

.source-result {
    margin: 15px 2px 0;
    color: var(--gray-500);
    font-size: 11px;
    text-align: right;
}

@media (max-width: 900px) {
    .login-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-panel {
        min-height: calc(100vh - 76px);
        padding: 54px 24px;
    }

    .feature-panel {
        min-height: 680px;
        padding: 72px 32px 90px;
    }

    .provider-note {
        left: 32px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .connection-layout {
        grid-template-columns: 1fr;
    }

    .connection-overview {
        min-height: 460px;
    }

    .security-list {
        margin-top: 28px;
    }

    .publication-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-header,
    .dashboard-header {
        min-height: 68px;
        padding: 0 18px;
    }

    .brand strong {
        font-size: 19px;
    }

    .header-status,
    .user-menu > span {
        display: none;
    }

    .login-layout {
        min-height: calc(100vh - 68px);
    }

    .login-panel {
        min-height: calc(100vh - 68px);
        padding: 42px 20px;
    }

    .login-content h1 {
        font-size: 35px;
    }

    .feature-panel h2 {
        font-size: 38px;
    }

    .dashboard-main {
        width: min(100% - 28px, 1180px);
        padding: 36px 0;
    }

    .integration-main {
        width: min(100% - 28px, 920px);
        padding: 32px 0;
    }

    .integration-heading {
        flex-direction: column;
    }

    .integration-actions {
        flex-direction: column-reverse;
    }

    .integration-actions button {
        width: 100%;
    }

    .connection-details {
        grid-template-columns: 1fr;
    }

    .connection-page {
        width: min(100% - 28px, 1120px);
        padding: 32px 0 48px;
    }

    .connection-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .connection-layout {
        border-radius: 17px;
    }

    .connection-overview,
    .connection-form-panel {
        padding: 32px 24px;
    }

    .connection-overview {
        min-height: 430px;
    }

    .connection-symbol {
        margin-top: 38px;
    }

    .connection-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .connection-history {
        grid-template-columns: 1fr;
    }

    .publications-main {
        width: min(100% - 28px, 1180px);
        padding: 32px 0 48px;
    }

    .publications-hero,
    .publication-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .publications-hero form,
    .sync-button,
    .publication-search {
        width: 100%;
    }

    .publication-toolbar,
    .publication-item {
        padding: 22px 20px;
    }

    .publication-item dl {
        grid-template-columns: 1fr;
    }

    .study-card-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px 22px;
    }

    .study-metadata,
    .study-details dl {
        grid-template-columns: 1fr;
    }

    .study-content-grid {
        grid-template-columns: 1fr;
    }

    .study-content {
        padding: 24px 22px;
    }

    .study-details {
        margin: 0 22px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
