@charset "utf-8";

.prespec-page {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 72px;
    color: #172033;
}

.prespec-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.prespec-title h2 {
    margin: 0;
    font-size: 36px;
    line-height: 1.2;
}

.prespec-title p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 16px;
}

.prespec-cache-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.prespec-title .prespec-cache-info {
    margin: 0;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
}

.prespec-cache-info span {
    margin-left: 4px;
    color: #64748b;
    font-weight: 500;
}

.prespec-cache-info a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prespec-refresh-form { margin: 0; }

.prespec-refresh-form button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #2563eb;
    border-radius: 7px;
    color: #fff;
    background: #2563eb;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.prespec-refresh-form button:hover { background: #1d4ed8; }
.prespec-refresh-form button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.prespec-refresh-form button:disabled { opacity: 0.65; cursor: wait; }

.prespec-refresh-result {
    margin: -12px 0 24px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.prespec-refresh-result--success { border: 1px solid #a7d7bc; color: #167547; background: #ecfdf3; }
.prespec-refresh-result--error { border: 1px solid #f3b7b7; color: #b42318; background: #fff1f1; }

.prespec-chart-panel {
    margin-bottom: 24px;
    padding: 18px 24px;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

.prespec-chart-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 12px;
}

.prespec-chart-heading h3 {
    margin: 0;
    color: #101828;
    font-size: 22px;
}

.prespec-chart-heading p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
}

.prespec-chart-summary {
    text-align: right;
    white-space: nowrap;
}

.prespec-chart-summary strong,
.prespec-chart-summary span {
    display: block;
}

.prespec-chart-summary strong {
    width: 12ch;
    color: #1859b8;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    text-align: right;
}

.prespec-chart-summary span {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
}

.prespec-budget-chart-wrap {
    overflow-x: auto;
    padding: 2px 2px 8px;
}

.prespec-budget-chart {
    display: grid;
    grid-template-columns: repeat(10, minmax(72px, 1fr));
    gap: 12px 10px;
    min-width: 900px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prespec-budget-chart li {
    height: 116px;
}

.prespec-budget-chart li.is-chart-hidden { display: none; }

.prespec-chart-button {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.prespec-chart-button > strong {
    display: block;
    width: 100%;
    min-width: 0;
    margin-bottom: 3px;
    color: #1859b8;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    text-align: center;
    white-space: nowrap;
}

.prespec-chart-button:hover .prespec-chart-track,
.prespec-chart-button:focus .prespec-chart-track,
.prespec-budget-chart li.is-selected .prespec-chart-track {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

.prespec-chart-button:focus { outline: none; }
.prespec-budget-chart li.is-selected .prespec-chart-label { color: #1d4ed8; }

.prespec-chart-track {
    display: flex;
    width: min(38px, 72%);
    height: 64px;
    align-items: flex-end;
    border-radius: 8px 8px 4px 4px;
    background: #e8eef7;
    overflow: hidden;
}

.prespec-chart-track span {
    display: block;
    width: 100%;
    min-height: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, #38bdf8, #2563eb);
    transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.prespec-chart-label {
    display: block;
    width: 100%;
    height: 20px;
    margin-top: 3px;
    overflow: hidden;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prespec-budget-chart small {
    margin-top: 2px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.prespec-chart-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.prespec-chart-control {
    min-width: 190px;
    height: 36px;
    padding: 0 18px;
    border: 1px solid #93b4dd;
    border-radius: 9px;
    color: #1859b8;
    background: #eff6ff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.prespec-chart-control:hover { background: #dbeafe; }
.prespec-chart-control[hidden] { display: none; }

.prespec-chart-guide {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 10px 0 0;
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

.prespec-chart-guide button {
    max-width: 360px;
    padding: 5px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1d4ed8;
    background: #eff6ff;
    font: inherit;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.prespec-filter {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(260px, 1.4fr) minmax(170px, 0.9fr) auto;
    align-items: end;
    gap: 14px;
    padding: 22px;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #f8fafc;
}

.prespec-filter label span {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.prespec-filter select,
.prespec-filter input,
.prespec-filter button {
    width: 100%;
    height: 48px;
    border-radius: 9px;
    font: inherit;
}

.prespec-filter select,
.prespec-filter input {
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    color: #172033;
    background: #fff;
}

.prespec-filter button {
    min-width: 112px;
    padding: 0 24px;
    border: 0;
    color: #fff;
    background: #2563eb;
    font-weight: 800;
    cursor: pointer;
}

.prespec-alert,
.prespec-empty {
    margin-top: 24px;
    padding: 34px 24px;
    border-radius: 14px;
    text-align: center;
}

.prespec-alert {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fff7f7;
}

.prespec-alert p { margin: 8px 0 0; }

.prespec-results { margin-top: 32px; }

.prespec-result-content.is-restricted {
    position: relative;
    max-height: 560px;
    border-radius: 14px;
    overflow: hidden;
}

.prespec-result-content.is-restricted .prespec-table-wrap,
.prespec-result-content.is-restricted .prespec-pagination {
    pointer-events: none;
    user-select: none;
}

.prespec-member-blur {
    position: absolute;
    z-index: 2;
    top: 44%;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(248, 250, 252, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.prespec-member-gate {
    position: absolute;
    z-index: 3;
    top: 64%;
    left: 50%;
    width: min(520px, calc(100% - 32px));
    padding: 24px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    text-align: center;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
    transform: translate(-50%, -50%);
}

.prespec-member-gate strong {
    display: block;
    color: #172033;
    font-size: 18px;
}

.prespec-member-gate a {
    display: inline-flex;
    height: 42px;
    margin-top: 14px;
    padding: 0 18px;
    border-radius: 9px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #2563eb;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.prespec-member-gate a:hover { background: #1d4ed8; }

.prespec-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.prespec-result-head h3,
.prespec-result-head p { margin: 0; }
.prespec-result-head h3 { font-size: 22px; }
.prespec-result-head p { color: #64748b; }
.prespec-result-head strong { color: #2563eb; }

.prespec-empty {
    border: 1px dashed #cbd5e1;
    color: #64748b;
    background: #f8fafc;
}

.prespec-table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
}

.prespec-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    table-layout: fixed;
}

.prespec-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.prespec-table th {
    padding: 15px 14px;
    border-bottom: 1px solid #dbe4f0;
    color: #334155;
    background: #f1f5f9;
    font-size: 14px;
    text-align: left;
}

.prespec-table th:nth-child(1) { width: 15%; }
.prespec-table th:nth-child(2) { width: 37%; }
.prespec-table th:nth-child(3) { width: 14%; }
.prespec-table th:nth-child(4) { width: 20%; }
.prespec-table th:nth-child(5) { width: 14%; }

.prespec-table td {
    padding: 18px 14px;
    border-bottom: 1px solid #edf1f6;
    vertical-align: middle;
}

.prespec-table tbody tr:last-child td { border-bottom: 0; }
.prespec-table tbody tr:hover { background: #f8fbff; }

.prespec-number span,
.prespec-business strong,
.prespec-business span,
.prespec-dates span { display: block; }

.prespec-number span {
    color: #475569;
    font-size: 13px;
    word-break: break-all;
}

.prespec-number em {
    display: inline-block;
    margin-top: 7px;
    padding: 4px 7px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.prespec-business strong {
    margin-bottom: 8px;
    color: #172033;
    line-height: 1.45;
}

.prespec-business span,
.prespec-dates span {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.prespec-budget { font-weight: 700; }

.prespec-files a {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 6px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 700;
}

.prespec-pagination { margin-top: 28px; }

@media (max-width: 900px) {
    .prespec-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .prespec-page {
        width: min(100% - 28px, 1320px);
        padding-top: 28px;
    }

    .prespec-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .prespec-title h2 { font-size: 30px; }
    .prespec-chart-panel { padding: 18px; }
    .prespec-chart-heading { flex-direction: column; gap: 12px; }
    .prespec-chart-summary { text-align: left; }
    .prespec-budget-chart { min-width: 820px; }
    .prespec-chart-guide { align-items: flex-start; flex-direction: column; text-align: left; }
    .prespec-filter { grid-template-columns: 1fr; }
    .prespec-member-gate { padding: 20px 16px; }
    .prespec-member-gate strong { font-size: 16px; }
}
