* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f5f7;
    color: #1f2937;
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

.app {
    width: min(1440px, calc(100% - 32px));
    margin: 24px auto;
}

.is-hidden {
    display: none !important;
}

.login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-card h1 {
    margin-bottom: 2px;
}

.login-card button {
    margin-top: 4px;
}

.header,
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 16px;
}

p,
.muted,
.card-title span {
    color: #6b7280;
    font-size: 13px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.guest-mode .admin-only,
.guest-mode .sensitive-col {
    display: none !important;
}

.guest-mode .grid {
    grid-template-columns: 1fr;
}

.card {
    padding: 16px;
}

.card-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px;
    font-family: Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
}

input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
}

.password-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.inline-controls,
.button-row,
.stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.inline-controls label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inline-controls input {
    width: 90px;
}

button {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

button:hover:not(:disabled) {
    background: #f9fafb;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

button.primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

button.primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.toolbar {
    margin-top: 16px;
}

.stats span {
    background: #f3f4f6;
    border-radius: 999px;
    padding: 6px 10px;
}

.message {
    min-height: 20px;
    margin-top: 10px;
    color: #2563eb;
    font-size: 13px;
}

.table-card {
    margin-top: 16px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    border-bottom: 1px solid #e5e7eb;
    padding: 9px 8px;
    text-align: left;
    white-space: nowrap;
}

th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    color: #374151;
}

.ok {
    color: #047857;
    font-weight: 700;
}

.bad {
    color: #dc2626;
    font-weight: 700;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 900px) {
    .header,
    .grid {
        display: block;
    }

    .grid .card + .card {
        margin-top: 16px;
    }

    .password-box {
        margin-top: 16px;
    }
}

