/* Trang Writing Xpert (/cham-writing-ielts-task-2) — dùng cùng css/pages/mot-danh-muc.css */
.wx-page p{margin:0}
.wx-breadcrumb{margin-top:15px}
.wx-breadcrumb a{color:inherit;text-decoration:none}
.wx-breadcrumb a:hover{color:var(--LG,#d72229)}

/* Hero */
.wx-hero{margin-top:24px;display:flex;align-items:center;gap:32px;padding:36px 48px;border-radius:24px;background:linear-gradient(135deg,#fff4e6 0%,#fde3c4 55%,#fbc98b 100%);box-shadow:0 4px 20px rgba(215,34,41,.12)}
.wx-hero__text{flex:1;min-width:0}
.wx-hero__title{margin:0;line-height:0}
.wx-hero__title img{width:100%;max-width:560px;height:auto}
.wx-hero__slogan{margin-top:18px!important;font-size:34px;line-height:1.25;color:var(--LG,#d72229)}
.wx-hero__desc{margin-top:10px!important;font-size:18px;line-height:1.5;font-style:italic;color:#222}
.wx-hero__benefits{list-style:none;margin:18px 0 0;padding:0;display:grid;gap:10px}
.wx-hero__benefits li{position:relative;padding-left:32px;font-size:17px;line-height:1.45;color:#111}
.wx-hero__benefits li::before{content:"";position:absolute;left:0;top:2px;width:22px;height:22px;border-radius:50%;background:var(--LG,#d72229) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat}
.wx-hero__cta{margin-top:26px;height:50px;padding:0 36px;background:var(--LG,#d72229)}
.wx-hero__cta:hover{color:#fff;background:#b01b21}
.wx-hero__img{width:420px;max-width:42%;height:auto;flex-shrink:0}

/* Cột chính */
.wx-main{flex:1;min-width:0;max-width:calc(100% - 380px)}
.wx-tabs{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:20px}
.wx-tab{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:0 20px;border:1px solid var(--LG,#d72229);border-radius:23px;background:#fff;color:#111;font-size:16px;font-family:inherit;text-decoration:none;cursor:pointer;transition:background-color .2s,color .2s}
.wx-tab:hover{background:rgba(215,34,41,.08);color:#111}
.wx-tab.is-active{background:var(--LG,#d72229);color:#fff}
.wx-tab img{flex-shrink:0}

.wx-card{background:#fff;border-radius:20px;box-shadow:0 0 10px rgba(0,0,0,.18);padding:28px 30px}
.wx-card__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.wx-card__title{margin:0;color:var(--LG,#d72229)}
.wx-quota{padding:6px 14px;border-radius:16px;background:#fdecec;color:var(--LG,#d72229)}
.wx-login-note{margin-top:14px!important;padding:12px 16px;border-radius:12px;background:#fff7e6;border:1px dashed #f5a623;color:#222}
.wx-link-btn{padding:0;border:0;background:none;color:var(--LG,#d72229);text-decoration:underline;font:inherit;cursor:pointer}
.wx-alert{margin-top:14px;padding:12px 16px;border-radius:12px;background:#fdecec;color:#a4161a}
.wx-alert ul{margin:0;padding-left:18px}
.wx-field{margin-top:22px}
.wx-field__row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.wx-field__label{display:block;margin-bottom:8px;color:#111}
.wx-word-count{color:#6c757d}
.wx-textarea{display:block;width:100%;padding:14px 16px;border:1px solid #d0d0d0;border-radius:14px;font:inherit;font-size:16px;line-height:1.6;color:#111;background:#fafafa;resize:vertical;transition:border-color .2s,box-shadow .2s,background-color .2s}
.wx-textarea:focus{outline:0;border-color:var(--LG,#d72229);background:#fff;box-shadow:0 0 0 3px rgba(215,34,41,.15)}
.wx-warning{display:block;min-height:20px;margin-top:6px;color:#dc3545;font-style:italic}
.wx-submit{margin-top:14px;text-align:center}
.wx-btn-grade{min-width:280px;height:52px;padding:0 32px;background:var(--LG,#d72229);border:4px solid #ffbb13;font-family:inherit}
.wx-btn-grade:hover{background:#b01b21}
.wx-btn-grade:disabled{opacity:.75;cursor:wait;transform:none}

.wx-steps{margin-top:36px}
.wx-steps__label{cursor:default}
.wx-steps__label span{color:var(--LG,#d72229)}
.wx-steps__label:hover{background:none}
.wx-steps__label:hover span{color:var(--LG,#d72229)!important}
.wx-steps__list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:20px;counter-reset:wx-step}
.wx-steps__list li{counter-increment:wx-step;display:flex;flex-direction:column;gap:8px;padding:22px 20px;border-radius:16px;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1)}
.wx-steps__list li::before{content:counter(wx-step);display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:var(--LG,#d72229);color:#fff;font-weight:700;font-size:18px}
.wx-steps__list span{color:#333;line-height:1.5}

/* Cột phải */
.wx-aside{width:350px;flex-shrink:0;display:flex;flex-direction:column;gap:24px}
.wx-aside .dm-sidebar{position:static;max-height:none;width:100%}
.wx-hello{padding:20px;border-radius:20px;background:#fff;box-shadow:0 0 10px rgba(0,0,0,.18)}
.wx-hello p+p{margin-top:8px}
.wx-hello__link{display:inline-block;margin-top:12px;color:var(--LG,#d72229);text-decoration:none}
.wx-hello__link:hover{text-decoration:underline;color:var(--LG,#d72229)}
.wx-banner{display:block;border-radius:20px;overflow:hidden;box-shadow:0 0 10px rgba(0,0,0,.18)}
.wx-banner img{display:block;width:100%;height:auto;transition:transform .3s}
.wx-banner:hover img{transform:scale(1.02)}

/* Lịch sử chấm bài (history.blade.php) */
.wx-history-page{margin-top:30px}
.wx-history{list-style:none;margin:20px 0 0;padding:0;display:grid;gap:12px}
.wx-history__item{display:flex;align-items:center;gap:16px;padding:16px 18px;border:1px solid #ece4db;border-radius:16px;background:#fff;transition:border-color .2s,box-shadow .2s}
.wx-history__item:hover{border-color:rgba(215,34,41,.45);box-shadow:0 4px 14px rgba(215,34,41,.08)}
.wx-history__main{flex:1;min-width:0;display:flex;align-items:flex-start;gap:14px;color:#111;text-decoration:none}
.wx-history__main:hover{color:#111}
.wx-history__num{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#fdecec;color:var(--LG,#d72229);font-size:15px}
.wx-history__body{min-width:0;display:flex;flex-direction:column;gap:6px}
.wx-history__q{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45}
.wx-history__main:hover .wx-history__q{color:var(--LG,#d72229)}
.wx-history__meta{color:#6b645e}
.wx-history__side{flex-shrink:0;display:flex;align-items:center;gap:14px}
.wx-history__actions{display:flex;flex-direction:column;gap:6px}
.wx-history__btn{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 16px;border-radius:999px;background:var(--LG,#d72229);border:1px solid var(--LG,#d72229);color:#fff;font-size:14px;white-space:nowrap;text-decoration:none}
.wx-history__btn:hover{background:#b01b21;border-color:#b01b21;color:#fff}
.wx-history__btn--ghost{background:#fff;color:#111;border-color:#ddd3c8}
.wx-history__btn--ghost:hover{background:#fff4f1;border-color:var(--LG,#d72229);color:var(--LG,#d72229)}
.wx-score{display:flex;flex-direction:column;align-items:center;justify-content:center;width:72px;height:64px;border-radius:14px;line-height:1.1}
.wx-score small{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.8}
.wx-score b{font-size:24px;font-weight:800}
.wx-score--good{background:#e6f4ee;color:#0b6b4f}
.wx-score--mid{background:#fff1dc;color:#9a4a0b}
.wx-score--bad{background:#fdecec;color:#a3121f}
.wx-state{padding:5px 12px;border-radius:999px;font-size:13px;font-weight:700;white-space:nowrap}
.wx-state--pending{background:#f3eee8;color:#44403c}
.wx-state--failed{background:#fdecec;color:#a3121f}
.wx-history-empty{margin-top:20px;padding:36px 20px;border:1px dashed #ddd3c8;border-radius:16px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.wx-history-empty .wx-hero__cta{margin-top:12px;display:inline-flex;align-items:center}
.wx-history-page .dm-pagination{margin-top:24px}

@media (max-width:1024px){
    .wx-hero{padding:28px 24px;gap:20px}
    .wx-hero__slogan{font-size:26px}
    .wx-main{max-width:100%;width:100%}
    .wx-aside{width:100%;display:grid;grid-template-columns:1fr 1fr;align-items:start}
    .wx-aside .dm-sidebar{grid-column:1/-1}
}
@media (max-width:768px){
    .wx-hero{padding:22px 18px}
    .wx-hero__img{display:none}
    .wx-hero__slogan{font-size:22px}
    .wx-hero__desc{font-size:16px}
    .wx-hero__benefits li{font-size:15px}
    .wx-hero__cta{width:100%}
    .wx-card{padding:20px 16px}
    .wx-card__title{font-size:20px!important}
    .wx-tabs{flex-wrap:nowrap;overflow-x:auto;margin:0 -15px 16px;padding:2px 15px;scrollbar-width:none}
    .wx-tabs::-webkit-scrollbar{display:none}
    .wx-tab{flex-shrink:0;font-size:14px;min-height:40px;padding:0 14px}
    .wx-btn-grade{width:100%;min-width:0}
    .wx-steps__list{grid-template-columns:1fr}
    .wx-aside{grid-template-columns:1fr}
    .wx-banner{max-width:390px;margin:0 auto}
    .wx-history-page{margin-top:20px}
    .wx-history__item{flex-direction:column;align-items:stretch;gap:12px;padding:14px}
    .wx-history__side{justify-content:space-between}
    .wx-history__actions{flex-direction:row}
    .wx-score{flex-direction:row;gap:8px;width:auto;height:auto;padding:6px 12px;border-radius:999px}
    .wx-score b{font-size:18px}
}
