:root {
    color-scheme: dark;

    --background: #02060b;
    --surface: rgba(8, 20, 34, 0.96);
    --surface-secondary: rgba(10, 26, 43, 0.88);
    --surface-dark: rgba(2, 11, 20, 0.82);

    --border: rgba(117, 159, 190, 0.18);
    --border-strong: rgba(66, 172, 231, 0.43);

    --text: #edf7fc;
    --text-secondary: #9eb1bf;
    --text-muted: #657d8f;

    --blue: #238ee8;
    --cyan: #34c6dc;
    --green: #46d889;
    --yellow: #f1c765;
    --red: #f4667a;

    --radius-large: 19px;
    --radius-medium: 12px;
    --radius-small: 9px;

    --shadow:
        0 28px 85px rgba(0, 0, 0, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 22px;
    overflow-x: hidden;
    color: var(--text);
    background:
        linear-gradient(
            145deg,
            #010409,
            #06101a 52%,
            #02060b
        );
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    display: block;
}

.hidden {
    display: none !important;
}

.background {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

.background-grid {
    position: absolute;
    inset: 0;
    opacity: 0.065;
    background-image:
        linear-gradient(
            rgba(70, 142, 191, 0.35) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(70, 142, 191, 0.35) 1px,
            transparent 1px
        );
    background-size: 46px 46px;
}

.background-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
}

.light-one {
    top: -240px;
    left: -220px;
    width: 550px;
    height: 550px;
    background: rgba(20, 118, 230, 0.17);
}

.light-two {
    right: -220px;
    bottom: -260px;
    width: 600px;
    height: 600px;
    background: rgba(20, 193, 184, 0.09);
}

.app-shell {
    width: min(1450px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(100, 158, 199, 0.27);
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(6, 17, 29, 0.98),
            rgba(3, 10, 18, 0.98)
        );
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 19px 25px;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(
            90deg,
            rgba(14, 55, 89, 0.35),
            transparent 64%
        );
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(61, 190, 229, 0.42);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(30, 136, 231, 0.2),
            rgba(24, 202, 200, 0.08)
        );
}

.brand-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: #66d9ef;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-line {
    display: flex;
    align-items: center;
    gap: 9px;
}

.brand h1 {
    margin: 0;
    font-size: clamp(1.42rem, 2.4vw, 1.82rem);
    letter-spacing: -0.045em;
}

.brand p {
    margin: 3px 0 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.header-badge {
    padding: 4px 7px;
    border: 1px solid rgba(64, 212, 141, 0.28);
    border-radius: 999px;
    color: #87edb4;
    background: rgba(46, 174, 106, 0.08);
    font-size: 0.59rem;
    font-weight: 850;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(104, 153, 187, 0.15);
    border-radius: 12px;
    background: rgba(4, 17, 29, 0.4);
}

.header-status-item {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-status-item svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #5cc8da;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-status-item div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.header-status-item strong {
    color: #d9eaf2;
    font-size: 0.68rem;
}

.header-status-item small {
    color: #657d8e;
    font-size: 0.59rem;
}

.header-status-separator {
    width: 1px;
    height: 26px;
    background: rgba(115, 154, 181, 0.17);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--green);
    box-shadow:
        0 0 0 4px rgba(70, 216, 137, 0.08),
        0 0 14px rgba(70, 216, 137, 0.65);
}

.security-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    min-height: 42px;
    padding: 9px 20px;
    border-bottom: 1px solid rgba(100, 149, 183, 0.1);
    background: rgba(6, 22, 36, 0.52);
}

.security-strip div {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #6f899b;
    font-size: 0.64rem;
}

.security-strip svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #4dbfcf;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.02fr)
        minmax(0, 0.98fr);
    gap: 18px;
    padding: 18px;
}

.right-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 18px;
}

.panel {
    min-width: 0;
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background:
        linear-gradient(
            145deg,
            rgba(11, 28, 46, 0.87),
            rgba(6, 19, 32, 0.92)
        );
    box-shadow:
        0 15px 42px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(66, 176, 228, 0.29);
    border-radius: 10px;
    color: #68ccef;
    background: rgba(32, 139, 204, 0.08);
}

.panel-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--cyan);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.panel-title h2,
.result-top h2,
.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 0.96rem;
    letter-spacing: -0.02em;
}

.temporary-badge,
.command-type-badge {
    padding: 5px 8px;
    border: 1px solid rgba(51, 198, 218, 0.21);
    border-radius: 999px;
    color: #82dce8;
    background: rgba(24, 169, 190, 0.055);
    font-size: 0.6rem;
    font-weight: 800;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.destination-row {
    grid-template-columns:
        minmax(0, 1fr)
        125px;
}

.field {
    min-width: 0;
}

.field label {
    display: block;
    margin: 0 0 5px;
    color: #bfd0da;
    font-size: 0.69rem;
    font-weight: 750;
}

.control {
    position: relative;
    display: flex;
    align-items: center;
}

.control-icon {
    position: absolute;
    left: 12px;
    z-index: 2;
    color: #62bde8;
    pointer-events: none;
}

.control-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

input {
    width: 100%;
    height: 42px;
    border: 1px solid rgba(104, 153, 188, 0.24);
    border-radius: var(--radius-small);
    outline: none;
    color: var(--text);
    background: var(--surface-dark);
    padding: 0 40px;
    font-size: 0.76rem;
    transition:
        border-color 145ms ease,
        box-shadow 145ms ease,
        background 145ms ease;
}

input::placeholder {
    color: #50697b;
}

input:hover {
    border-color: rgba(86, 169, 220, 0.4);
}

input:focus {
    border-color: rgba(53, 180, 245, 0.84);
    background: rgba(4, 18, 31, 0.96);
    box-shadow:
        0 0 0 3px rgba(31, 149, 226, 0.08);
}

.password-toggle {
    position: absolute;
    right: 6px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    color: #668597;
    background: transparent;
}

.password-toggle:hover {
    color: #72d2e9;
    background: rgba(59, 166, 212, 0.08);
}

.password-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vendor-selector {
    position: relative;
}

.vendor-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid rgba(71, 168, 219, 0.42);
    border-radius: 10px;
    background: rgba(4, 15, 25, 0.99);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.56);
}

.vendor-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid rgba(105, 151, 181, 0.08);
    color: #cfdee7;
    background: transparent;
    text-align: left;
}

.vendor-option:last-child {
    border-bottom: 0;
}

.vendor-option:hover,
.vendor-option.selected {
    color: white;
    background: rgba(31, 131, 196, 0.15);
}

.vendor-option span {
    font-size: 0.72rem;
    font-weight: 750;
}

.vendor-option code {
    overflow: hidden;
    max-width: 52%;
    color: #5ebcd5;
    font-size: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-no-results {
    padding: 15px;
    color: #718798;
    font-size: 0.7rem;
    text-align: center;
}

.selected-vendor-card {
    display: grid;
    grid-template-columns:
        34px
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(66, 169, 219, 0.18);
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            rgba(18, 91, 142, 0.09),
            rgba(5, 21, 35, 0.27)
        );
}

.selected-vendor-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(64, 181, 227, 0.24);
    border-radius: 8px;
    color: #64cce7;
    background: rgba(23, 129, 176, 0.07);
}

.selected-vendor-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.selected-vendor-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.selected-vendor-copy strong {
    color: #d9e8ef;
    font-size: 0.69rem;
}

.selected-vendor-copy code {
    overflow: hidden;
    color: #62d3e0;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.small-action {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(102, 158, 193, 0.2);
    border-radius: 7px;
    color: #8fb3c8;
    background: rgba(10, 31, 48, 0.55);
    font-size: 0.61rem;
    font-weight: 800;
}

.small-action:hover {
    border-color: rgba(66, 184, 232, 0.43);
    color: #d2edf7;
}

.advanced {
    overflow: hidden;
    border: 1px solid rgba(104, 153, 187, 0.16);
    border-radius: 11px;
    background: rgba(4, 15, 26, 0.29);
}

.advanced summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.advanced summary::-webkit-details-marker {
    display: none;
}

.advanced-summary {
    display: flex;
    align-items: center;
    gap: 9px;
}

.advanced-icon {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid rgba(84, 160, 206, 0.19);
    border-radius: 7px;
    color: #78bfe7;
    background: rgba(42, 120, 170, 0.065);
}

.advanced-icon svg,
.advanced-chevron svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.advanced-summary div:last-child {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.advanced-summary strong {
    color: #c9dae3;
    font-size: 0.7rem;
}

.advanced-summary span {
    color: #60798b;
    font-size: 0.59rem;
}

.advanced-chevron {
    color: #68a9ce;
    transition: transform 160ms ease;
}

.advanced[open] .advanced-chevron {
    transform: rotate(180deg);
}

.advanced-body {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 2px 12px 12px;
}

.form-actions {
    display: grid;
    grid-template-columns:
        minmax(0, 0.78fr)
        minmax(0, 1.22fr);
    gap: 10px;
}

.button {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-size: 0.74rem;
    font-weight: 850;
    transition:
        transform 145ms ease,
        border-color 145ms ease,
        box-shadow 145ms ease,
        background 145ms ease;
}

.button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.secondary-button {
    border: 1px solid rgba(126, 172, 202, 0.31);
    color: #d7e8f1;
    background: rgba(5, 18, 30, 0.66);
}

.secondary-button:hover:not(:disabled) {
    border-color: rgba(75, 188, 238, 0.54);
    background: rgba(11, 39, 59, 0.67);
}

.primary-button {
    border: 1px solid rgba(82, 199, 255, 0.6);
    color: white;
    background:
        linear-gradient(
            105deg,
            #176ad9,
            #188fe8 58%,
            #17aebe
        );
    box-shadow:
        0 11px 25px rgba(18, 112, 215, 0.2);
}

.primary-button:hover:not(:disabled) {
    box-shadow:
        0 14px 32px rgba(20, 130, 231, 0.29);
}

.operation-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(109, 149, 178, 0.19);
    border-radius: 999px;
    color: #8198a8;
    background: rgba(78, 105, 126, 0.055);
    font-size: 0.59rem;
    font-weight: 800;
}

.operation-status span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.operation-status.running {
    border-color: rgba(42, 161, 238, 0.28);
    color: #69bdf3;
    background: rgba(32, 134, 216, 0.07);
}

.operation-status.running span {
    box-shadow: 0 0 11px currentColor;
    animation: pulse 1s ease-in-out infinite;
}

.operation-status.success {
    border-color: rgba(67, 217, 133, 0.26);
    color: #65dc98;
    background: rgba(44, 169, 101, 0.07);
}

.operation-status.error {
    border-color: rgba(250, 97, 118, 0.3);
    color: #fb8798;
    background: rgba(197, 52, 75, 0.07);
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.42;
    }

    50% {
        opacity: 1;
    }
}

.operation-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 9px;
}

.operation-summary div {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid rgba(109, 156, 188, 0.11);
    border-radius: 8px;
    background: rgba(3, 13, 22, 0.29);
}

.operation-summary span {
    display: block;
    margin-bottom: 3px;
    color: #60798b;
    font-size: 0.54rem;
}

.operation-summary strong {
    display: block;
    overflow: hidden;
    color: #dceaf2;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.executed-command {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    padding: 8px 10px;
    border: 1px solid rgba(67, 164, 212, 0.15);
    border-radius: 8px;
    background: rgba(12, 58, 87, 0.08);
}

.executed-command div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.executed-command span:first-child {
    color: #607b8d;
    font-size: 0.54rem;
}

.executed-command code {
    overflow: hidden;
    color: #63cbdc;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 23px;
    bottom: 23px;
    left: 14px;
    width: 1px;
    background: rgba(91, 138, 171, 0.17);
}

.timeline-step {
    position: relative;
    display: grid;
    grid-template-columns:
        29px
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 10px;
    min-height: 51px;
    border-bottom: 1px solid rgba(113, 156, 184, 0.07);
}

.timeline-step:last-child {
    border-bottom: 0;
}

.step-marker {
    z-index: 2;
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 2px solid #35536a;
    border-radius: 50%;
    color: #71899a;
    background: #0a1928;
    font-size: 0.59rem;
    font-weight: 900;
    transition: all 155ms ease;
}

.step-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.step-content strong {
    color: #c7d8e2;
    font-size: 0.69rem;
}

.step-content small {
    overflow: hidden;
    color: #5e7688;
    font-size: 0.59rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.step-result {
    min-width: 66px;
    color: #617b8d;
    font-size: 0.57rem;
    font-weight: 800;
    text-align: right;
}

.timeline-step.active .step-marker {
    border-color: var(--blue);
    color: white;
    background: rgba(28, 141, 242, 0.18);
    box-shadow:
        0 0 0 5px rgba(28, 141, 242, 0.05),
        0 0 19px rgba(28, 141, 242, 0.2);
}

.timeline-step.active .step-content strong {
    color: white;
}

.timeline-step.active .step-result {
    color: #67bbf0;
}

.timeline-step.completed .step-marker {
    border-color: var(--green);
    color: #062413;
    background: var(--green);
}

.timeline-step.completed .step-marker {
    font-size: 0;
}

.timeline-step.completed .step-marker::after {
    content: "✓";
    color: #062413;
    font-size: 0.72rem;
    font-weight: 950;
}

.timeline-step.completed .step-result {
    color: #5bd98e;
}

.timeline-step.failed .step-marker {
    border-color: var(--red);
    color: white;
    background: rgba(250, 97, 118, 0.17);
}

.timeline-step.failed .step-marker {
    font-size: 0;
}

.timeline-step.failed .step-marker::after {
    content: "!";
    color: #ffb5c0;
    font-size: 0.73rem;
    font-weight: 950;
}

.timeline-step.failed .step-result {
    color: #fa8797;
}

.operation-message {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 11px;
    padding: 10px 11px;
    border: 1px solid rgba(79, 164, 218, 0.16);
    border-radius: 9px;
    background: rgba(16, 87, 128, 0.052);
}

.message-icon {
    display: grid;
    min-width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 7px;
    color: #6fc6ed;
    background: rgba(40, 146, 200, 0.08);
}

.message-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.operation-message strong {
    display: block;
    margin-bottom: 2px;
    color: #dcebf3;
    font-size: 0.65rem;
}

.operation-message p {
    margin: 0;
    color: #6b8394;
    font-size: 0.59rem;
    line-height: 1.45;
}

.operation-message.success {
    border-color: rgba(67, 217, 133, 0.2);
    background: rgba(45, 166, 102, 0.052);
}

.operation-message.success .message-icon {
    color: #60da91;
    background: rgba(56, 190, 115, 0.08);
}

.operation-message.error {
    border-color: rgba(250, 97, 118, 0.23);
    background: rgba(178, 39, 61, 0.06);
}

.operation-message.error .message-icon {
    color: #fa8495;
    background: rgba(207, 57, 80, 0.08);
}

.result-panel {
    border-color: rgba(67, 217, 133, 0.23);
    background:
        linear-gradient(
            145deg,
            rgba(9, 42, 40, 0.74),
            rgba(5, 25, 34, 0.91)
        );
}

.result-top {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 12px;
}

.success-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(85, 231, 151, 0.44);
    border-radius: 12px;
    color: #082a16;
    background:
        linear-gradient(
            145deg,
            #65e99d,
            #36c877
        );
    box-shadow:
        0 0 24px rgba(55, 212, 125, 0.18);
}

.success-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.result-top p {
    margin: 3px 0 0;
    color: #78a08c;
    font-size: 0.61rem;
}

.result-information {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 8px;
}

.result-information div {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid rgba(106, 179, 148, 0.11);
    border-radius: 8px;
    background: rgba(2, 15, 21, 0.24);
}

.result-information span {
    display: block;
    margin-bottom: 3px;
    color: #64877a;
    font-size: 0.54rem;
}

.result-information strong {
    display: block;
    overflow: hidden;
    color: #e3f7eb;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-metrics {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 10px;
}

.result-metrics div {
    padding: 8px;
    border: 1px solid rgba(106, 179, 148, 0.1);
    border-radius: 8px;
    text-align: center;
    background: rgba(2, 15, 21, 0.22);
}

.result-metrics strong {
    display: block;
    margin-bottom: 2px;
    color: #def6e8;
    font-size: 0.7rem;
}

.result-metrics span {
    color: #64877a;
    font-size: 0.54rem;
}

.result-actions {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.result-action {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(99, 181, 162, 0.19);
    border-radius: 8px;
    color: #c5e8dc;
    background: rgba(31, 116, 101, 0.065);
    font-size: 0.62rem;
    font-weight: 800;
}

.result-action:hover {
    border-color: rgba(81, 209, 174, 0.4);
}

.result-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.download-action {
    border-color: rgba(69, 222, 165, 0.37);
    color: #e2fff3;
    background:
        linear-gradient(
            105deg,
            rgba(24, 149, 112, 0.68),
            rgba(30, 183, 144, 0.61)
        );
}

.new-operation-action {
    border-color: rgba(70, 170, 222, 0.28);
    color: #ccecf9;
    background: rgba(30, 126, 181, 0.09);
}

.history-panel {
    padding-bottom: 13px;
}

.history-header {
    margin-bottom: 10px;
}

.history-empty {
    padding: 13px;
    border: 1px dashed rgba(106, 150, 180, 0.16);
    border-radius: 9px;
    color: #607889;
    font-size: 0.63rem;
    text-align: center;
}

.history-list {
    display: flex;
    max-height: 185px;
    overflow-y: auto;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    display: grid;
    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(0, 0.9fr)
        auto;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid rgba(101, 149, 181, 0.11);
    border-radius: 8px;
    background: rgba(3, 14, 24, 0.27);
}

.history-main {
    min-width: 0;
}

.history-main strong {
    display: block;
    overflow: hidden;
    margin-bottom: 2px;
    color: #d6e6ee;
    font-size: 0.63rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-main span,
.history-vendor {
    overflow: hidden;
    color: #647e90;
    font-size: 0.55rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-status {
    padding: 4px 6px;
    border-radius: 999px;
    font-size: 0.51rem;
    font-weight: 850;
}

.history-status.success {
    color: #75e6a5;
    background: rgba(48, 182, 106, 0.09);
}

.history-status.error {
    color: #fa8fa0;
    background: rgba(205, 57, 80, 0.09);
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 20px 15px;
    border-top: 1px solid rgba(106, 153, 184, 0.08);
    color: #566f80;
    font-size: 0.59rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    padding: 22px;
    place-items: center;
    background: rgba(0, 4, 8, 0.79);
    backdrop-filter: blur(10px);
}

.modal-window {
    display: flex;
    width: min(1180px, 100%);
    height: min(820px, calc(100vh - 44px));
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(81, 164, 215, 0.38);
    border-radius: 17px;
    background: #07111b;
    box-shadow:
        0 35px 110px rgba(0, 0, 0, 0.7);
    transition:
        width 160ms ease,
        height 160ms ease,
        border-radius 160ms ease;
}

.modal-window.fullscreen {
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 17px;
    border-bottom: 1px solid rgba(111, 157, 187, 0.12);
    background:
        linear-gradient(
            90deg,
            rgba(17, 67, 102, 0.3),
            transparent
        );
}

.modal-header p {
    margin: 3px 0 0;
    color: #708899;
    font-size: 0.62rem;
}

.modal-header-actions {
    display: flex;
    gap: 7px;
}

.modal-icon-button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(123, 160, 187, 0.19);
    border-radius: 8px;
    color: #8299aa;
    background: rgba(5, 17, 28, 0.55);
}

.modal-icon-button:hover {
    border-color: rgba(75, 184, 231, 0.38);
    color: #8ddcf2;
}

.modal-icon-button.close-button:hover {
    border-color: rgba(231, 92, 110, 0.38);
    color: #f08292;
}

.modal-icon-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.modal-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(105, 151, 184, 0.1);
    background: rgba(5, 17, 29, 0.85);
}

.config-search {
    position: relative;
    min-width: 220px;
    flex: 1;
}

.config-search svg {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #668ba1;
    stroke-width: 1.8;
    transform: translateY(-50%);
}

.config-search input {
    height: 36px;
    padding: 0 11px 0 33px;
    font-size: 0.67rem;
}

.modal-toolbar > span {
    min-width: 72px;
    color: #637d8f;
    font-size: 0.59rem;
    text-align: right;
}

.toolbar-button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid rgba(112, 157, 188, 0.22);
    border-radius: 7px;
    color: #c5d9e5;
    background: rgba(9, 27, 43, 0.7);
    font-size: 0.61rem;
    font-weight: 800;
}

.toolbar-button.active {
    border-color: rgba(59, 190, 224, 0.43);
    color: #7de0ef;
    background: rgba(27, 130, 168, 0.13);
}

.toolbar-button.primary {
    border-color: rgba(50, 178, 234, 0.39);
    color: white;
    background: rgba(29, 130, 205, 0.44);
}

.configuration-viewer {
    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1fr);
    min-height: 0;
    flex: 1;
    overflow: auto;
    background: #020810;
}

.line-numbers {
    min-width: 54px;
    padding: 14px 11px 36px;
    border-right: 1px solid rgba(102, 143, 170, 0.1);
    color: #3f596b;
    background: #030b13;
    font-family:
        "Cascadia Code",
        "Fira Code",
        Consolas,
        monospace;
    font-size: 0.67rem;
    line-height: 1.6;
    text-align: right;
    user-select: none;
}

.configuration-content {
    min-width: max-content;
    margin: 0;
    padding: 14px 20px 36px;
    color: #b9d8e8;
    background: #020810;
    font-family:
        "Cascadia Code",
        "Fira Code",
        Consolas,
        monospace;
    font-size: 0.67rem;
    line-height: 1.6;
    white-space: pre;
    tab-size: 4;
}

.configuration-viewer.wrap-lines .configuration-content {
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.configuration-content mark {
    padding: 0;
    color: #081015;
    background: #f3c76a;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(390px, calc(100vw - 40px));
    padding: 10px 12px;
    border: 1px solid rgba(94, 174, 218, 0.31);
    border-radius: 9px;
    color: #d9edf7;
    background: rgba(7, 24, 39, 0.97);
    box-shadow:
        0 17px 43px rgba(0, 0, 0, 0.43);
    font-size: 0.66rem;
}

.toast.success {
    border-color: rgba(67, 217, 133, 0.33);
}

.toast.error {
    border-color: rgba(250, 97, 118, 0.38);
}

@media (max-width: 1080px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        padding: 0;
    }

    .app-shell {
        border: 0;
        border-radius: 0;
    }

    .app-header {
        padding: 15px;
    }

    .header-status,
    .security-strip {
        display: none;
    }

    .main-grid {
        padding: 10px;
    }

    .panel {
        padding: 15px;
    }

    .form-row,
    .destination-row,
    .form-actions,
    .result-information,
    .result-actions {
        grid-template-columns: 1fr;
    }

    .operation-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .modal-overlay {
        padding: 0;
    }

    .modal-window {
        width: 100%;
        height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .modal-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .config-search {
        min-width: 100%;
    }

    .history-item {
        grid-template-columns:
            minmax(0, 1fr)
            auto;
    }

    .history-vendor {
        display: none;
    }
}

@media (max-width: 440px) {
    .brand p,
    .header-badge {
        display: none;
    }

    .operation-summary,
    .result-metrics {
        grid-template-columns: 1fr;
    }

    .timeline-step {
        grid-template-columns:
            29px
            minmax(0, 1fr);
    }

    .step-result {
        display: none;
    }

    .app-footer {
        justify-content: center;
    }

    .app-footer span:last-child {
        display: none;
    }
}
