/* ===== Global Layout ===== */
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, sans-serif;
    background: #f5f7fa;
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
/* ===== Headings ===== */
h1, h2, h3 {
    margin-top: 0;
    color: #222;
}
/* ===== Forms ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
input[type="text"],
input[type="password"],
select {
    padding: 0.7rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}
/* ===== Checkbox Groups ===== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* ===== Navigation ===== */
.navbar {
    background: #0066cc;
    padding: 1rem;
    color: #fff;
}
.navbar a {
    color: #fff;
    margin-right: 1rem;
    text-decoration: none;
    font-weight: 600;
}
.navbar a:hover {
    text-decoration: underline;
}
/* ===== Buttons ===== */
input[type="submit"],
button {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 5px;
    border: none;
    background: #0066cc;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}
input[type="submit"]:hover,
button:hover {
    background: #0055aa;
}
.btn-danger {
    background: #cc0000;
}
.btn-danger:hover {
    background: #aa0000;
}
/* ===== Table ===== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 1rem;
}
th {
    background: #f0f4f8;
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid #dde3ea;
    color: #555;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: #f9fbff;
}
/* ===== Table Action Buttons ===== */
td form {
    display: inline;
}
td button {
    margin: 2px;
}
/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-running {
    background: #d4edda;
    color: #155724;
}
.status-stopped {
    background: #f8d7da;
    color: #721c24;
}
.status-row-stopped td {
    opacity: 0.65;
}
/* ===== OpenResty Status Bar ===== */
.resty-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.65rem 1rem;
    background: #f0f4f8;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid #dde3ea;
}


/* ===== Log Output ===== */
pre {
    background: #f0f4f8;
    color: #111;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-size: 0.8rem;
    border: 1px solid #dde3ea;
}


/* ===== Instructions ===== */
.instructions {
    margin-top: 5rem;
    border-top: 2px solid #eee;
    padding-top: 2rem;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.service-card {
    background: #f8fafc;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
.service-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}
.service-card a {
    display: inline-block;
    font-size: 0.8rem;
    color: #0066cc;
    margin-bottom: 0.5rem;
    word-break: break-all;
}
.service-card ul {
    margin: 0.25rem 0 0 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
}
.service-card p {
    font-size: 0.85rem;
    margin: 0.25rem 0;
}
.service-card pre {
    font-size: 0.75rem;
    margin: 0.5rem 0 0 0;
}
