/* ==========================================================================
   LEDIA CLOUD — ENDPOINT REGISTRY
   Horizontal infrastructure workspace
   ========================================================================== */


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

.endpoints-page {
    --endpoints-border: rgba(255, 255, 255, 0.09);
    --endpoints-border-soft: rgba(255, 255, 255, 0.055);

    --endpoints-panel: rgba(17, 18, 20, 0.88);
    --endpoints-panel-2: rgba(21, 22, 24, 0.88);

    --endpoints-hover: rgba(255, 255, 255, 0.045);
    --endpoints-selected: rgba(244, 181, 84, 0.09);

    --endpoints-text: #f4f4f4;
    --endpoints-muted: #99999f;
    --endpoints-muted-2: #707076;

    --endpoints-brand: var(--brand, #f4b554);

    width: 100%;
    height: calc(100dvh - 148px);

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    box-sizing: border-box;
}

.endpoints-page *,
.endpoints-page *::before,
.endpoints-page *::after {
    box-sizing: border-box;
}


/* ==========================================================================
   SHELL
   ========================================================================== */

.endpoints-shell {
    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    gap: 14px;

    overflow: hidden;
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.endpoints-head {
    flex: 0 0 auto;

    min-height: 74px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 32px;

    padding: 0 2px;
}

.endpoints-head-copy {
    min-width: 0;
}

.endpoints-kicker {
    margin: 0 0 7px;

    color: var(--endpoints-muted-2);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.endpoints-title-line {
    display: flex;
    align-items: center;

    gap: 13px;
}

.endpoints-title-line h1 {
    margin: 0;

    color: var(--endpoints-text);

    font-size: clamp(25px, 2vw, 34px);
    line-height: 1;

    font-weight: 800;

    letter-spacing: -0.04em;
}

.endpoints-head-copy>p {
    margin: 8px 0 0;

    color: var(--endpoints-muted);

    font-size: 13px;
    line-height: 1.4;
}


/* ==========================================================================
   HEALTH
   ========================================================================== */

.endpoints-health {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding: 6px 9px;

    border: 1px solid var(--endpoints-border);

    border-radius: 999px;

    color: #b9d8c3;

    background: rgba(83, 170, 109, 0.06);

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.endpoints-health-dot,
.endpoints-status-indicator {
    width: 7px;
    height: 7px;

    flex: 0 0 auto;

    border-radius: 999px;

    background: #65c986;

    box-shadow:
        0 0 10px rgba(101, 201, 134, 0.5);
}


/* ==========================================================================
   HEADER SUMMARY
   ========================================================================== */

.endpoints-summary {
    display: flex;
    align-items: center;

    gap: 17px;

    flex: 0 0 auto;

    padding-bottom: 2px;
}

.endpoints-summary-item {
    display: flex;
    align-items: baseline;

    gap: 6px;

    white-space: nowrap;
}

.endpoints-summary-item strong {
    color: var(--endpoints-text);

    font-size: 16px;
    font-weight: 800;
}

.endpoints-summary-item span {
    color: var(--endpoints-muted);

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

.endpoints-summary-divider {
    width: 1px;
    height: 18px;

    background: var(--endpoints-border);
}


/* ==========================================================================
   TOOLBAR
   ========================================================================== */

.endpoints-toolbar {
    flex: 0 0 auto;

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

    gap: 16px;
}

.endpoints-tabs {
    display: flex;
    align-items: center;

    gap: 5px;

    width: fit-content;

    padding: 4px;

    border: 1px solid var(--endpoints-border);

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.025);
}

.endpoints-tab {
    appearance: none;

    min-height: 31px;

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

    padding: 0 14px;

    border: 0;
    border-radius: 999px;

    outline: 0;

    background: transparent;

    color: var(--endpoints-muted);

    font: inherit;
    font-size: 11px;
    font-weight: 800;

    cursor: pointer;
}

.endpoints-tab.active {
    color: #151515;

    background: var(--endpoints-brand);

    box-shadow:
        0 7px 22px rgba(244, 181, 84, 0.16);
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.endpoints-btn {
    appearance: none;

    min-height: 35px;

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

    gap: 7px;

    padding: 0 13px;

    border: 1px solid var(--endpoints-border);
    border-radius: 11px;

    background: rgba(255, 255, 255, 0.035);

    color: var(--endpoints-text);

    font: inherit;
    font-size: 11px;
    font-weight: 750;

    cursor: pointer;

    transition:
        background 140ms ease,
        border-color 140ms ease,
        color 140ms ease;
}

.endpoints-btn:hover {
    border-color: rgba(255, 255, 255, 0.16);

    background: rgba(255, 255, 255, 0.07);
}

.endpoints-btn-primary {
    border-color: var(--endpoints-brand);

    background: var(--endpoints-brand);

    color: #161616;
}

.endpoints-btn-primary:hover {
    border-color: #ffc86c;

    background: #ffc86c;
}

.endpoints-btn-danger {
    color: #ef9a9a;

    border-color: rgba(225, 91, 91, 0.22);

    background: rgba(225, 91, 91, 0.055);
}

.endpoints-btn-danger:hover {
    color: #ffb1b1;

    border-color: rgba(225, 91, 91, 0.32);

    background: rgba(225, 91, 91, 0.1);
}

.endpoints-add-btn {
    appearance: none;

    width: 30px;
    height: 30px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    padding: 0;

    border: 1px solid var(--endpoints-border);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.035);

    color: var(--endpoints-text);

    font: inherit;
    font-size: 19px;
    line-height: 1;

    cursor: pointer;

    transition:
        border-color 140ms ease,
        background 140ms ease,
        color 140ms ease;
}

.endpoints-add-btn:hover {
    color: #151515;

    border-color: var(--endpoints-brand);

    background: var(--endpoints-brand);
}


/* ==========================================================================
   WORKSPACE
   ========================================================================== */

.endpoints-workspace {
    flex: 1 1 auto;

    width: 100%;

    min-width: 0;
    min-height: 0;

    display: grid;

    grid-template-columns:
        minmax(210px, 0.68fr) minmax(310px, 1fr) minmax(430px, 1.55fr);

    overflow: hidden;

    border: 1px solid var(--endpoints-border);

    border-radius: 24px;

    background:
        radial-gradient(circle at 82% 6%,
            rgba(255, 255, 255, 0.035),
            transparent 27%),
        rgba(12, 13, 14, 0.72);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}


/* ==========================================================================
   RAILS
   ========================================================================== */

.endpoints-rail,
.endpoints-inspector {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.endpoints-system-rail,
.endpoints-list-rail {
    border-right: 1px solid var(--endpoints-border);
}

.endpoints-rail-header,
.endpoints-inspector-header {
    flex: 0 0 auto;

    min-height: 73px;

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

    gap: 12px;

    padding: 17px 18px 14px;

    border-bottom: 1px solid var(--endpoints-border-soft);
}

.endpoints-rail-header h2,
.endpoints-inspector-header h2 {
    margin: 0;

    color: var(--endpoints-text);

    font-size: 16px;
    line-height: 1.15;

    font-weight: 750;

    letter-spacing: -0.025em;
}

.endpoints-rail-header .endpoints-kicker,
.endpoints-inspector-header .endpoints-kicker {
    margin-bottom: 5px;
}

.endpoints-rail-count {
    color: var(--endpoints-muted-2);

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

    letter-spacing: 0.07em;
    text-transform: uppercase;
}


/* ==========================================================================
   RAIL SEARCH
   ========================================================================== */

.endpoints-rail-tools {
    flex: 0 0 auto;

    padding: 11px 13px;

    border-bottom: 1px solid var(--endpoints-border-soft);
}

.endpoints-search-input,
.endpoints-input,
.endpoints-textarea,
.endpoints-select {
    width: 100%;

    box-sizing: border-box;

    appearance: none;

    border: 1px solid var(--endpoints-border);

    outline: none;

    background: rgba(255, 255, 255, 0.025);

    color: var(--endpoints-text);

    font: inherit;

    transition:
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease;
}

.endpoints-search-input {
    height: 36px;

    padding: 0 12px;

    border-radius: 11px;

    font-size: 12px;
}

.endpoints-search-input::placeholder,
.endpoints-input::placeholder,
.endpoints-textarea::placeholder {
    color: #64646a;
}

.endpoints-search-input:focus,
.endpoints-input:focus,
.endpoints-textarea:focus,
.endpoints-select:focus {
    border-color:
        color-mix(in srgb,
            var(--endpoints-brand) 48%,
            transparent);

    background: rgba(255, 255, 255, 0.04);

    box-shadow:
        0 0 0 3px rgba(244, 181, 84, 0.055);
}


/* ==========================================================================
   INTERNAL SCROLLING
   ========================================================================== */

.endpoints-rail-scroll,
.endpoints-inspector-scroll {
    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 255, 255, 0.14) transparent;
}

.endpoints-rail-scroll::-webkit-scrollbar,
.endpoints-inspector-scroll::-webkit-scrollbar {
    width: 6px;
}

.endpoints-rail-scroll::-webkit-scrollbar-track,
.endpoints-inspector-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.endpoints-rail-scroll::-webkit-scrollbar-thumb,
.endpoints-inspector-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.13);
}


/* ==========================================================================
   SYSTEM FILTERS
   ========================================================================== */

.endpoints-system-list {
    padding: 7px;
}

.endpoints-system-item {
    appearance: none;

    width: 100%;

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

    gap: 12px;

    padding: 10px 11px;

    border: 1px solid transparent;
    border-radius: 12px;

    background: transparent;

    color: var(--endpoints-text);

    font: inherit;

    text-align: left;

    cursor: pointer;

    transition:
        background 120ms ease,
        border-color 120ms ease;
}

.endpoints-system-item+.endpoints-system-item {
    margin-top: 2px;
}

.endpoints-system-item:hover {
    background: var(--endpoints-hover);
}

.endpoints-system-item.active {
    border-color: rgba(244, 181, 84, 0.17);

    background: var(--endpoints-selected);
}

.endpoints-system-name {
    min-width: 0;

    overflow: hidden;

    font-size: 12px;
    font-weight: 750;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoints-system-count {
    min-width: 25px;

    padding: 4px 7px;

    border: 1px solid var(--endpoints-border);

    border-radius: 999px;

    color: var(--endpoints-muted);

    background: rgba(255, 255, 255, 0.025);

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

    text-align: center;
}


/* ==========================================================================
   ENDPOINT LIST
   ========================================================================== */

.endpoints-list {
    padding: 7px;
}

.endpoint-row {
    appearance: none;

    width: 100%;

    display: block;

    padding: 11px;

    border: 1px solid transparent;
    border-radius: 12px;

    background: transparent;

    color: var(--endpoints-text);

    font: inherit;

    text-align: left;

    cursor: pointer;

    transition:
        background 120ms ease,
        border-color 120ms ease;
}

.endpoint-row+.endpoint-row {
    margin-top: 2px;
}

.endpoint-row:hover {
    background: var(--endpoints-hover);
}

.endpoint-row.active {
    border-color: rgba(244, 181, 84, 0.17);

    background: var(--endpoints-selected);
}

.endpoint-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.endpoint-row-name {
    min-width: 0;

    overflow: hidden;

    color: var(--endpoints-text);

    font-size: 12px;
    font-weight: 750;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-method {
    flex: 0 0 auto;

    padding: 4px 6px;

    border: 1px solid var(--endpoints-border);

    border-radius: 7px;

    color: var(--endpoints-muted);

    background: rgba(255, 255, 255, 0.025);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 0.04em;
}

.endpoint-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 5px;

    margin-top: 6px;

    color: var(--endpoints-muted);

    font-size: 10px;
}

.endpoint-row-url {
    min-width: 0;

    margin-top: 8px;

    overflow: hidden;

    color: var(--endpoints-muted-2);

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 9px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   INSPECTOR
   ========================================================================== */

.endpoints-inspector {
    position: relative;

    background:
        radial-gradient(circle at 86% 5%,
            rgba(244, 181, 84, 0.045),
            transparent 27%);
}

.endpoints-inspector-type {
    flex: 0 0 auto;

    padding: 5px 8px;

    border: 1px solid var(--endpoints-border);

    border-radius: 999px;

    color: var(--endpoints-muted);

    background: rgba(255, 255, 255, 0.025);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.endpoints-inspector-content {
    min-height: 100%;

    display: flex;
    flex-direction: column;

    padding: 22px;
}

.endpoints-inspector-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    padding-bottom: 21px;

    border-bottom: 1px solid var(--endpoints-border-soft);
}

.endpoints-inspector-name {
    margin: 0;

    color: var(--endpoints-text);

    font-size: clamp(21px, 2vw, 29px);
    line-height: 1.05;

    font-weight: 800;

    letter-spacing: -0.04em;
}

.endpoints-inspector-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px;

    margin-top: 9px;

    color: var(--endpoints-muted);

    font-size: 11px;
}

.endpoints-inspector-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;
}


/* ==========================================================================
   INSPECTOR DATA
   ========================================================================== */

.endpoints-data-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    margin-top: 7px;
}

.endpoints-data-block {
    min-width: 0;

    padding: 16px 0;

    border-bottom: 1px solid var(--endpoints-border-soft);
}

.endpoints-data-block:nth-child(odd):not(.endpoints-data-wide) {
    padding-right: 18px;

    border-right: 1px solid var(--endpoints-border-soft);
}

.endpoints-data-block:nth-child(even):not(.endpoints-data-wide) {
    padding-left: 18px;
}

.endpoints-data-wide {
    grid-column: 1 / -1;
}

.endpoints-data-label {
    display: block;

    margin-bottom: 7px;

    color: var(--endpoints-muted-2);

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

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.endpoints-data-value {
    color: var(--endpoints-text);

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

    line-height: 1.55;

    overflow-wrap: anywhere;
}

.endpoints-data-description {
    margin: 0;

    max-width: 680px;

    color: var(--endpoints-muted);

    font-size: 12px;
    line-height: 1.65;
}

.endpoints-code-block {
    width: 100%;

    padding: 12px 13px;

    border: 1px solid var(--endpoints-border);

    border-radius: 11px;

    background: rgba(0, 0, 0, 0.17);

    overflow-wrap: anywhere;
}

.endpoints-code-block code {
    color: #d4d4d6;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 11px;
    line-height: 1.55;
}


/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.endpoints-empty {
    height: 100%;

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

    padding: 30px;

    text-align: center;
}

.endpoints-empty-icon {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    margin-bottom: 12px;

    border: 1px solid var(--endpoints-border);

    border-radius: 11px;

    color: var(--endpoints-muted);

    background: rgba(255, 255, 255, 0.025);
}

.endpoints-empty h3 {
    margin: 0;

    color: var(--endpoints-text);

    font-size: 13px;
    font-weight: 750;
}

.endpoints-empty p {
    max-width: 260px;

    margin: 7px 0 0;

    color: var(--endpoints-muted-2);

    font-size: 11px;
    line-height: 1.5;
}


/* ==========================================================================
   FORM
   ========================================================================== */

.endpoints-form {
    display: flex;
    flex-direction: column;

    gap: 14px;
}

.endpoints-form-heading {
    padding-bottom: 18px;

    border-bottom: 1px solid var(--endpoints-border-soft);
}

.endpoints-form-heading h3 {
    margin: 0;

    color: var(--endpoints-text);

    font-size: 22px;
    line-height: 1.1;

    letter-spacing: -0.035em;
}

.endpoints-form-heading p {
    margin: 8px 0 0;

    color: var(--endpoints-muted);

    font-size: 11px;
    line-height: 1.5;
}

.endpoints-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 11px;
}

.endpoints-field {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.endpoints-field-wide {
    grid-column: 1 / -1;
}

.endpoints-field>span {
    color: var(--endpoints-muted);

    font-size: 10px;
    font-weight: 700;
}

.endpoints-input,
.endpoints-select {
    height: 38px;

    padding: 0 11px;

    border-radius: 10px;

    font-size: 12px;
}

.endpoints-select {
    cursor: pointer;
}

.endpoints-textarea {
    min-height: 90px;

    padding: 10px 11px;

    border-radius: 10px;

    resize: vertical;

    font-size: 12px;
    line-height: 1.5;
}

.endpoints-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    padding-top: 4px;
}

.endpoints-feedback {
    min-height: 16px;

    color: var(--endpoints-muted);

    font-size: 10px;
}


/* ==========================================================================
   STATUS BAR
   ========================================================================== */

.endpoints-statusbar {
    flex: 0 0 34px;

    min-height: 34px;

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

    gap: 20px;

    padding: 0 4px;

    color: var(--endpoints-muted-2);

    font-size: 9px;

    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.endpoints-status-left,
.endpoints-status-right {
    display: flex;
    align-items: center;

    gap: 10px;
}

.endpoints-status-left strong {
    color: var(--endpoints-muted);

    font-size: 9px;
}

.endpoints-status-online {
    color: #82b990;
}

.endpoints-status-right strong {
    color: var(--endpoints-text);
}


/* ==========================================================================
   SMALLER LAPTOPS
   Keep the OS horizontal — do not stack vertically.
   ========================================================================== */

@media (max-width: 1100px) {

    .endpoints-summary-item span {
        display: none;
    }

    .endpoints-summary {
        gap: 11px;
    }

    .endpoints-workspace {
        overflow-x: auto;
        overflow-y: hidden;

        grid-template-columns:
            210px 310px 430px;
    }

    .endpoints-system-rail,
    .endpoints-list-rail,
    .endpoints-inspector {
        min-width: 0;
    }
}


/* ==========================================================================
   SHORT VIEWPORTS
   ========================================================================== */

@media (max-height: 800px) {

    .endpoints-page {
        height: calc(100dvh - 132px);
    }

    .endpoints-shell {
        gap: 9px;
    }

    .endpoints-head {
        min-height: 58px;
    }

    .endpoints-head-copy>p {
        display: none;
    }

    .endpoints-title-line h1 {
        font-size: 25px;
    }

    .endpoints-tabs {
        padding: 3px;
    }

    .endpoints-tab {
        min-height: 28px;
    }

    .endpoints-rail-header,
    .endpoints-inspector-header {
        min-height: 60px;

        padding-top: 12px;
        padding-bottom: 11px;
    }

    .endpoints-rail-tools {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .endpoints-search-input {
        height: 32px;
    }

    .endpoints-system-item,
    .endpoint-row {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .endpoints-inspector-content {
        padding: 17px;
    }

    .endpoints-statusbar {
        flex-basis: 27px;
        min-height: 27px;
    }
}


/* ==========================================================================
   VERY NARROW VIEWPORTS
   Horizontal scrolling remains intentional.
   ========================================================================== */

@media (max-width: 760px) {

    .endpoints-head {
        align-items: flex-start;
    }

    .endpoints-summary {
        display: none;
    }

    .endpoints-workspace {
        min-width: 860px;

        grid-template-columns:
            200px 260px 400px;
    }

    .endpoints-status-right {
        display: none;
    }

    .endpoints-form-grid,
    .endpoints-data-grid {
        grid-template-columns: 1fr;
    }

    .endpoints-field-wide,
    .endpoints-data-wide {
        grid-column: auto;
    }

    .endpoints-data-block:nth-child(odd):not(.endpoints-data-wide),
    .endpoints-data-block:nth-child(even):not(.endpoints-data-wide) {
        padding-left: 0;
        padding-right: 0;

        border-right: 0;
    }
}