:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --primary-light: #ebf5fb;
    --success: #27ae60;
    --success-dark: #229954;
    --warning: #f39c12;
    --danger: #e74c3c;
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #e1e8ed;
    --bg: #f0f3f6;
    --card: #ffffff;
    --shadow: 0 4px 24px rgba(44, 62, 80, 0.08);
    --radius: 12px;
    --header-h: 88px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 0 24px;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.35);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-icon svg {
    width: 26px;
    height: 26px;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.header-sub {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 2px;
}

.header-session {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 0.8125rem;
}

.header-session span {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.92;
}

.header-session button {
    height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.header-session button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.query-card .query-form {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.span-2 {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.format-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.format-hint strong {
    color: var(--primary-dark);
    font-weight: 600;
    font-family: Consolas, "Courier New", monospace;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.form-group select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.uid-row,
.recent-query-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uid-row input,
.recent-query-row select {
    flex: 1;
    min-width: 0;
}

.checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.checkbox-option input {
    width: 15px;
    height: 15px;
    padding: 0;
    cursor: pointer;
}

.mini-btn {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
}

.mini-btn:hover {
    border-color: rgba(52, 152, 219, 0.45);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.date-range-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 24px;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.date-range-control:hover,
.date-range-control.range-open {
    border-color: #1677ff;
}

.date-range-control.range-open {
    box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.12);
}

.date-range-control input {
    min-width: 0;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    background: transparent;
    color: var(--text);
}

.date-range-control input::placeholder {
    color: #bfbfbf;
}

.date-range-control input:focus {
    box-shadow: none;
}

.date-range-control input.range-active {
    color: #1677ff;
}

.range-arrow {
    color: #bfbfbf;
    font-size: 0.875rem;
}

.range-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bfbfbf;
}

.range-icon svg {
    width: 16px;
    height: 16px;
}

.rtp-panel {
    position: absolute;
    z-index: 1100;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    color: rgba(0, 0, 0, 0.88);
    font-size: 14px;
}

.rtp-input-tabs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.rtp-input-tabs button {
    min-width: 0;
    height: 28px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font: inherit;
}

.rtp-input-tabs button:hover {
    background: #f5f5f5;
}

.rtp-input-tabs button.active {
    color: #1677ff;
    background: #e6f4ff;
}

.rtp-input-tabs span {
    color: #bfbfbf;
}

.rtp-main {
    display: grid;
    grid-template-columns: 288px 168px;
}

.rtp-date {
    border-right: 1px solid #f0f0f0;
}

.rtp-header {
    display: grid;
    grid-template-columns: 58px 1fr 58px;
    align-items: center;
    height: 48px;
    border-bottom: 1px solid #f0f0f0;
}

.rtp-title {
    text-align: center;
    font-weight: 600;
}

.rtp-navs {
    display: flex;
    justify-content: center;
    gap: 2px;
}

.rtp-navs button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    line-height: 1;
}

.rtp-navs button:hover {
    color: rgba(0, 0, 0, 0.88);
    background: #f5f5f5;
}

.rtp-week,
.rtp-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.rtp-week {
    padding: 12px 12px 4px;
    color: rgba(0, 0, 0, 0.88);
    text-align: center;
}

.rtp-calendar {
    padding: 0 12px 12px;
    row-gap: 4px;
}

.rtp-day {
    width: 32px;
    height: 32px;
    margin: 0 auto;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(0, 0, 0, 0.88);
    cursor: pointer;
    font: inherit;
}

.rtp-day:hover {
    background: #f5f5f5;
}

.rtp-day.muted {
    color: rgba(0, 0, 0, 0.25);
}

.rtp-day.today {
    box-shadow: inset 0 0 0 1px #1677ff;
}

.rtp-day.range-edge {
    background: #e6f4ff;
}

.rtp-day.selected {
    background: #1677ff;
    color: #fff;
}

.rtp-time-panel {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    height: 312px;
}

.rtp-wheel {
    overflow-y: auto;
    border-right: 1px solid #f0f0f0;
    padding: 4px 0;
    scrollbar-width: thin;
}

.rtp-wheel:last-child {
    border-right: 0;
}

.rtp-time {
    display: block;
    width: 100%;
    height: 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.88);
    cursor: pointer;
    font: inherit;
    text-align: center;
}

.rtp-time:hover {
    background: #f5f5f5;
}

.rtp-time.selected {
    background: #e6f4ff;
    color: #1677ff;
    font-weight: 600;
}

.rtp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
}

.rtp-link,
.rtp-ok {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.rtp-link {
    color: #1677ff;
}

.rtp-ok {
    height: 28px;
    padding: 0 12px;
    border-radius: 6px;
    background: #1677ff;
    color: #fff;
}

.rtp-ok:hover {
    background: #4096ff;
}

.hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.35);
}

.btn-primary:not(:disabled):hover {
    background: var(--success-dark);
}

.btn-secondary {
    background: #ecf0f1;
    color: var(--text);
}

.btn-secondary:hover {
    background: #dfe6e9;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:not(:disabled):hover {
    background: var(--primary-light);
}

.status-bar {
    margin-top: 14px;
    min-height: 24px;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.status-bar.error {
    color: var(--danger);
}

.status-bar.success {
    color: var(--success);
}

.status-bar.warning {
    color: var(--warning);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.result-header .card-title {
    border: none;
    background: transparent;
}

.result-stats {
    padding: 0 20px 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.progress-wrap {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border);
}

.progress-wrap.hidden {
    display: none;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8125rem;
    color: var(--primary-dark);
    white-space: nowrap;
}

.result-content {
    padding: 12px 16px 16px;
    max-height: 620px;
    overflow-y: auto;
}

.result-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.result-toolbar.hidden {
    display: none;
}

.toolbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.toolbar-search input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
}

.toolbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
}

.tool-btn:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: rgba(52, 152, 219, 0.4);
}

.tool-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.tool-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.empty-state.compact {
    padding: 24px 16px;
}

.room-groups,
.room-table-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room-group {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.room-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #eef6fb, #f8fbfd);
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
}

.room-group.open .room-group-header {
    border-bottom-color: var(--border);
}

.room-group-header:hover {
    background: #e8f4fc;
}

.room-group-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--primary-dark);
}

.room-source-tag {
    display: inline-flex;
    align-items: center;
    max-width: 240px;
    margin-left: 8px;
    padding: 1px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.room-group-body {
    display: none;
    padding: 8px;
}

.room-group.open .room-group-body {
    display: block;
}

.part-group-header-nested {
    background: #f8f9fa;
    padding: 8px 12px;
}

.room-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.room-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, #eef6fb, #f8fbfd);
    border-bottom: 1px solid var(--border);
}

.room-section-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--primary-dark);
}

.table-summary {
    margin-top: 12px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.part-groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.part-group {
    margin-bottom: 0;
    border-radius: 8px;
}

.part-group-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.part-group-header {
    padding: 10px 14px;
}

.part-group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mini-tag {
    font-size: 0.6875rem;
    padding: 1px 7px;
    border-radius: 10px;
    background: #eef6fb;
    color: var(--primary-dark);
    border: 1px solid rgba(52, 152, 219, 0.2);
    white-space: nowrap;
}

.action-group {
    border-top: 1px solid var(--border);
}

.action-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 28px;
    cursor: pointer;
    font-size: 0.8125rem;
    background: #fff;
    transition: background 0.12s;
}

.action-group-header:hover {
    background: #f8fbfd;
}

.chevron-sm {
    font-size: 0.625rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.action-group.open .chevron-sm {
    transform: rotate(90deg);
}

.action-type {
    color: var(--text-muted);
}

.action-name {
    font-weight: 600;
}

.action-key {
    font-size: 0.6875rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: #e8f6f3;
    color: #1e8449;
}

.action-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.action-group-body {
    display: none;
    padding: 0 14px 10px 36px;
}

.action-group.open .action-group-body {
    display: block;
}

.op-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.op-table th,
.op-table td {
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.op-table th {
    color: var(--text-muted);
    font-weight: 600;
    background: #fafbfc;
}

.op-table tbody tr {
    cursor: pointer;
}

.op-table tbody tr:hover td {
    background: var(--primary-light);
}

.op-key {
    font-size: 0.75rem;
    padding: 1px 7px;
    border-radius: 4px;
    background: #e8f6f3;
    color: #1e8449;
    white-space: nowrap;
}

.op-value {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.8125rem;
}

.op-flat-table .op-value {
    max-width: 140px;
}

.op-table .op-time,
.op-flat-table .op-time {
    white-space: nowrap;
    color: var(--text-muted);
}

.op-more-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

.load-more-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fafbfc;
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
}

.load-more-btn:hover {
    background: var(--primary-light);
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.op-flat-table td,
.op-flat-table th {
    padding: 7px 10px;
}

.part-group-header .chevron {
    font-size: 0.625rem;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.summary-banner {
    background: linear-gradient(135deg, var(--primary-light), #fff);
    border: 1px solid rgba(52, 152, 219, 0.25);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.summary-item {
    text-align: center;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.detail-parse-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(52, 152, 219, 0.25);
    border-radius: 8px;
    background: #f8fbfd;
}

.detail-parse-title {
    font-weight: 700;
    color: var(--text);
}

.detail-parse-desc {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.alert-box {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.alert-box.warning {
    background: #fef9e7;
    border: 1px solid #f9e79f;
    color: #9a7d0a;
}

.alert-box.error {
    background: #fdedec;
    border: 1px solid #f5b7b1;
    color: #922b21;
}

.part-group {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.part-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.part-group-header:hover {
    background: #eef2f5;
}

.part-group-title {
    font-weight: 600;
    font-size: 0.9375rem;
}

.part-group-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.part-group-body {
    display: none;
    padding: 0 10px 10px;
}

.part-group.open .part-group-body {
    display: block;
}

.op-list-table {
    margin-top: 4px;
}

.part-group-header .chevron {
    transition: transform 0.2s;
    color: var(--text-muted);
}

.part-group.open .chevron {
    transform: rotate(90deg);
}

.op-list {
    list-style: none;
}

.op-item {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: background 0.12s;
}

.op-item:hover {
    background: var(--primary-light);
}

.op-item-main {
    flex: 1;
    min-width: 0;
}

.op-item-title {
    font-size: 0.875rem;
    font-weight: 500;
}

.op-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.op-item-badge {
    font-size: 0.6875rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e8f6f3;
    color: #1e8449;
    white-space: nowrap;
}

.record-table-wrap {
    overflow-x: auto;
}

.record-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.record-table th,
.record-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.record-table th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.record-table tr:hover td {
    background: var(--primary-light);
}

.record-table .link-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.json-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.json-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.record-table tr {
    cursor: pointer;
}

.app-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 62, 80, 0.45);
    backdrop-filter: blur(2px);
}

.modal-panel {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: min(640px, 100%);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
}

.modal-close:hover {
    background: #f0f0f0;
    color: var(--text);
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    font-size: 0.875rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
}

.detail-value {
    word-break: break-all;
}

.detail-value pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.8125rem;
    white-space: pre-wrap;
}

.filter-user-action.hidden {
    display: none;
}

@media (max-width: 768px) {
    .header-inner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .header-session {
        width: 100%;
        margin-left: 64px;
    }

    .header-session span {
        max-width: none;
        flex: 1;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.span-2 {
        grid-column: span 1;
    }

    .app-main {
        padding: 16px;
    }

    .result-content {
        max-height: 420px;
    }

    .detail-parse-card {
        align-items: stretch;
        flex-direction: column;
    }

    .uid-row,
    .recent-query-row {
        align-items: stretch;
        flex-direction: column;
    }

    .checkbox-option {
        min-height: auto;
    }

    .date-range-control {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .range-arrow,
    .range-icon {
        display: none;
    }

    .rtp-main {
        grid-template-columns: 1fr;
    }

    .rtp-date {
        border-right: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .rtp-time-panel {
        grid-template-columns: repeat(3, 1fr);
        height: 168px;
    }
}
