:root {
    --bg: #f3efe5;
    --panel: #fffaf2;
    --panel-strong: #fff;
    --text: #1e1d1a;
    --muted: #6c665c;
    --border: #d7cdbc;
    --accent: #1d6f5f;
    --accent-strong: #0f4f43;
    --danger: #ad3f2f;
    --shadow: 0 18px 45px rgba(64, 48, 28, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(29, 111, 95, 0.12), transparent 25%),
        linear-gradient(180deg, #f8f3eb 0%, var(--bg) 100%);
}

.ops-page,
.ops-login-page {
    min-height: 100vh;
}

.ops-header,
.ops-layout,
.ops-login-card {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.ops-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 32px 0 20px;
}

.ops-header h1,
.ops-login-card h1,
.panel-header h2,
.service-card h3 {
    margin: 0;
}

.ops-header p,
.ops-login-card p,
.service-meta,
.service-details dt,
.service-details dd,
.ops-alert {
    margin: 0;
}

.eyebrow {
    color: var(--accent-strong);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ops-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 20px;
    padding-bottom: 32px;
}

.ops-panel,
.ops-login-card {
    background: rgba(255, 250, 242, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 24px;
}

.ops-panel {
    padding: 20px;
}

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

.service-grid {
    display: grid;
    gap: 14px;
}

.service-card {
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.service-meta,
.service-details dt {
    color: var(--muted);
    font-size: 13px;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.service-running {
    background: rgba(29, 111, 95, 0.12);
    color: var(--accent-strong);
}

.service-stopped {
    background: rgba(173, 63, 47, 0.12);
    color: var(--danger);
}

.service-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.service-details dd {
    font-weight: 600;
    word-break: break-word;
}

.service-details-wide {
    grid-column: 1 / -1;
}

.service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

button,
select,
input {
    font: inherit;
}

button,
.ops-login-form button {
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

button:hover,
.ops-login-form button:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ghost-button {
    background: transparent;
    color: var(--accent-strong);
    border: 1px solid var(--border);
}

.ghost-button:hover {
    background: rgba(29, 111, 95, 0.08);
}

.ops-alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.ops-alert-error {
    background: rgba(173, 63, 47, 0.12);
    color: var(--danger);
}

.ops-alert-success {
    background: rgba(29, 111, 95, 0.12);
    color: var(--accent-strong);
}

.ops-alert-hidden {
    display: none;
}

.log-panel {
    display: flex;
    flex-direction: column;
}

.log-viewer {
    min-height: 620px;
    margin: 0;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #2c3136;
    background: #14191d;
    color: #d7efe8;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
}

.ops-login-card {
    max-width: 420px;
    padding: 28px;
    transform: translateY(12vh);
}

.ops-login-form {
    display: grid;
    gap: 10px;
}

.ops-login-form input,
select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

@media (max-width: 980px) {
    .ops-layout {
        grid-template-columns: 1fr;
    }

    .service-details {
        grid-template-columns: 1fr;
    }
}
