:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --border: #d9e0e8;
    --text: #1f2933;
    --muted: #6b7280;
    --blue: #2563eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.home-shell {
    width: min(1120px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 36px 0 48px;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-mark {
    width: 76px;
    height: 38px;
    object-fit: contain;
    flex: 0 0 auto;
}

.home-header h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: 0;
}

.home-header p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.home-stats {
    display: flex;
    gap: 12px;
}

.home-stats div {
    min-width: 110px;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.home-stats span {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.home-stats label {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.search-panel,
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.search-panel {
    padding: 18px;
    margin-bottom: 18px;
}

.search-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.search-panel label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.search-wrapper {
    position: relative;
}

#stock-search-input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 14px;
    font-size: 15px;
    background: #fff;
}

#stock-search-input:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#stock-search-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 10;
    display: none;
    max-height: 320px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.suggest-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eef2f6;
}

.suggest-item:last-child {
    border-bottom: 0;
}

.suggest-item:hover,
.suggest-item.active {
    background: #eff6ff;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.panel {
    min-height: 220px;
    padding: 16px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.panel-title h2 {
    margin: 0;
    font-size: 16px;
}

.panel-title span {
    color: var(--muted);
    font-size: 12px;
}

.stock-list {
    display: flex;
    flex-direction: column;
}

.muted-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 18px 0;
}

.stock-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #edf1f5;
}

.stock-row:last-child {
    border-bottom: 0;
}

.stock-row strong {
    margin-right: 10px;
    font-size: 13px;
}

.stock-row span {
    font-size: 14px;
}

.stock-row:hover strong,
.stock-row:hover span {
    color: var(--blue);
}

.stock-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .home-shell {
        width: min(100vw - 24px, 1120px);
        padding-top: 20px;
    }

    .home-header,
    .home-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .home-header {
        align-items: start;
    }

    .brand-mark {
        width: 64px;
        height: 32px;
    }

    .home-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
