* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #f4f5f7;
    color: #1d1f24;
}

.top-header {
    background: #111827;
    color: white;
    padding: 14px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f59e0b;
    color: #111827;
    font-weight: 700;
    font-size: 18px;
}

.logo-title {
    font-weight: 600;
    font-size: 17px;
}

.logo-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

.page {
    max-width: 1100px;
    margin: 20px auto 40px auto;
    padding: 0 14px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto;
    grid-gap: 16px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.search-panel {
    grid-column: 1 / 2;
}

.results-panel {
    grid-column: 2 / 3;
    max-height: 420px;
    overflow: auto;
}

.email-panel {
    grid-column: 1 / 3;
}

.section-title {
    margin: 0 0 10px 0;
    font-size: 17px;
    font-weight: 600;
}

.field-row {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label {
    font-size: 13px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
select,
textarea {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px 9px;
    font-size: 14px;
    width: 100%;
}

input[readonly] {
    background: #f9fafb;
    color: #4b5563;
}

textarea {
    resize: vertical;
    min-height: 180px;
    line-height: 1.4;
}

.primary-button,
.secondary-button {
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.primary-button {
    background: #2563eb;
    color: white;
}

.primary-button:disabled {
    opacity: 0.55;
    cursor: default;
}

.secondary-button {
    background: #e5e7eb;
    color: #111827;
}

.status-text {
    font-size: 12px;
    margin-top: 6px;
    color: #4b5563;
}

.status-text.error {
    color: #b91c1c;
}

.status-text.success {
    color: #15803d;
}

.results-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #f9fafb;
}

.result-item {
    background: white;
    border-radius: 6px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 6px;
    cursor: pointer;
}

.result-item:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.result-title {
    font-size: 14px;
    font-weight: 600;
}

.result-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.result-url {
    font-size: 12px;
    color: #2563eb;
    margin-top: 2px;
    word-break: break-all;
}

.muted {
    font-size: 13px;
    color: #9ca3af;
}

.hint-box {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    font-size: 12px;
    color: #92400e;
}

.page-footer {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding: 10px 0 18px 0;
}

@media (max-width: 900px) {
    .page {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }
    .search-panel,
    .results-panel,
    .email-panel {
        grid-column: 1 / 2;
    }
}
