﻿.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 3px 15px #24497903;
    margin-bottom: 14px;
    overflow: hidden;
}

.avatar {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 30px;
    font-weight: 600;
    height: 58px;
    justify-content: center;
    overflow: hidden;
    width: 58px;
}

.avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.peach { background: #fbe8cd; color: #a96e1a; }
.lavender { background: #ece0ff; color: #8845cc; }
.mint { background: #d6f7e8; color: #008c57; }
.pink { background: #ffedf1; color: #f03b59; }
.blue { background: #e4f1ff; color: var(--blue); }

.icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: #28416a;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 25px;
    justify-content: center;
    min-height: 44px;
    min-width: 40px;
}

.icon-button:hover { background: #edf4ff; }

.badge {
    align-items: center;
    background: #f0f3fa;
    border-radius: 10px;
    color: #627398;
    display: inline-flex;
    font-size: 12px;
    gap: 5px;
    justify-content: center;
    padding: 8px 9px;
    white-space: nowrap;
}

.badge svg { height: 17px; width: 17px; }
.action { background: #ffedf1; color: #f53558; }
.important { background: #fff7e4; color: #ce8a00; }
.new { background: #eaf3ff; color: #087cff; }

.chevron {
    color: #7d91b4;
    flex: 0 0 auto;
    font-size: 23px;
    margin-left: auto;
}

.setting-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    gap: 13px;
    min-height: 68px;
    padding: 15px;
}

.setting-row:last-child { border-bottom: 0; }
.setting-row strong { font-size: 14px; }
.setting-row .avatar { font-size: 23px; height: 42px; width: 42px; }
.connection-row { align-items: flex-start; flex-wrap: wrap; }
.connection-summary { flex: 1 1 160px; min-width: 0; }
.connection-summary strong, .connection-summary small { display: block; overflow-wrap: anywhere; }
.connection-actions { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 9px; margin-left: 55px; }
.connection-actions form { margin: 0; }
.connection-gateway-hint { margin: 0; padding: 0 15px 15px; }
.connection-service-card { display: grid; gap: 14px; }
.connection-service-head { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.connection-service-head > span { min-width: 0; }
.connection-service-head strong, .connection-service-head small { display: block; overflow-wrap: anywhere; }
.connection-service-head .connection-actions { margin-left: 0; }
.connection-resources { border-top: 1px solid var(--line); padding-top: 13px; }
.connection-resources strong { display: block; font-size: 14px; }
.connection-resources ul { margin: 8px 0 0; padding-left: 20px; }
.connection-resources li + li { margin-top: 6px; }
.connection-resource-form { margin: 0; }
.connection-resource-dialog { max-width: min(560px, calc(100vw - 28px)); padding: 22px; width: 100%; }
.connection-dialog-close { display: flex; justify-content: flex-end; margin: 0; }
@media (min-width: 640px) {
    .connection-service-head .connection-actions { flex: 0 1 auto; }
}
@media (min-width: 640px) {
    .connection-row { align-items: center; flex-wrap: nowrap; }
    .connection-actions { flex: 0 1 auto; margin-left: auto; }
}

.child-mapped-resource { border-top: 1px solid var(--line); padding: 14px 15px; }
.child-mapped-resource-heading { align-items: center; display: flex; gap: 10px; }
.child-mapped-resource-heading strong { display: block; }
.child-mapped-resource-heading small { margin-top: 2px; }
.child-mapped-resource-actions { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 9px; margin-top: 11px; }
.child-source-import { color: var(--blue); font-size: 14px; }
.child-source-import summary { cursor: pointer; min-height: 38px; padding: 9px 0; }
.child-source-import[open] { flex: 1 1 100%; }
.child-source-import .step3-history-import { margin: 0 0 7px; }
.child-source-import label { color: var(--ink); display: block; font-size: 13px; margin: 8px 0 6px; }
.child-source-import input[type=file] { font-size: 13px; padding: 9px; }
.child-source-import .hint { margin: 8px 0; }
.child-resource-remove { margin: 0; }
.child-remove-button { align-items: center; color: #9e3950; display: inline-flex; gap: 6px; }
.child-remove-button svg { height: 16px; width: 16px; }
.child-delete-history-button { color: #9e3950; }

.row-icon {
    background: #eaf3ff;
    border-radius: 12px;
    color: #087cff;
    display: grid;
    font-size: 24px;
    height: 38px;
    min-width: 38px;
    place-items: center;
    width: 38px;
}

.add-row { display: block; font-size: 14px; padding: 13px 16px; }

.insights {
    align-items: center;
    background: #eef5ff;
    border: 1px solid #cbdfff;
    border-radius: 17px;
    display: flex;
    gap: 14px;
    margin: 16px 0;
    padding: 18px 16px;
    text-align: left;
    width: 100%;
}

.insights svg { color: var(--blue); height: 34px; width: 34px; }
.insights strong { font-size: 17px; }
.insights small { margin-top: 3px; }

.field { display: flex; flex-direction: column; font-size: 14px; gap: 7px; margin: 0 0 19px; }
.input-wrap { display: flex; position: relative; }
.input-wrap input { width: 100%; }

input:not([type=checkbox]):not([type=radio]),
select,
textarea {
    background: #fff;
    border: 1px solid #dce5f2;
    border-radius: 9px;
    color: var(--ink);
    font-size: 15px;
    min-width: 0;
    outline: 0;
    padding: 12px 13px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus { border-color: #72afff; box-shadow: 0 0 0 3px #e8f2ff; }
input:disabled { background: #f0f3f9; color: #7a87a6; }
input::placeholder,
textarea::placeholder { color: #8a99b7; }

textarea { line-height: 1.5; min-height: 106px; resize: vertical; }

.password-toggle {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line);
    bottom: 1px;
    color: #637796;
    position: absolute;
    right: 0;
    top: 1px;
    width: 43px;
}

.input-wrap:has(.password-toggle) input { padding-right: 48px; }

.button {
    align-items: center;
    background: var(--blue);
    border: 1px solid transparent;
    border-radius: 9px;
    color: #fff;
    display: flex;
    font-size: 14px;
    font-weight: 500;
    gap: 9px;
    justify-content: center;
    margin: 10px 0;
    min-height: 46px;
    padding: 12px 15px;
    width: 100%;
}

.button:hover { filter: brightness(.97); }
.secondary { background: #eaf1fb; color: #566f9e; }
.compact { margin: 0; padding: 10px 15px; width: auto; }
.text-button { background: transparent; border: 0; color: var(--blue); font-size: 13px; padding: 8px 0; }

.check { align-items: center; cursor: pointer; display: flex; font-size: 13px; gap: 9px; }
input[type=checkbox],
input[type=radio] { accent-color: var(--blue); flex: 0 0 auto; height: 18px; margin: 0; width: 18px; }

.role-button {
    align-items: center;
    background: #edf6ff;
    border: 1px solid #cde3ff;
    border-radius: 11px;
    color: var(--ink);
    display: flex;
    gap: 14px;
    padding: 17px;
    text-align: left;
}

.role-button > span:last-child { margin-left: auto; }
.role-button strong { display: block; }
.role-button small { font-size: 12px; margin-top: 2px; }
.role-button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.role-button.primary small { color: #e5f1ff; }
.role-icon { background: #ffffff24; border-radius: 50%; display: grid; font-size: 28px; height: 39px; place-items: center; width: 39px; }

.segmented { background: #eaf1fb; border-radius: 10px; display: flex; gap: 3px; margin-bottom: 16px; padding: 3px; }
.segmented button { background: transparent; border: 0; border-radius: 8px; color: #607498; flex: 1; font-size: 13px; min-height: 40px; padding: 10px 5px; }
.segmented button.active { background: var(--blue); box-shadow: 0 2px 6px #087cff20; color: #fff; }
.segmented > .check { flex: 1; padding: 9px; }
.analysis-fields { display: flex; gap: 12px; }
.analysis-fields > .field { flex: 1; }
.switch { height: 22px; width: 36px; }

dialog {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    max-width: 100%;
    overscroll-behavior: contain;
    padding: 22px;
}

dialog::backdrop { backdrop-filter: blur(2px); background: #12243b80; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-heading { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.dialog-heading h2 { font-size: 20px; margin: 0; }
.drawer { border-radius: 0 22px 22px 0; height: 100dvh; margin: 0; max-height: 100dvh; min-height: 100dvh; padding: 25px 20px; width: min(350px, 88vw); }
.drawer .setting-row { border: 0; padding: 16px 0; }
.drawer h2 { font-size: 23px; }


