* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #151819;
    color: #eee;
    font-family: Arial, sans-serif;
}

a {
    color: #87c93d;
}

.top {
    height: 56px;
    background: #111;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.brand {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

.user {
    margin-left: auto;
    display: flex;
    gap: 20px;
}

main {
    min-height: calc(100vh - 56px);
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

.card {
    background: #202425;
    border: 1px solid #353a3b;
    border-radius: 6px;
    padding: 24px;
}

.login-card {
    width: min(420px, calc(100% - 32px));
    margin: 70px auto;
}

label {
    display: block;
    margin: 18px 0;
}

input {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 11px;
    border: 1px solid #4a4f50;
    border-radius: 4px;
    background: #111;
    color: white;
}

button,
.button {
    display: inline-block;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 9px 14px;
    background: #2a2e2f;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: #383d3e;
}

.error {
    background: #722;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
}

.muted {
    color: #aaa;
}

.server-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.server-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.online {
    color: #8bd34a;
}

dl {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
}

dt {
    color: #aaa;
}

dd {
    margin: 0;
}

.console-page {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
}

.console-toolbar {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    background: #1d2021;
}

.console-toolbar .back {
    text-decoration: none;
}

#console-status {
    margin-left: auto;
    color: #bbb;
}

#screen {
    flex: 1;
    min-height: 0;
    background: black;
    overflow: hidden;
}

/*
 * ========================================================================
 * Hicoria Console toolbar groups - UI Step 1
 * Presentation only. New controls remain disabled.
 * ========================================================================
 */

.console-toolbar .toolbar-separator {
    display: inline-block;
    flex: 0 0 1px;
    width: 1px;
    height: 26px;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.16);
}

.console-toolbar button.button-danger-preview {
    background: #b52a2a;
    border-color: #b52a2a;
    color: #fff;
    font-weight: 700;
}

.console-toolbar button.button-danger-preview:disabled {
    background: #b52a2a;
    border-color: #b52a2a;
    color: #fff;
    opacity: 0.72;
    cursor: not-allowed;
}

.console-toolbar button:disabled:not(.button-danger-preview) {
    opacity: 0.55;
    cursor: not-allowed;
}

.console-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.console-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #888;
}

.console-status-online::before {
    background: #43a047;
}

.console-status-offline::before {
    background: #d32f2f;
}

.console-status-connecting::before {
    background: #888;
}

/*
 * Hicoria Console Clipboard V1
 * Text travels browser -> existing RFB connection -> guest only.
 */

.clipboard-panel {
    margin-top: 10px;
    padding: 12px;
    background: #1b1f20;
    border: 1px solid #353a3b;
    border-radius: 5px;
}

.clipboard-panel[hidden] {
    display: none;
}

.clipboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.clipboard-header label {
    margin: 0;
    font-weight: 600;
}

#clipboard-size {
    color: #aaa;
    font-size: 12px;
    white-space: nowrap;
}

#clipboard-size.clipboard-size-over {
    color: #e36b6b;
    font-weight: 700;
}

#clipboard-text {
    display: block;
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 10px;
    background: #111;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
}

#clipboard-text:focus {
    outline: none;
    border-color: #6f9e36;
}

.clipboard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.clipboard-message {
    min-height: 18px;
    margin-top: 7px;
    color: #87c93d;
    font-size: 12px;
}

.clipboard-message.clipboard-error {
    color: #e36b6b;
}

/*
 * Console runtime information.
 * Lives beside the Hicoria Console brand, outside the working toolbar.
 */

.console-top-runtime {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 30px;
    color: #9ca3a6;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.console-top-runtime-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #888;
}

.console-top-runtime-running .console-top-runtime-dot {
    background: #43a047;
}

.console-top-runtime-stopped .console-top-runtime-dot {
    background: #d32f2f;
}

.console-top-runtime-starting .console-top-runtime-dot {
    background: #d6a923;
}
