body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #f8fafc;
}

.page {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.dashboard-header {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.dashboard-title {
    grid-column: 1 / 4;
}

h1 {
    margin: 0 0 8px;
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 24px;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: bold;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #64748b;
}

.dot.online {
    background: #22c55e;
}

.dot.offline {
    background: #ef4444;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 18px;
}

.label {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.value {
    font-size: 21px;
    font-weight: 600;
    word-break: break-word;
}

.small {
    font-size: 15px;
    font-weight: normal;
    color: #cbd5e1;
    line-height: 1.5;
}

ul {
    padding-left: 20px;
    margin: 8px 0 0;
}

.footer {
    margin-top: 22px;
    color: #64748b;
    font-size: 13px;
}

.error {
    color: #fca5a5;
}

.admin-card {
    margin-top: 20px;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.controls input {
    flex: 1;
    min-width: 180px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: #f8fafc;
    font-size: 16px;
}

.controls button {
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.controls button:hover {
    background: #1d4ed8;
}

.controls button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.controls select {
    flex: 1;
    min-width: 0;
    padding: 10px 36px 10px 12px;

    border-radius: 8px;
    border: 1px solid #475569;
    background-color: #0f172a;
    color: white;
    font-size: 14px;

    appearance: none;
    -webkit-appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
    background-size: 12px 8px;
}

.controls select:focus {
    outline: none;
    border-color: #3b82f6;
}

.control-section {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #475569;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.65);
}

.scroll-list {
    max-height: 170px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
}

/* Chrome / Edge */
.scroll-list::-webkit-scrollbar {
    width: 4px;
}

.scroll-list::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-list::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 999px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
}

.service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-status {
    font-weight: 600;
}

.service-online {
    color: #22c55e;
}

.service-offline {
    color: #ef4444;
}

.process-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
}

.process-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.process-value {
    font-weight: 600;
}

.quick-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.quick-nav a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
}

.quick-nav a:hover {
    text-decoration: underline;
}

.quick-nav strong {
    color: #f8fafc;
    font-weight: 700;
}

.quick-nav .address-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.copy-button {
    margin-left: 1px;
    padding: 1px 2px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
}

.copy-button:hover {
    background: #334155;
    color: #f8fafc;
}

.restart-status {
    margin-top: -16px;
    margin-bottom: 22px;
    margin-left: 22px;
    color: #94a3b8;
    font-size: 13px;
}

.login-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #0f172a;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border: 1px solid #475569;
    border-radius: 14px;
    background: #1e293b;
}

.login-card h1 {
    margin: 0;
    font-size: 28px;
}

.login-subtitle {
    margin-top: 6px;
    margin-bottom: 24px;
    color: #94a3b8;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: white;
    font-size: 15px;
}

.login-card input:focus {
    outline: none;
    border-color: #3b82f6;
}

.login-button {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.login-button:hover {
    background: #1d4ed8;
}

.login-error {
    margin-top: 14px;
    padding: 10px 12px;

    border: 1px solid #7f1d1d;
    border-radius: 8px;

    background: #3f1d2e;
    color: #fca5a5;

    font-size: 14px;
    text-align: center;
}

.login-card label {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
}

.login-switch {
    margin-top: 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.login-switch a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
}

.login-switch a:hover {
    text-decoration: underline;
}

.login-hint {
    margin-top: 18px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.logout-link {
    grid-column: 4;
    justify-self: end;

    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #1e293b;
}

.logout-link:hover {
    color: white;
    background: #334155;
}

.access-key-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;

    padding: 8px 10px;
    border-radius: 8px;
    background: #0f172a;

    font-family: monospace;
    font-size: 15px;
}

.status-actions {
    grid-column: 4;
    justify-self: end;

    display: flex;
    gap: 8px;
    align-items: center;
}

.status-actions .logout-link {
    grid-column: auto;
    justify-self: auto;
}

.rate-limit-back {
    display: block;
    box-sizing: border-box;
    margin-top: 20px;
    text-align: center;
    text-decoration: none;
}

.rate-limit-back:hover {
    text-decoration: none;
}

.result {
    margin-top: 12px;
    color: #cbd5e1;
}