body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #222;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.main-panel {
    flex: 1;
    min-width: 0;
    padding: 24px 32px 40px;
    box-sizing: border-box;
}

.sidebar {
    width: 220px;
    flex: 0 0 220px;
    background: #0f172a;
    color: #fff;
    padding: 24px 16px;
    box-sizing: border-box;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    background: transparent;
}

.menu-item.active,
.menu-item:hover {
    background: #1e293b;
    color: #fff;
}

.menu-group-title {
    margin-top: 16px;
    margin-bottom: 4px;
    padding: 0 12px;
    color: #94a3b8;
    font-size: 12px;
}

.submenu-item {
    margin-left: 10px;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card,
.content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

.login-card {
    width: 420px;
}

.hint {
    color: #666;
    font-size: 14px;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
}

input,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d8dce6;
    border-radius: 8px;
    background: #fff;
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: #fff;
    background: #1677ff;
    cursor: pointer;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.toolbar h2 {
    margin: 0;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.search-group input {
    max-width: 320px;
}

.inline-btn,
.primary-link-btn,
.secondary-btn,
.page-link {
    display: inline-block;
    width: auto;
    margin-top: 0;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.inline-btn,
.primary-link-btn {
    border: none;
    color: #fff;
    background: #1677ff;
    cursor: pointer;
}

.secondary-btn,
.page-link {
    border: 1px solid #d8dce6;
    color: #334155;
    background: #fff;
}

.page-link.disabled {
    pointer-events: none;
    color: #94a3b8;
    background: #f8fafc;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    color: #475569;
}

.form-card {
    max-width: 760px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.error {
    margin-top: 10px;
    color: #d4380d;
}

.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-img {
    width: 120px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #d8dce6;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 52px;
    margin-bottom: 24px;
}

.topbar-title {
    flex: 1;
    min-width: 0;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    color: #0f172a;
}

.user-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex: 0 0 auto;
}

.user-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.user-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.user-sub {
    grid-column: 1 / -1;
    justify-self: end;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 13px;
}

.logout-btn {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.22);
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e6f4ff;
    color: #1677ff;
    font-size: 12px;
    line-height: 18px;
}

.status-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.status-switch {
    position: relative;
    width: 44px;
    height: 24px;
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.status-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.status-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease;
}

.status-switch.on .status-switch-track {
    background: #22c55e;
}

.status-switch.on .status-switch-thumb {
    transform: translateX(20px);
}

.status-switch.off .status-switch-track {
    background: #cbd5e1;
}

.status-text {
    color: #334155;
    font-size: 13px;
}

.secret-cell {
    min-width: 0;
}

.secret-content {
    display: inline;
}

.secret-mask,
.secret-value {
    vertical-align: middle;
}

.secret-mask {
    color: #64748b;
    letter-spacing: 1px;
}

.verify-cell {
    min-width: 0;
}

.verify-display {
    word-break: break-all;
}

.verify-edit-btn {
    display: inline-block;
    width: auto;
    margin: 0 0 0 8px;
    padding: 4px 10px;
    border: 1px solid #1677ff;
    border-radius: 6px;
    color: #1677ff;
    background: #fff;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
}

.secret-value {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    color: #0f172a;
    word-break: break-all;
    display: inline-block;
}

.secret-toggle {
    width: auto;
    margin: 0 0 0 6px;
    padding: 4px 10px;
    border: 1px solid #d8dce6;
    border-radius: 8px;
    vertical-align: middle;
    background: #fff;
    color: #334155;
    font-size: 12px;
}

.content-card {
    overflow-x: auto;
}

.data-table th {
    width: 180px;
}

.data-table,
.list-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}


.data-table th,
.data-table td,
.list-table th,
.list-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
}

.game-link-btn {
    width: auto;
    margin-top: 0;
    padding: 5px 12px;
    border: 1px solid #1677ff;
    border-radius: 6px;
    background: #fff;
    color: #1677ff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    width: 520px;
    max-width: 90vw;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modal-dialog h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d8dce6;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
}

.modal-link-display {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d8dce6;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    word-break: break-all;
    line-height: 1.8;
}

.modal-param-highlight {
    color: #d4380d;
    font-weight: 700;
}

.modal-env-tip {
    margin: 0 0 12px;
    padding: 6px 12px;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 6px;
    color: #d46b08;
    font-size: 12px;
    line-height: 1.6;
}

.modal-note {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-copy-btn,
.modal-close-btn {
    width: auto;
    margin-top: 0;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.modal-copy-btn {
    border: none;
    color: #fff;
    background: #1677ff;
}

.modal-close-btn {
    border: 1px solid #d8dce6;
    color: #334155;
    background: #fff;
}

