.seop-portal,
.seop-portal > aside,
.seop-portal > main {
    box-sizing: border-box;
    max-width: 100%;
}

.seop-portal-stats > a {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 19px;
    border: 1px solid #dde5ef;
    border-radius: 14px;
    background: #fff;
    color: #06111f;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.seop-portal-stats > a:hover {
    transform: translateY(-2px);
    border-color: #ffb083;
    box-shadow: 0 14px 32px rgba(15,23,42,.09);
}

.seop-portal-stats > a strong,
.seop-portal-stats > a span { display: block; }
.seop-portal-stats > a strong { font-size: 27px; }
.seop-portal-stats > a span { color: #68778d; }
.seop-portal-stats > a em { display: block; margin-top: 10px; color: #f05a24; font-size: 12px; font-style: normal; font-weight: 800; }

.seop-enquiry-row { color: #172033; text-decoration: none; }
.seop-enquiry-conversation { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.seop-note-thread { display: grid; gap: 12px; margin: 16px 0 20px; }
.seop-note-thread article { max-width: 82%; padding: 14px 16px; border-radius: 15px; background: #f1f5f9; }
.seop-note-thread article.admin { border: 1px solid #fed7aa; background: #fff7ed; }
.seop-note-thread article.customer { margin-left: auto; border: 1px solid #bfdbfe; background: #eff6ff; }
.seop-note-thread article > div { display: flex; justify-content: space-between; gap: 15px; }
.seop-note-thread time { color: #64748b; font-size: 11px; }
.seop-note-thread p { margin: 8px 0 0; line-height: 1.6; }
.seop-note-form { display: grid; gap: 12px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; }
.seop-note-form label { display: grid; gap: 8px; font-weight: 800; }
.seop-note-form textarea { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; }
.seop-enquiry-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.seop-enquiry-summary > div { padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.seop-enquiry-summary p { margin: 6px 0 0; }

@media (max-width: 980px) {
    html, body, .seop-site-page { max-width: 100%; overflow-x: hidden; }
    .seop-portal { display: block !important; width: 100% !important; min-width: 0 !important; }
    .seop-portal > aside { width: 100% !important; min-width: 0 !important; padding: 18px 16px !important; overflow: hidden; }
    .seop-portal-logo { margin-bottom: 12px !important; }
    .seop-portal > aside nav { display: flex !important; width: 100%; max-width: 100%; gap: 7px; padding: 3px 0 9px; overflow-x: auto !important; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
    .seop-portal > aside nav a { flex: 0 0 auto; padding: 10px 12px !important; font-size: 13px !important; white-space: nowrap; }
    .seop-contact { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; width: 100%; gap: 7px; margin-top: 10px !important; }
    .seop-contact a { display: flex; min-width: 0; align-items: center; justify-content: center; padding: 9px 6px !important; overflow-wrap: anywhere; font-size: 11px !important; line-height: 1.3; }
    .seop-logout { margin-top: 6px !important; padding: 7px !important; font-size: 12px !important; }
    .seop-portal > main { width: 100% !important; min-width: 0 !important; padding: 22px 16px !important; overflow: hidden; }
    .seop-page-head h1 { overflow-wrap: anywhere; }
    .seop-page-head p { max-width: 100%; overflow-wrap: anywhere; }
    .seop-enquiry-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
    .seop-brand-logo { width: 82px !important; height: 54px !important; }
    .seop-portal-logo small { font-size: 8px !important; }
    .seop-contact { grid-template-columns: 1fr !important; }
    .seop-contact a { min-height: 38px; font-size: 12px !important; }
    .seop-portal > main { padding: 18px 12px !important; }
    .seop-page-head h1 { font-size: 27px !important; line-height: 1.15; }
    .seop-portal-stats { grid-template-columns: 1fr 1fr !important; gap: 9px !important; }
    .seop-portal-stats > a { min-width: 0; padding: 14px; }
    .seop-portal-stats > a strong { font-size: 23px; }
    .seop-card { max-width: 100%; padding: 16px !important; }
    .seop-enquiry-section { max-width: 100%; }
    .seop-choice-grid { grid-template-columns: 1fr !important; }
    .seop-note-thread article { max-width: 94%; }
    .seop-note-thread article > div { align-items: flex-start; flex-direction: column; gap: 3px; }
    .seop-enquiry-summary { grid-template-columns: 1fr; }
}
