/* Legacy theme — Cloud/Deployment styles. Requires light.css or dark.css loaded first. */

.cloud-page {
    flex-grow: 1;
    display: flex;
    min-height: 0;
    background-color: var(--p-bg);
}

.users-tab {
    padding: 10px;
    flex-grow: 1;
    display: flex;
}

.nodes-tab {
    padding: 10px;
    display: flex;
}

#applications-tab {
    flex-grow: 1;
}

#applications-tab.is-active {
    display: flex;
    min-height: 0;
}

.applications-tab {
    flex-grow: 1;
    display: flex;
    min-height: 0;
}

.applications-list {
    min-width: 200px;
    border-right: solid 1px var(--p-sidebar-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background-color: var(--p-sidebar-bg);
}

.applications-items {
    overflow-y: scroll;
    flex-direction: column;
    flex: 1 1 0;
}

.application-block {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.application-block2 {
    flex-grow: 1;
    display: flex;
    min-height: 0;
}

.app-row {
    background-color: var(--p-row-bg);
    border-bottom: 1px solid var(--p-row-border);
    cursor: pointer;
    display: block;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    overflow: hidden;
    padding: 14px 20px;
    transition: all .2s ease;
    min-height: fit-content;
    color: var(--p-text-color);
}

.app-row:hover {
    padding-left: 24px;
    background-color: var(--p-hover-bg);
}

.app-row-selected {
    padding-left: 24px;
    background-color: var(--p-sidebar-selected-bg);
    color: var(--p-sidebar-selected-text);
}

.app-links-panel {
    border-bottom: solid 1px var(--p-border);
    display: flex;
    flex-direction: row;
    padding-left: 5px;
    flex: none;
    background-color: var(--p-surface);
}

.app-link {
    padding: 5px 0;
    margin-left: 10px;
    margin-right: 10px;
    cursor: pointer;
    color: var(--p-text-color);
}

.app-link-selected {
    border-bottom: solid 1px var(--p-accent);
}

.app-instances-tab {
    padding-left: 10px;
    flex-grow: 1;
}

.app-builds-tab {
    padding-left: 10px;
    padding-right: 10px;
    flex-grow: 1;
    display: flex;
    min-height: 0;
}

.app-builds-tab > div {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.app-builds-list {}

.app-builds-list-toolbar {
    align-items: center;
    flex-grow: 0;
}

.app-builds-list-toolbar > span {
    padding-left: 15px;
}

.app-build-logs {
    position: relative;
}

.app-logs-tab {
    padding-left: 10px;
    padding-right: 10px;
    flex-grow: 1;
    display: flex;
    min-height: 0;
}

.app-logs-tab > div {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.app-logs {
    position: relative;
}

.logs-back-btn {
    margin-top: 10px;
    text-decoration: none;
}

.app-logs-pane {
    position: absolute;
    top: 40px;
    bottom: 10px;
    left: 10px;
    right: 10px;
    overflow-y: scroll;
    background-color: var(--p-logs-bg);
    color: var(--p-logs-text);
    padding: 10px;
    border-radius: 5px;
}

#users-tab {
    overflow-y: scroll;
}

.ac0 { color: var(--p-logs-text); }
.ac1 { color: #ff0000; }
.ac2 { color: #00ff00; }
.ac3 { color: #ffff00; }
.ac4 { color: #0000ff; }
.ac5 { color: #ff00ff; }
.ac6 { color: #00ffff; }
.ac7 { color: #ffffff; }

.nodes-list {
    flex: 1 1 0;
}

.node-details {
    flex: 1 1 0;
}

.add-app-wnd {
    width: 400px;
}

.add-app-wnd .modal-window-body {
    padding-left: 7px;
    padding-right: 7px;
}

.app-deployments-tab {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 16px;
    gap: 16px;
    min-height: 0;
}

.deployment-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.deployment-toolbar-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--p-stat-link);
}

.deployment-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    flex: 0 0 auto;
}

.deployment-stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--p-card-bg);
    border: 1px solid var(--p-card-border);
    border-radius: 10px;
    padding: 12px 18px;
    min-width: 90px;
    box-shadow: 0 1px 4px var(--p-card-shadow);
}

.deployment-stat-card-wide {
    min-width: 200px;
}

.deployment-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--p-stat-label);
}

.deployment-stat-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--p-stat-value);
}

.deployment-stat-status.stat-running {
    color: var(--p-stat-running);
}

.deployment-stat-status.stat-failed {
    color: var(--p-stat-failed);
}

.deployment-stat-status.stat-pending {
    color: var(--p-stat-pending);
}

.deployment-stat-link {
    font-size: 0.875rem;
    color: var(--p-stat-link);
    text-decoration: none;
    word-break: break-all;
}

.deployment-stat-link:hover {
    text-decoration: underline;
}

.deployments-table {
    padding-top: 0;
}

/* User editor (Users tab) */
.user-editor {
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    overflow: auto;
}

.user-editor-header {
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.user-editor-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.user-editor-header,
.user-editor-field,
.user-editor-options,
.user-editor-actions {
    flex: 0 0 auto;
    overflow: visible;
}

.user-editor-field {
    gap: 0.25rem;
    max-width: 420px;
}

.user-editor-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.user-editor-readonly {
    font-family: monospace;
    color: #444;
    padding: 0.35rem 0;
}

.user-editor-section {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.user-editor-options {
    gap: 0.4rem;
    max-width: 420px;
}

.user-editor-actions {
    margin-top: 1rem;
}

.p-checkbox {
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    width: fit-content;
    overflow: visible;
}

.p-checkbox .p-material-icons {
    font-size: 20px;
    flex: none;
    color: #888;
}

.p-checkbox-checked .p-material-icons {
    color: #1a3a6b;
}