/* 주문내역 v042 */
*{box-sizing:border-box}

body{
    margin:0;
    background:#f4f5f7;
    color:#111827;
    font-family:Arial,'Malgun Gothic',sans-serif;
}

.history-app{
    width:100%;
    max-width:520px;
    min-height:100vh;
    margin:0 auto;
    padding-bottom:88px;
    background:#fff;
}

.history-header{
    min-height:64px;
    display:grid;
    grid-template-columns:42px minmax(0,1fr) auto;
    align-items:center;
    gap:9px;
    padding:8px 12px;
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(14px);
    border-bottom:1px solid #e9edf2;
}

.history-header button{
    width:40px;
    height:40px;
    padding:0;
    border:0;
    border-radius:12px;
    background:#f7f8fa;
    color:#1f2937;
    font-size:32px;
    line-height:1;
}

.history-header > div span{
    display:block;
    margin-bottom:1px;
    color:#ff5a00;
    font-size:11px;
    font-weight:900;
}

.history-header h1{
    margin:0;
    font-size:19px;
    line-height:1.1;
    letter-spacing:-.5px;
}

.history-login-badge{
    min-height:30px;
    padding:0 9px;
    display:flex;
    align-items:center;
    border-radius:999px;
    background:#ecfdf5;
    color:#047857;
    font-size:10px;
    font-weight:900;
}

.history-body{
    padding:10px 10px 26px;
}

.history-intro{
    padding:13px 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border:1px solid #f3e3d8;
    border-radius:16px;
    background:
        radial-gradient(circle at 95% 0,rgba(255,122,26,.14),transparent 42%),
        linear-gradient(135deg,#fff 0%,#fff8f2 100%);
    box-shadow:0 7px 18px rgba(15,23,42,.045);
}

.history-intro h2{
    margin:0 0 3px;
    font-size:16px;
    letter-spacing:-.4px;
}

.history-intro p{
    margin:0;
    color:#6b7280;
    font-size:11px;
    line-height:1.45;
}

.history-intro > span{
    width:44px;
    height:44px;
    flex:0 0 44px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    background:#fff2e9;
    font-size:20px;
}

.history-lookup-form{
    margin-top:9px;
    padding:12px;
    border:1px solid #e8ecf1;
    border-radius:15px;
    background:#fff;
    box-shadow:0 5px 16px rgba(15,23,42,.045);
}

.history-lookup-form label{
    display:block;
    margin-bottom:6px;
    color:#374151;
    font-size:12px;
    font-weight:850;
}

.history-lookup-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) 74px;
    gap:7px;
}

.history-lookup-row input{
    width:100%;
    min-width:0;
    padding:11px;
    border:1px solid #dfe3e8;
    border-radius:10px;
    font-size:14px;
    outline:none;
}

.history-lookup-row input:focus{
    border-color:#ff9b65;
    box-shadow:0 0 0 3px rgba(255,90,0,.08);
}

.history-lookup-row button{
    border:0;
    border-radius:10px;
    background:#111827;
    color:#fff;
    font-size:12px;
    font-weight:900;
}

.history-lookup-form p{
    margin:6px 0 0;
    color:#8a93a1;
    font-size:10px;
}

.history-result-head{
    min-height:48px;
    margin-top:8px;
    padding:7px 2px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.history-result-head > div{
    display:flex;
    align-items:center;
    gap:6px;
}

.history-result-head strong{
    font-size:15px;
}

.history-result-head span{
    color:#ff5a00;
    font-size:12px;
    font-weight:900;
}

.history-result-head small{
    color:#8a93a1;
    font-size:10px;
}

.history-list{
    display:grid;
    gap:8px;
}

.history-card{
    padding:12px;
    border:1px solid #e7ebf0;
    border-radius:16px;
    background:#fff;
    box-shadow:0 5px 16px rgba(15,23,42,.05);
}

.history-card-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}

.history-card-top > div{
    min-width:0;
}

.history-date{
    display:block;
    margin-bottom:3px;
    color:#8a93a1;
    font-size:10px;
}

.history-card-top strong{
    display:block;
    font-size:15px;
    line-height:1.25;
    letter-spacing:-.35px;
}

.history-status{
    flex:0 0 auto;
    min-height:27px;
    padding:0 8px;
    display:flex;
    align-items:center;
    border-radius:999px;
    background:#f3f4f6;
    color:#4b5563;
    font-size:10px;
    font-weight:900;
}

.status-pending{
    background:#fff7ed;
    color:#c2410c;
}

.status-accepted,
.status-preparing{
    background:#eff6ff;
    color:#1d4ed8;
}

.status-ready{
    background:#ecfdf5;
    color:#047857;
}

.status-completed{
    background:#f3f4f6;
    color:#374151;
}

.status-cancelled,
.status-noshow{
    background:#fef2f2;
    color:#b91c1c;
}

.history-order-no{
    margin-top:7px;
    padding:7px 8px;
    border-radius:9px;
    background:#f8f9fb;
    color:#7b8492;
    font-size:10px;
}

.history-order-no b{
    margin-left:4px;
    color:#374151;
    font-size:11px;
}

.history-summary-grid{
    margin-top:8px;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
}

.history-summary-grid > div{
    padding:8px;
    border-radius:9px;
    background:#fbfcfd;
}

.history-summary-grid span{
    display:block;
    margin-bottom:3px;
    color:#8a93a1;
    font-size:9px;
}

.history-summary-grid strong{
    display:block;
    color:#374151;
    font-size:11px;
}

.history-items{
    margin-top:8px;
    border-top:1px solid #edf0f3;
}

.history-items summary{
    padding:9px 0 2px;
    color:#ff5a00;
    font-size:11px;
    font-weight:900;
    cursor:pointer;
}

.history-items-body{
    padding-top:5px;
}

.history-items-body > div{
    padding:7px 0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    border-bottom:1px solid #f0f2f5;
    font-size:11px;
}

.history-items-body > div:last-child{
    border-bottom:0;
}

.history-items-body span{
    color:#4b5563;
}

.history-empty{
    padding:42px 18px;
    border:1px dashed #d8dde5;
    border-radius:17px;
    background:#fafbfc;
    text-align:center;
}

.history-empty > span{
    display:block;
    margin-bottom:9px;
    font-size:32px;
}

.history-empty h3{
    margin:0 0 5px;
    font-size:17px;
}

.history-empty p{
    margin:0;
    color:#7b8492;
    font-size:12px;
    line-height:1.5;
}

.history-empty a{
    min-height:40px;
    margin-top:15px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#ff5a00;
    color:#fff;
    text-decoration:none;
    font-size:12px;
    font-weight:900;
}

.history-bottom-tab{
    max-width:520px!important;
}

@media(min-width:900px){
    body{
        background:#e7e9ed;
    }

    .history-app{
        max-width:1180px;
        min-height:calc(100vh - 60px);
        margin:30px auto;
        padding-bottom:112px;
        overflow:hidden;
        border-radius:26px;
        box-shadow:0 18px 55px rgba(15,23,42,.11);
    }

    .history-header{
        min-height:74px;
        grid-template-columns:48px minmax(0,1fr) auto;
        padding:10px 22px;
    }

    .history-header h1{
        font-size:23px;
    }

    .history-body{
        padding:16px 20px 36px;
    }

    .history-intro{
        padding:18px 20px;
        border-radius:20px;
    }

    .history-intro h2{
        font-size:20px;
    }

    .history-intro p{
        font-size:13px;
    }

    .history-intro > span{
        width:54px;
        height:54px;
        flex-basis:54px;
        font-size:25px;
    }

    .history-lookup-form{
        max-width:620px;
        padding:16px;
        border-radius:18px;
    }

    .history-lookup-form label{
        font-size:13px;
    }

    .history-list{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:12px;
    }

    .history-card{
        padding:16px;
        border-radius:18px;
    }

    .history-card-top strong{
        font-size:17px;
    }

    .history-summary-grid strong{
        font-size:13px;
    }

    .history-bottom-tab{
        max-width:1180px!important;
        bottom:30px!important;
        border-radius:0 0 26px 26px!important;
        padding-left:160px!important;
        padding-right:160px!important;
    }
}




/* v043 비회원 자동조회 안내 */
.history-cookie-notice{
    margin-top:9px;
    padding:10px 11px;
    display:flex;
    align-items:flex-start;
    gap:8px;
    border:1px solid #d1fae5;
    border-radius:12px;
    background:#f0fdf4;
}

.history-cookie-notice > span{
    color:#059669;
    font-weight:950;
}

.history-cookie-notice p{
    margin:0;
    color:#4b6359;
    font-size:11px;
    line-height:1.5;
}

.history-cookie-notice strong{
    color:#047857;
}

/* v043 주문내역 하단탭 강제 복구 */
.history-bottom-tab{
    position:fixed!important;
    left:50%!important;
    bottom:0!important;
    transform:translateX(-50%)!important;
    width:100%!important;
    max-width:520px!important;
    height:76px!important;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;
    margin:0!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
    background:rgba(255,255,255,.98)!important;
    border-top:1px solid #e5e8ee!important;
    box-shadow:0 -12px 32px rgba(17,24,39,.16)!important;
    z-index:9998!important;
}

.history-bottom-tab a,
.history-bottom-tab button{
    width:100%!important;
    min-width:0!important;
    height:58px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:16px!important;
    background:#fff!important;
    color:#6b7280!important;
    text-decoration:none!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:2px!important;
    font-family:inherit!important;
    font-size:12px!important;
    font-weight:900!important;
    line-height:1.1!important;
    overflow:hidden!important;
}

.history-bottom-tab .tab-icon{
    display:block!important;
    font-size:23px!important;
    line-height:1!important;
    margin:0 0 1px!important;
}

.history-bottom-tab .active{
    background:linear-gradient(180deg,#fff2e9,#fff7f2)!important;
    color:#ff5a00!important;
    border:1px solid #ffd8c5!important;
    box-shadow:0 5px 14px rgba(255,90,0,.12)!important;
}

@media(min-width:900px){
    .history-bottom-tab{
        width:100%!important;
        max-width:1180px!important;
        height:78px!important;
        bottom:30px!important;
        padding:6px 160px!important;
        border-radius:0 0 26px 26px!important;
    }

    .history-bottom-tab a,
    .history-bottom-tab button{
        height:60px!important;
        font-size:12px!important;
    }
}
