:root {
    --text: #1f2d3d;
    --muted: #8a9ab0;
    --line: #e8eaed;
    --brand: #2f6fbe;
    --brand-hover: #245a9d;
    --brand-light: #e8f2ff;
    --danger: #b42318;
    --danger-hover: #951d13;
    --success: #16a34a;
    --success-light: #dcfce7;
    --paper: #ffffff;
    --admin-bg: #f5f7fb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 54px;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.report-body {
    min-height: 100vh;
    background: #fff;
    font-size: 12px;
}

.outer-wrap {
    width: 100%;
    min-height: calc(100vh - 1.15rem);
}

.outer-content {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    background: var(--paper);
}

.report-card {
    position: relative;
    padding: 0.38rem 0 0.46rem;
}

.local-notice {
    width: fit-content;
    margin: 0 auto 0.24rem;
    padding: 0.09rem 0.18rem;
    border: 1px solid #f2b8b5;
    border-radius: 3px;
    color: #a23b35;
    background: #fff7f6;
    font-size: 0.26rem;
    line-height: 1.35;
}

.img-div {
    margin: 0 auto 0.18rem;
    text-align: center;
}

.img-div img {
    width: 1.074rem;
    height: 1.074rem;
    object-fit: cover;
}

.rowcard {
    padding-bottom: 0.16rem;
}

.row {
    display: flex;
    align-items: flex-start;
    min-height: 0.93rem;
    line-height: 0.42rem;
    padding: 0.12rem 0;
}

.col-left {
    width: 2.12rem;
    padding-right: 0.52rem;
    color: #8090a8;
    font-size: 0.37rem;
    line-height: 0.52rem;
    text-align: right;
    white-space: nowrap;
}

.col-right {
    flex: 1;
    min-width: 0;
    padding-right: 0.44rem;
    color: #0b2436;
    font-size: 0.37rem;
    line-height: 0.52rem;
    word-break: break-word;
}

.name-family {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.wap-footer {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0.3rem 0.24rem;
    color: #a9b0ba;
    background: #252525;
    font-size: 0.28rem;
    line-height: 0.48rem;
    text-align: center;
}

.admin-body {
    min-height: 100vh;
    background: var(--admin-bg);
    font-size: 14px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 32px;
    border-bottom: 1px solid #dfe5ef;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    font-size: 24px;
    color: var(--brand);
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: #f1f5f9;
}

.admin-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand);
    transition: color 0.2s ease;
}

.admin-brand:hover {
    color: var(--brand-hover);
}

.admin-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto 52px;
}

.auth-panel,
.saved-panel,
.record-form,
.table-wrap,
.empty-state {
    border: 1px solid #dfe5ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
}

.auth-panel:hover,
.saved-panel:hover,
.record-form:hover {
    box-shadow: var(--shadow-lg);
}

.auth-panel,
.saved-panel,
.empty-state {
    max-width: 560px;
    margin: 54px auto;
    padding: 32px;
}

.auth-panel h1,
.saved-panel h1,
.toolbar h1 {
    margin: 0 0 8px;
    color: #162235;
    font-size: 28px;
    font-weight: 700;
}

.auth-panel p,
.saved-panel p,
.toolbar p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.stack-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.record-form {
    padding: 24px;
}

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

label {
    display: grid;
    gap: 8px;
    color: #405066;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

label:hover {
    color: #1f2937;
}

input,
select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 8px 12px;
    color: #1f2937;
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(47, 111, 190, 0.12);
}

input:hover:not(:focus):not([readonly]),
select:hover:not(:focus) {
    border-color: #a0aec0;
}

input[readonly] {
    color: #64748b;
    background: #f5f7fa;
}

.empty-state {
    text-align: center;
    padding: 48px 32px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: end;
    cursor: pointer;
    transition: color 0.2s ease;
}

.checkbox-row:hover {
    color: var(--brand);
}

.checkbox-row input {
    width: 18px;
    min-height: 18px;
    cursor: pointer;
    accent-color: var(--brand);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-bar input {
    max-width: 360px;
}

.search-bar a {
    align-self: center;
    color: var(--brand);
}

.record-table {
    width: 100%;
    border-collapse: collapse;
}

.record-table th,
.record-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #edf1f7;
    text-align: left;
    transition: background-color 0.2s ease;
}

.record-table tbody tr:hover {
    background-color: #f8fafc;
}

.record-table th {
    color: #64748b;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.actions a,
.danger-link,
.link-button {
    border: 0;
    padding: 0;
    color: var(--brand);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.actions a:hover,
.link-button:hover {
    color: var(--brand-hover);
    text-decoration: underline;
}

.danger-link {
    color: var(--danger);
}

.danger-link:hover {
    color: var(--danger-hover);
    text-decoration: underline;
}

.primary-button,
.secondary-button,
.search-bar button,
.url-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--brand);
    border-radius: 8px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.primary-button,
.search-bar button,
.url-box button {
    color: #fff;
    background: var(--brand);
}

.primary-button:hover,
.search-bar button:hover,
.url-box button:hover {
    background: var(--brand-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.secondary-button {
    color: var(--brand);
    background: #fff;
}

.secondary-button:hover {
    background: var(--brand-light);
    transform: translateY(-1px);
}

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

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    padding: 14px 16px;
    background: #eef6ff;
    color: #174a7c;
    border-left: 4px solid var(--brand);
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease-out;
}

.flash i {
    font-size: 18px;
    flex-shrink: 0;
}

.flash.error {
    background: #fff1f0;
    color: var(--danger);
    border-left-color: var(--danger);
}

.flash.success {
    background: var(--success-light);
    color: #166534;
    border-left-color: var(--success);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮图标间距 */
.primary-button i,
.secondary-button i,
.link-button i,
.danger-link i {
    margin-right: 6px;
}

/* 标题图标样式 */
h1 i, h2 i {
    margin-right: 8px;
    color: var(--brand);
}

/* 表格标题图标 */
.record-table th i {
    margin-right: 6px;
    opacity: 0.7;
}

/* 操作按钮图标 */
.actions a i {
    margin-right: 4px;
    font-size: 0.9em;
}

/* 空状态容器 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 标签图标 */
label i {
    margin-right: 6px;
    color: var(--brand);
}

.url-box {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.generated-summary {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
}

.generated-summary div {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
}

.generated-summary dt {
    color: #64748b;
}

.generated-summary dd {
    margin: 0;
    color: #1f2937;
}

.regenerate-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
    border: 1px solid #f0d7a1;
    border-radius: 10px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: var(--shadow-sm);
}

.regenerate-panel h2 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #78350f;
}

.regenerate-panel p {
    margin: 0;
    color: #78590b;
    line-height: 1.5;
}

.url-box input {
    font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 760px) {
    html {
        font-size: 54px;
    }

    .admin-header {
        padding: 0 16px;
    }

    .admin-shell {
        width: calc(100% - 20px);
        margin-top: 16px;
    }

    .toolbar,
    .search-bar,
    .url-box,
    .regenerate-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .record-table {
        min-width: 720px;
    }

    .table-wrap {
        overflow-x: auto;
    }
}

@media (max-width: 430px) {
    html {
        font-size: 50px;
    }

    .col-left {
        width: 1.94rem;
        padding-right: 0.35rem;
    }

    .col-right {
        padding-right: 0.28rem;
    }
}
