/**
 * 📁 파일 위치: /volume1/web/gpt/assets/workbench.css
 * ✅ 덮어쓰기 지시: 전체 저장
 * - 영일전기철물 AI 업무 콘솔 UI 개선
 * - 현장/견적 답변 카드화
 * - 모바일 하단 입력 최적화
 */

:root {
    --wb-bg: #f5f7fb;
    --wb-card: #ffffff;
    --wb-line: #e4e8f2;
    --wb-soft: #f8fafc;
    --wb-text: #1e293b;
    --wb-muted: #64748b;
    --wb-primary: #6d5dfc;
    --wb-primary-dark: #4b36d8;
    --wb-green: #10b981;
    --wb-amber: #f59e0b;
    --wb-red: #ef4444;
    --wb-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.app-body {
    max-width: 1040px;
    margin: 0 auto;
    padding: 18px 18px 28px;
}

.answer-wrapper {
    border-radius: 18px;
}

.answer-box {
    min-height: 520px;
    border-radius: 18px !important;
    border: 1px solid var(--wb-line);
    background: var(--wb-card);
    box-shadow: var(--wb-shadow);
    color: var(--wb-text);
    line-height: 1.65;
    font-size: 15px;
    padding: 26px 28px !important;
    white-space: pre-wrap;
}

.answer-placeholder {
    height: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wb-muted);
    text-align: center;
}

.placeholder-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.placeholder-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--wb-text);
}

.placeholder-sub {
    margin-top: 8px;
    font-size: 14px;
}

.quick-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin: 16px 0 12px;
}

.quick-chips .chip {
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #cbd5ff;
    background: #fff;
    color: #3552c7;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.06);
}

.quick-chips .chip:hover {
    transform: translateY(-1px);
    background: #eef2ff;
}

.quick-chips .chip-primary {
    background: #4c1d95;
    color: #fff;
    border-color: #4c1d95;
}

.quick-chips .chip-diag {
    background: #272045;
    color: #fff;
    border-color: #272045;
}

.input-area {
    background: transparent;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 96px;
    gap: 12px;
    align-items: stretch;
}

#q {
    min-height: 72px;
    border-radius: 16px;
    border: 1px solid #d9def0;
    padding: 16px 18px;
    font-size: 16px;
    line-height: 1.45;
    background: #fff;
    color: var(--wb-text);
    resize: vertical;
    outline: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

#q:focus {
    border-color: var(--wb-primary);
    box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.12);
}

#askBtn {
    border-radius: 16px;
    background: linear-gradient(135deg, #6d5dfc, #5b55e8);
    color: #fff;
    font-weight: 900;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(91, 85, 232, 0.22);
}

#askBtn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.input-hint {
    margin-top: 7px;
    color: #94a3b8;
    font-size: 12px;
}

/* 업무 카드 */
.wb-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    white-space: normal;
}

.wb-card {
    border: 1px solid var(--wb-line);
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.wb-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.wb-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--wb-text);
}

.wb-subtitle {
    margin-top: 4px;
    color: var(--wb-muted);
    font-size: 13px;
}

.wb-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.wb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.wb-field {
    background: var(--wb-soft);
    border: 1px solid #edf1f7;
    border-radius: 14px;
    padding: 12px;
}

.wb-label {
    color: var(--wb-muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4px;
}

.wb-value {
    color: var(--wb-text);
    font-size: 15px;
    font-weight: 800;
}

.wb-money {
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.03em;
    color: #111827;
}

.wb-quote-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wb-quote-row {
    display: grid;
    grid-template-columns: 86px 1fr 140px 80px;
    gap: 10px;
    align-items: center;
    background: #fbfdff;
    border: 1px solid #edf1f7;
    border-radius: 14px;
    padding: 12px;
}

.wb-quote-id {
    font-weight: 900;
    color: #4f46e5;
}

.wb-quote-title {
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-quote-amount {
    text-align: right;
    font-weight: 900;
}

.wb-quote-status {
    text-align: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
    color: #475569;
}

.wb-success {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.wb-success .wb-badge {
    background: #dcfce7;
    color: #15803d;
}

.wb-raw {
    white-space: pre-wrap;
}

/* 모바일 */
@media (max-width: 720px) {
    .app-body {
        padding: 10px 10px 152px;
    }

    .answer-box {
        min-height: calc(100vh - 250px);
        border-radius: 16px !important;
        padding: 18px 16px !important;
        font-size: 14px;
    }

    .quick-chips {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin: 10px 0;
    }

    .quick-chips .chip {
        width: 100%;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }

    .quick-chips .chip:nth-child(n+5) {
        display: none;
    }

    .input-area {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        padding: 10px 10px 12px;
        background: rgba(245, 247, 251, 0.96);
        border-top: 1px solid var(--wb-line);
        backdrop-filter: blur(10px);
    }

    .input-row {
        grid-template-columns: 1fr 74px;
        gap: 8px;
    }

    #q {
        min-height: 58px;
        max-height: 110px;
        border-radius: 14px;
        padding: 12px;
        font-size: 15px;
    }

    #askBtn {
        border-radius: 14px;
        font-size: 14px;
    }

    .input-hint {
        display: none;
    }

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

    .wb-card {
        padding: 15px;
        border-radius: 16px;
    }

    .wb-card-head {
        flex-direction: column;
        gap: 8px;
    }

    .wb-money {
        font-size: 23px;
    }

    .wb-quote-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .wb-quote-amount,
    .wb-quote-status {
        text-align: left;
    }
}
