:root {
    --app-bg: #f5f7fb;
    --panel-bg: #ffffff;
    --panel-border: #dce3ee;
    --text-strong: #172033;
    --soft-shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
}

body {
    min-height: 100vh;
    background: var(--app-bg);
    color: var(--text-strong);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-container {
    max-width: 1100px;
}

.search-panel,
.summary-panel,
.record-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    box-shadow: var(--soft-shadow);
}

.search-panel {
    padding: 1.35rem;
}

.title-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #0d6efd;
    background: #eaf2ff;
    font-size: 1.4rem;
}

.lookup-form .input-group-text,
.lookup-form .form-control,
.lookup-form .form-select {
    border-color: #cfd8e6;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-chip {
    border-radius: 999px;
}

.summary-panel {
    padding: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.summary-item {
    padding: 0.85rem;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    background: #fafbfe;
}

.summary-label {
    display: block;
    color: #6b7280;
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}

.summary-value {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.empty-types {
    color: #6b7280;
    line-height: 1.6;
}

.record-card {
    overflow: hidden;
}

.record-card + .record-card {
    margin-top: 1rem;
}

.record-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e5eaf2;
}

.record-type {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
}

.table {
    margin-bottom: 0;
}

.table th {
    white-space: nowrap;
    color: #4b5563;
    font-size: 0.85rem;
}

.table td {
    vertical-align: middle;
}

.value-cell {
    min-width: 220px;
    overflow-wrap: anywhere;
}

.copy-btn {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-soft {
    background: #eef4ff;
    color: #0b5ed7;
}

@media (min-width: 768px) {
    .search-panel {
        padding: 2rem;
    }

    .summary-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .record-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

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