/* ═══════════════════════════════════════════════════════════════════
   MTP Plugin Frontend — Indigo #1C1777 + Orange #EE7922
   Contains: Listing view (.mtp-tsp-*), Detail view (.mtp-tsd-*),
             Dashboard, Result, common components.
   ═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

/* ════════ LISTING PAGE (Testbook-style) — .mtp-tsp-* ═════════════ */

.mtp-tsp { font-family: 'Inter', -apple-system, sans-serif; color: #3A3D5C; }
.mtp-tsp-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.mtp-tsp-section        { padding: 56px 0; }
.mtp-tsp-section--tight { padding: 24px 0; }

@media (max-width: 768px) { .mtp-tsp-section { padding: 40px 0; } }

.mtp-tsp-section__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.mtp-tsp-section__head h2 {
    font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; color: #0F1235;
    margin: 0; letter-spacing: -0.01em; position: relative; padding-bottom: 6px;
}
.mtp-tsp-section__head h2::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 36px; height: 3px; border-radius: 2px; background: #EE7922;
}
.mtp-tsp-section__link { font-size: 13px; font-weight: 600; color: #1C1777; text-decoration: none; }
.mtp-tsp-section__link:hover { color: #EE7922; }

.mtp-tsp-empty {
    background: #fff; border: 1.5px dashed #E4E2F0; border-radius: 12px;
    padding: 36px; text-align: center; color: #6B6E89; font-size: 14px;
}

/* HERO */
.mtp-tsp-hero {
    background: linear-gradient(135deg, #EEEBFA 0%, #FFF4EB 100%);
    padding: 60px 0 70px; position: relative; overflow: hidden;
}
.mtp-tsp-hero::before {
    content: ''; position: absolute; top: -100px; right: -80px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(28,23,119,.14) 0%, transparent 70%);
    border-radius: 50%;
}
.mtp-tsp-hero__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.mtp-tsp-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: #0F1235; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.mtp-tsp-hero h1 span { color: #EE7922; position: relative; display: inline-block; }
.mtp-tsp-hero h1 span::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 8px; background: rgba(238,121,34,.20); border-radius: 4px; z-index: -1; }
.mtp-tsp-hero__sub { font-size: 16px; color: #3A3D5C; margin: 0 0 18px; max-width: 540px; }
.mtp-tsp-hero__count { font-size: 14px; color: #6B6E89; margin: 0 0 16px; }
.mtp-tsp-hero__count strong { color: #1C1777; font-weight: 700; }
.mtp-tsp-hero__search { display: flex; max-width: 500px; background: #fff; border-radius: 10px; padding: 5px; box-shadow: 0 4px 16px rgba(28,23,119,.10); align-items: center; border: 1px solid #E4E2F0; }
.mtp-tsp-hero__search-icon { padding: 0 6px 0 12px; color: #9CA0B8; }
.mtp-tsp-hero__search input { flex: 1; min-width: 0; padding: 11px 8px; border: none; background: transparent; font-size: 14px; font-family: inherit; color: #0F1235; outline: none; }
.mtp-tsp-hero__search input::placeholder { color: #9CA0B8; }
.mtp-tsp-hero__search button { background: #EE7922; color: #fff; border: none; padding: 10px 20px; border-radius: 7px; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s; font-family: inherit; }
.mtp-tsp-hero__search button:hover { background: #C25E15; }
.mtp-tsp-hero__visual { display: flex; justify-content: center; }
.mtp-tsp-hero__visual svg { width: 100%; max-width: 420px; height: auto; }

@media (max-width: 880px) {
    .mtp-tsp-hero__inner { grid-template-columns: 1fr; text-align: center; gap: 28px; }
    .mtp-tsp-hero__sub, .mtp-tsp-hero__search { margin-inline: auto; }
    .mtp-tsp-hero__visual { order: -1; }
    .mtp-tsp-hero__visual svg { max-width: 280px; }
}

/* CARDS (listing view) */
.mtp-tsp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }

.mtp-tsp-card {
    position: relative; background: linear-gradient(180deg, #FAFAFE 0%, #fff 100%);
    border: 1.5px solid #E4E2F0; border-radius: 14px; padding: 20px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex; flex-direction: column;
}
.mtp-tsp-card:hover { border-color: #1C1777; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(28,23,119,.12); }

.mtp-tsp-card__badge { position: absolute; top: 14px; right: 14px; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.mtp-tsp-card__badge--hot     { background: #FEE2E2; color: #B91C1C; }
.mtp-tsp-card__badge--new     { background: #DCFCE7; color: #15803D; }
.mtp-tsp-card__badge--popular { background: #FEE7D2; color: #C25E15; }
.mtp-tsp-card__badge--premium { background: #EEEBFA; color: #1C1777; }

.mtp-tsp-card__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; padding-right: 70px; }
.mtp-tsp-card__icon { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #1C1777, #EE7922); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; flex-shrink: 0; letter-spacing: -0.02em; }
.mtp-tsp-card__title { font-size: 15px; font-weight: 700; color: #0F1235; margin: 0 0 6px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mtp-tsp-card__meta { font-size: 12px; color: #B91C1C; font-weight: 600; }
.mtp-tsp-card__meta strong { color: #B91C1C; }
.mtp-tsp-card__meta-sep { margin: 0 6px; color: #CBD5E1; }
.mtp-tsp-card__meta-free { color: #15803D; }
.mtp-tsp-card__features { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; border-top: 1px dashed #E4E2F0; padding-top: 14px; }
.mtp-tsp-card__features li { font-size: 12.5px; color: #3A3D5C; padding: 4px 0; line-height: 1.4; }
.mtp-tsp-card__features li strong { color: #1C1777; }
.mtp-tsp-card__cta { display: block; text-align: center; padding: 11px; background: transparent; color: #1C1777; font-weight: 700; font-size: 13.5px; border: 1.5px solid #1C1777; border-radius: 8px; text-decoration: none; transition: all .15s; }
.mtp-tsp-card__cta:hover { background: #1C1777; color: #fff; }
.mtp-tsp-card.is-locked .mtp-tsp-card__cta { background: #EE7922; color: #fff; border-color: #EE7922; }
.mtp-tsp-card.is-locked .mtp-tsp-card__cta:hover { background: #C25E15; border-color: #C25E15; }

/* PROMO */
.mtp-tsp-promo { background: linear-gradient(135deg, #1C1777 0%, #2C2099 100%); color: #fff; border-radius: 16px; padding: 24px 32px; display: flex; align-items: center; gap: 22px; position: relative; overflow: hidden; }
.mtp-tsp-promo::before { content: ''; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; background: rgba(238,121,34,.18); border-radius: 50%; }
.mtp-tsp-promo__icon { font-size: 38px; flex-shrink: 0; background: rgba(255,255,255,.10); border-radius: 14px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.mtp-tsp-promo__text { flex: 1; position: relative; z-index: 1; }
.mtp-tsp-promo h3 { font-size: 18px; color: #fff; margin: 0 0 8px; font-weight: 800; }
.mtp-tsp-promo p { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.mtp-tsp-promo p span { font-size: 12.5px; color: rgba(255,255,255,.85); white-space: nowrap; }
.mtp-tsp-promo__cta { background: #EE7922; color: #fff; padding: 11px 22px; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; flex-shrink: 0; transition: background .15s, transform .15s; position: relative; z-index: 1; }
.mtp-tsp-promo__cta:hover { background: #C25E15; transform: translateY(-1px); color: #fff; }

@media (max-width: 768px) { .mtp-tsp-promo { flex-direction: column; text-align: center; padding: 22px; } .mtp-tsp-promo p { justify-content: center; } }

/* CATEGORIES SIDEBAR */
.mtp-tsp-cat-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
.mtp-tsp-cat-sidebar { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid #E4E2F0; border-radius: 12px; padding: 10px; align-self: start; position: sticky; top: 80px; max-height: 70vh; overflow-y: auto; }
.mtp-tsp-cat-btn { display: block; padding: 10px 14px; font-size: 13px; color: #3A3D5C; background: transparent; border: none; border-radius: 8px; cursor: pointer; text-align: left; text-decoration: none; transition: all .15s; font-family: inherit; }
.mtp-tsp-cat-btn:hover { background: #EEEBFA; color: #1C1777; }
.mtp-tsp-cat-btn.is-active { background: linear-gradient(90deg, #EEEBFA, transparent); color: #1C1777; font-weight: 700; border-left: 3px solid #EE7922; }
.mtp-tsp-cat-content { min-width: 0; }
.mtp-tsp-mini-search input { padding: 8px 14px; border: 1px solid #E4E2F0; border-radius: 20px; font-size: 13px; width: 240px; background: #fff; color: #0F1235; font-family: inherit; }
.mtp-tsp-mini-search input:focus { outline: none; border-color: #1C1777; box-shadow: 0 0 0 3px rgba(28,23,119,.10); }

@media (max-width: 880px) {
    .mtp-tsp-cat-wrap { grid-template-columns: 1fr; }
    .mtp-tsp-cat-sidebar { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; position: static; max-height: none; }
    .mtp-tsp-cat-btn { white-space: nowrap; flex-shrink: 0; }
    .mtp-tsp-cat-btn.is-active { border-left: none; border-bottom: 2px solid #EE7922; border-radius: 0; }
}

/* WHY US */
.mtp-tsp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mtp-tsp-feature { background: #fff; border: 1px solid #E4E2F0; border-radius: 14px; padding: 28px 24px; text-align: left; transition: transform .15s, box-shadow .15s; }
.mtp-tsp-feature:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(28,23,119,.10); }
.mtp-tsp-feature:nth-child(2) { background: linear-gradient(135deg, #FFF4EB 0%, #fff 60%); border-color: #FEE7D2; }
.mtp-tsp-feature:nth-child(2) .mtp-tsp-feature__icon { background: #EE7922; }
.mtp-tsp-feature:nth-child(3) .mtp-tsp-feature__icon { background: #7C3AED; }
.mtp-tsp-feature__icon { width: 54px; height: 54px; border-radius: 14px; background: #1C1777; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; }
.mtp-tsp-feature h4 { font-size: 16px; font-weight: 700; color: #0F1235; margin: 0 0 8px; }
.mtp-tsp-feature p { font-size: 13.5px; color: #6B6E89; margin: 0; line-height: 1.6; }

@media (max-width: 880px) { .mtp-tsp-features { grid-template-columns: 1fr; } }

/* QUOTES */
.mtp-tsp-quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mtp-tsp-quote { background: #fff; border: 1px solid #E4E2F0; border-radius: 14px; padding: 24px; position: relative; }
.mtp-tsp-quote::before { content: '"'; position: absolute; top: 6px; right: 18px; font-size: 72px; color: #EEEBFA; line-height: 1; font-family: Georgia, serif; pointer-events: none; }
.mtp-tsp-quote__head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.mtp-tsp-quote__avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #DDD9F5, #FEE7D2); color: #1C1777; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.mtp-tsp-quote__head strong { display: block; color: #0F1235; font-size: 14px; }
.mtp-tsp-quote__head small { color: #6B6E89; font-size: 12px; }
.mtp-tsp-quote p { font-size: 13.5px; color: #3A3D5C; line-height: 1.65; margin: 0; font-style: italic; }

@media (max-width: 768px) { .mtp-tsp-quotes { grid-template-columns: 1fr; } }

/* FAQ */
.mtp-tsp-faq { display: flex; flex-direction: column; gap: 8px; max-width: 860px; margin: 0 auto; }
.mtp-tsp-faq-item { background: #fff; border: 1px solid #E4E2F0; border-radius: 12px; overflow: hidden; transition: border-color .15s; }
.mtp-tsp-faq-item[open] { border-color: #1C1777; }
.mtp-tsp-faq-item summary { padding: 16px 22px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: #0F1235; list-style: none; position: relative; padding-right: 50px; }
.mtp-tsp-faq-item summary::-webkit-details-marker { display: none; }
.mtp-tsp-faq-item summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 22px; color: #1C1777; width: 26px; height: 26px; background: #EEEBFA; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform .2s, background .15s; font-weight: 400; }
.mtp-tsp-faq-item[open] summary::after { content: '−'; background: #EE7922; color: #fff; transform: translateY(-50%) rotate(180deg); }
.mtp-tsp-faq-item__body { padding: 0 22px 18px; font-size: 13.5px; color: #6B6E89; line-height: 1.7; }

/* STATS */
.mtp-tsp-stats { background: linear-gradient(135deg, #1C1777, #2C2099); padding: 36px 0; color: #fff; }
.mtp-tsp-stats__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.mtp-tsp-stats__val { font-size: 36px; font-weight: 800; color: #EE7922; letter-spacing: -0.02em; }
.mtp-tsp-stats__lbl { font-size: 12px; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

@media (max-width: 540px) { .mtp-tsp-stats__row { grid-template-columns: 1fr; gap: 18px; } .mtp-tsp-stats__val { font-size: 28px; } }

/* CTA */
.mtp-tsp-cta { background: linear-gradient(135deg, #0F1235 0%, #1E2046 100%); padding: 60px 20px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.mtp-tsp-cta::before { content: ''; position: absolute; top: 50%; left: 50%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(238,121,34,.10) 0%, transparent 60%); border-radius: 50%; transform: translate(-50%, -50%); }
.mtp-tsp-cta h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin: 0 0 8px; position: relative; }
.mtp-tsp-cta p { color: rgba(255,255,255,.75); font-size: 15px; margin: 0 0 22px; position: relative; }
.mtp-tsp-cta__btn { display: inline-block; background: #EE7922; color: #fff; padding: 14px 32px; border-radius: 10px; font-size: 15px; font-weight: 700; text-decoration: none; transition: transform .15s, background .15s; position: relative; }
.mtp-tsp-cta__btn:hover { background: #C25E15; color: #fff; transform: translateY(-1px); }


/* ════════ DETAIL PAGE (Testbook-style) — .mtp-tsd-* ══════════════ */

.mtp-tsd { font-family: 'Inter', -apple-system, sans-serif; color: #3A3D5C; }
.mtp-tsd-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.mtp-tsd-hero {
    background: linear-gradient(135deg, #EEEBFA 0%, #DBEAFE 50%, #FFF4EB 100%);
    padding: 24px 0 36px;
    border-bottom: 1px solid #E4E2F0;
}

.mtp-tsd-crumbs { font-size: 12.5px; color: #6B6E89; margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mtp-tsd-crumbs a { color: #1C1777; text-decoration: none; }
.mtp-tsd-crumbs a:hover { color: #EE7922; text-decoration: underline; }
.mtp-tsd-crumbs span { color: #CBD5E1; }
.mtp-tsd-crumbs .current { color: #0F1235; font-weight: 500; }

.mtp-tsd-hero__grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; align-items: start; }

.mtp-tsd-hero__main { }
.mtp-tsd-hero__head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.mtp-tsd-hero__icon { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg, #1C1777, #EE7922); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; flex-shrink: 0; letter-spacing: -0.02em; }
.mtp-tsd-hero__heading h1 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; color: #0F1235; line-height: 1.25; margin: 0 0 4px; letter-spacing: -0.01em; }
.mtp-tsd-hero__cat { font-size: 12px; color: #6B6E89; font-weight: 500; }

.mtp-tsd-hero__sub { font-size: 12.5px; color: #6B6E89; margin-bottom: 12px; }

.mtp-tsd-hero__stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 13px; color: #3A3D5C; }
.mtp-tsd-hero__stats strong { color: #0F1235; font-size: 14px; font-weight: 700; }
.mtp-tsd-hero__dot { color: #CBD5E1; }
.mtp-tsd-hero__badge { display: inline-block; padding: 3px 9px; background: #DCFCE7; color: #15803D; font-size: 10px; font-weight: 800; border-radius: 4px; letter-spacing: 0.06em; }
.mtp-tsd-hero__badge--premium { background: #EEEBFA; color: #1C1777; }

.mtp-tsd-hero__bullets {
    list-style: none; padding: 0; margin: 0 0 22px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 24px;
}
.mtp-tsd-hero__bullets li { font-size: 12.5px; color: #3A3D5C; display: flex; align-items: center; gap: 6px; }
.mtp-tsd-hero__bullets li strong { color: #1C1777; font-weight: 700; }
.mtp-tsd-hero__bullets .ic { font-size: 12px; }

.mtp-tsd-hero__cta {
    display: inline-block; background: #EE7922; color: #fff;
    padding: 12px 28px; border-radius: 8px; font-weight: 700;
    text-decoration: none; font-size: 14px;
    box-shadow: 0 4px 12px rgba(238,121,34,.30);
    transition: background .15s, transform .15s;
}
.mtp-tsd-hero__cta:hover { background: #C25E15; color: #fff; transform: translateY(-1px); }

/* Signup sidebar */
.mtp-tsd-hero__signup {
    background: #fff; border: 1px solid #E4E2F0; border-radius: 14px;
    padding: 20px; box-shadow: 0 6px 18px rgba(28,23,119,.06);
    position: sticky; top: 80px;
}
.mtp-tsd-hero__signup h3 { font-size: 15px; font-weight: 700; color: #0F1235; margin: 0 0 14px; line-height: 1.4; }
.mtp-tsd-hero__signup form { display: flex; flex-direction: column; gap: 8px; }
.mtp-tsd-hero__signup input {
    padding: 11px 14px; border: 1.5px solid #E4E2F0; border-radius: 8px;
    font-size: 13.5px; font-family: inherit; color: #0F1235; width: 100%;
}
.mtp-tsd-hero__signup input:focus { outline: none; border-color: #1C1777; box-shadow: 0 0 0 3px rgba(28,23,119,.10); }
.mtp-tsd-hero__signup button {
    padding: 11px; background: #EE7922; color: #fff; border: none;
    border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 14px;
    font-family: inherit; transition: background .15s;
}
.mtp-tsd-hero__signup button:hover { background: #C25E15; }
.mtp-tsd-hero__signup-note { font-size: 12px; color: #6B6E89; margin: 12px 0 0; text-align: center; }
.mtp-tsd-hero__signup-note strong { color: #1C1777; }
.mtp-tsd-hero__signup-btn {
    display: block; padding: 11px; background: #1C1777; color: #fff;
    border-radius: 8px; text-align: center; font-weight: 700;
    text-decoration: none; font-size: 14px; transition: background .15s;
}
.mtp-tsd-hero__signup-btn:hover { background: #14105A; color: #fff; }
.mtp-tsd-hero__signup--member p { font-size: 13px; color: #6B6E89; margin: 0 0 12px; }

@media (max-width: 880px) {
    .mtp-tsd-hero__grid { grid-template-columns: 1fr; }
    .mtp-tsd-hero__bullets { grid-template-columns: 1fr 1fr; }
    .mtp-tsd-hero__signup { position: static; }
}
@media (max-width: 480px) {
    .mtp-tsd-hero__bullets { grid-template-columns: 1fr; }
}

/* Main section */
.mtp-tsd-main { padding: 40px 0; background: #F8F7FC; }
.mtp-tsd-main__grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }

.mtp-tsd-main__title { font-size: 20px; font-weight: 800; color: #0F1235; margin: 0 0 18px; }
.mtp-tsd-main__count { color: #6B6E89; font-weight: 500; font-size: 16px; }

/* Tabs */
.mtp-tsd-tabs { display: flex; gap: 4px; border-bottom: 2px solid #E4E2F0; margin-bottom: 16px; }
.mtp-tsd-tab {
    padding: 10px 18px; background: transparent; border: none;
    border-bottom: 3px solid transparent; cursor: pointer;
    font-size: 14px; font-weight: 600; color: #6B6E89;
    margin-bottom: -2px; font-family: inherit; transition: all .15s;
}
.mtp-tsd-tab:hover { color: #1C1777; }
.mtp-tsd-tab.is-active { color: #EE7922; border-bottom-color: #EE7922; }

/* Sub-tabs (chips) */
.mtp-tsd-subtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.mtp-tsd-subtab {
    padding: 7px 14px; background: #fff; border: 1.5px solid #E4E2F0;
    border-radius: 20px; cursor: pointer; font-size: 12.5px;
    color: #3A3D5C; font-family: inherit; transition: all .15s;
    font-weight: 500;
}
.mtp-tsd-subtab:hover { border-color: #1C1777; color: #1C1777; }
.mtp-tsd-subtab.is-active { background: #EEEBFA; border-color: #1C1777; color: #1C1777; font-weight: 600; }

/* Test items */
.mtp-tsd-tests { display: flex; flex-direction: column; gap: 12px; }
.mtp-tsd-test {
    background: #fff; border: 1px solid #E4E2F0; border-radius: 12px;
    padding: 18px 20px; transition: border-color .15s, box-shadow .15s;
}
.mtp-tsd-test:hover { border-color: #1C1777; box-shadow: 0 6px 16px rgba(28,23,119,.08); }

.mtp-tsd-test__top { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.mtp-tsd-test__badge {
    display: inline-flex; align-items: center; padding: 3px 9px;
    border-radius: 4px; font-size: 10px; font-weight: 800;
    letter-spacing: 0.06em;
}
.mtp-tsd-test__badge--live { background: #FEE2E2; color: #DC2626; }
.mtp-tsd-test__badge--free { background: #DCFCE7; color: #15803D; }
.mtp-tsd-test__badge--premium { background: #EEEBFA; color: #1C1777; }

.mtp-tsd-test__body { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mtp-tsd-test__info { flex: 1; min-width: 0; }
.mtp-tsd-test__title { font-size: 15px; font-weight: 700; color: #0F1235; margin: 0 0 8px; line-height: 1.4; }

.mtp-tsd-test__meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: #475569; margin-bottom: 6px; }
.mtp-tsd-test__meta--soft { color: #6B6E89; font-size: 12px; }
.mtp-tsd-test__meta span { display: inline-flex; align-items: center; gap: 4px; }

.mtp-tsd-test__btn {
    background: transparent; color: #1C1777; border: 1.5px solid #1C1777;
    padding: 9px 22px; border-radius: 7px; font-weight: 700;
    text-decoration: none; font-size: 13.5px; flex-shrink: 0;
    transition: all .15s;
}
.mtp-tsd-test__btn:hover { background: #1C1777; color: #fff; }

@media (max-width: 540px) {
    .mtp-tsd-test__body { flex-direction: column; align-items: stretch; }
    .mtp-tsd-test__btn { text-align: center; }
}

/* Sidebar */
.mtp-tsd-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 80px; }
.mtp-tsd-side__box { background: #fff; border: 1px solid #E4E2F0; border-radius: 12px; padding: 18px; }
.mtp-tsd-side__title { font-size: 14px; font-weight: 700; color: #0F1235; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid #E4E2F0; }
.mtp-tsd-side__list { display: flex; flex-direction: column; gap: 2px; }
.mtp-tsd-side__item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; text-decoration: none; gap: 8px;
    border-bottom: 1px dashed #F2F1F8; transition: padding .15s;
}
.mtp-tsd-side__item:last-of-type { border-bottom: none; }
.mtp-tsd-side__item:hover { padding-left: 4px; }
.mtp-tsd-side__item h4 { font-size: 13px; font-weight: 600; color: #0F1235; margin: 0 0 3px; line-height: 1.3; }
.mtp-tsd-side__item p { font-size: 11.5px; color: #6B6E89; margin: 0; }
.mtp-tsd-side__item p strong { color: #B91C1C; }
.mtp-tsd-side__chev { color: #CBD5E1; font-size: 18px; flex-shrink: 0; transition: color .15s, transform .15s; }
.mtp-tsd-side__item:hover .mtp-tsd-side__chev { color: #EE7922; transform: translateX(3px); }
.mtp-tsd-side__more { display: block; text-align: center; padding-top: 14px; margin-top: 4px; border-top: 1px solid #E4E2F0; font-size: 13px; font-weight: 600; color: #1C1777; text-decoration: none; }
.mtp-tsd-side__more:hover { color: #EE7922; }

.mtp-tsd-side__why { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.mtp-tsd-side__why li { display: flex; gap: 10px; align-items: flex-start; }
.mtp-tsd-side__why .ic { font-size: 20px; flex-shrink: 0; }
.mtp-tsd-side__why strong { display: block; color: #0F1235; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.mtp-tsd-side__why small { color: #6B6E89; font-size: 11.5px; line-height: 1.5; }

@media (max-width: 960px) {
    .mtp-tsd-main__grid { grid-template-columns: 1fr; }
    .mtp-tsd-side { position: static; }
}

/* About */
.mtp-tsd-about { background: #fff; padding: 50px 0; }
.mtp-tsd-about h2 { font-size: 22px; font-weight: 800; color: #0F1235; margin: 0 0 16px; }
.mtp-tsd-about h3 { font-size: 17px; font-weight: 700; color: #0F1235; margin: 28px 0 12px; }
.mtp-tsd-about p { font-size: 14px; color: #3A3D5C; line-height: 1.7; margin: 0 0 12px; }
.mtp-tsd-about__intro { color: #475569; }
.mtp-tsd-about__list { padding-left: 20px; margin: 0 0 16px; }
.mtp-tsd-about__list li { font-size: 13.5px; color: #3A3D5C; line-height: 1.7; margin-bottom: 8px; }
.mtp-tsd-about__list li strong { color: #1C1777; }

/* FAQ */
.mtp-tsd-faq-section { padding: 50px 0; background: #F8F7FC; border-top: 1px solid #E4E2F0; }
.mtp-tsd-faq-section h2 { font-size: 22px; font-weight: 800; color: #0F1235; margin: 0 0 22px; }


/* ════════ EXISTING COMPONENTS (Dashboard, Result, etc.) ══════════ */

.mtp-btn { display: inline-block; padding: 9px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1.5px solid #E4E2F0; background: #fff; color: #0F1235; text-decoration: none; transition: background .15s; }
.mtp-btn:hover { background: #F2F1F8; }
.mtp-btn--primary { background: #EE7922; color: #fff; border-color: #EE7922; }
.mtp-btn--primary:hover { background: #C25E15; }
.mtp-link { color: #1C1777; text-decoration: none; font-size: 13px; }
.mtp-link:hover { color: #EE7922; text-decoration: underline; }
.mtp-empty { color: #9CA0B8; font-style: italic; }

.mtp-dashboard-wrap { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.mtp-dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.mtp-dash-title { font-size: 22px; font-weight: 700; margin: 0; color: #0F1235; }
.mtp-stats-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 12px; margin-bottom: 32px; }
.mtp-stat-card { background: #fff; border: 1px solid #E4E2F0; border-radius: 10px; padding: 16px; text-align: center; transition: border-color .15s; }
.mtp-stat-card:hover { border-color: #1C1777; }
.mtp-stat-val { font-size: 28px; font-weight: 800; color: #1C1777; }
.mtp-stat-lbl { font-size: 12px; color: #6B6E89; margin-top: 4px; }
.mtp-section { margin-bottom: 36px; }
.mtp-section h3 { font-size: 16px; font-weight: 700; margin: 0 0 14px; color: #0F1235; border-bottom: 2px solid #EE7922; display: inline-block; padding-bottom: 4px; }
.mtp-my-series-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mtp-my-series-chip { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: #EEEBFA; color: #1C1777; border-radius: 20px; font-size: 13px; font-weight: 500; text-decoration: none; }
.mtp-chip-badge { font-size: 10px; background: #EE7922; color: #fff; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.mtp-history-table-wrap { overflow-x: auto; }
.mtp-history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mtp-history-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid #E4E2F0; font-size: 12px; font-weight: 700; color: #6B6E89; text-transform: uppercase; letter-spacing: .5px; }
.mtp-history-table td { padding: 10px 12px; border-bottom: 1px solid #F2F1F8; color: #3A3D5C; vertical-align: middle; }
.mtp-history-table tr:hover td { background: #FAFAFC; }
.mtp-ht-name { font-weight: 500; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0F1235; }
.mtp-correct { color: #16A34A; font-weight: 700; }
.mtp-wrong { color: #DC2626; font-weight: 700; }

.mtp-result-wrap { max-width: 860px; margin: 0 auto; padding: 30px 20px; }
.mtp-result-scorecard { background: #fff; border: 1.5px solid #E4E2F0; border-radius: 16px; padding: 32px; margin-bottom: 32px; text-align: center; }
.mtp-result-test-title { font-size: 20px; font-weight: 700; color: #0F1235; margin: 0 0 20px; }
.mtp-result-score-big { margin-bottom: 24px; }
.mtp-result-score-num { font-size: 56px; font-weight: 800; color: #1C1777; }
.mtp-result-score-total { font-size: 22px; color: #9CA0B8; }
.mtp-result-stats-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.mtp-result-stat { text-align: center; min-width: 80px; }
.mtp-result-stat-val { font-size: 22px; font-weight: 800; }
.mtp-result-stat-lbl { font-size: 12px; color: #6B6E89; margin-top: 2px; }
.mtp-result-stat--correct .mtp-result-stat-val { color: #16A34A; }
.mtp-result-stat--wrong .mtp-result-stat-val { color: #DC2626; }
.mtp-result-stat--skip .mtp-result-stat-val { color: #9CA0B8; }
.mtp-result-stat--accuracy .mtp-result-stat-val { color: #EE7922; }
.mtp-result-stat--rank .mtp-result-stat-val { color: #1C1777; }
.mtp-result-stat--percentile.mtp-result-stat-val { color: #EE7922; }
.mtp-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.mtp-solutions-title { font-size: 18px; font-weight: 700; margin: 0 0 20px; color: #0F1235; }
.mtp-sol-item { background: #fff; border: 1.5px solid #E4E2F0; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.mtp-sol-item--correct { border-left: 4px solid #16A34A; }
.mtp-sol-item--wrong { border-left: 4px solid #DC2626; }
.mtp-sol-item--skipped { border-left: 4px solid #EE7922; }
.mtp-sol-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mtp-sol-num { width: 28px; height: 28px; border-radius: 50%; background: #EEEBFA; color: #1C1777; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.mtp-sol-status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.mtp-sol-item--correct .mtp-sol-status { color: #16A34A; }
.mtp-sol-item--wrong .mtp-sol-status { color: #DC2626; }
.mtp-sol-item--skipped .mtp-sol-status { color: #EE7922; }
.mtp-sol-time { margin-left: auto; font-size: 12px; color: #9CA0B8; }
.mtp-sol-body { font-size: 15px; line-height: 1.65; color: #0F1235; margin-bottom: 14px; }
.mtp-sol-options { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.mtp-sol-opt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1.5px solid #E4E2F0; border-radius: 7px; font-size: 14px; }
.mtp-sol-opt--correct { background: #DCFCE7; border-color: #16A34A; }
.mtp-sol-opt--wrong { background: #FEE2E2; border-color: #DC2626; }
.mtp-sol-opt--your-correct { background: #DCFCE7; border-color: #16A34A; }
.mtp-sol-opt-label { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: #F2F1F8; color: #1C1777; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.mtp-sol-opt-body { flex: 1; }
.mtp-sol-tick { margin-left: auto; color: #16A34A; font-weight: 700; }
.mtp-sol-cross { margin-left: auto; color: #DC2626; font-weight: 700; }
.mtp-sol-explanation { background: #FFF4EB; border: 1px solid #FEE7D2; border-radius: 7px; padding: 12px 14px; font-size: 13px; color: #3A3D5C; line-height: 1.6; }
.mtp-sol-explanation strong { color: #C25E15; }


/* ════════ AUTH FORMS — APPEND TO EXISTING frontend.css ════════════════ */

.mtp-auth-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.mtp-auth-card {
    background: #fff;
    border: 1px solid #E4E2F0;
    border-radius: 16px;
    padding: 38px 36px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 12px 32px rgba(28,23,119,.08);
}

.mtp-auth-card__header { text-align: center; margin-bottom: 28px; }
.mtp-auth-card__logo {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 17px; font-weight: 800; color: #0F1235;
    margin-bottom: 22px;
}
.mtp-auth-card__logo-mark {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #1C1777, #EE7922);
    color: #fff; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800;
}
.mtp-auth-card__header h1 {
    font-size: 22px; font-weight: 800; color: #0F1235;
    margin: 0 0 6px; letter-spacing: -0.01em;
}
.mtp-auth-card__header p { font-size: 14px; color: #6B6E89; margin: 0; line-height: 1.5; }

.mtp-auth-form { display: flex; flex-direction: column; gap: 16px; }

.mtp-auth-field { display: flex; flex-direction: column; gap: 6px; }
.mtp-auth-field label {
    font-size: 13px; font-weight: 600; color: #0F1235;
    display: flex; align-items: center; gap: 6px;
}
.mtp-auth-field label .req   { color: #EE7922; }
.mtp-auth-field label small  { color: #9CA0B8; font-weight: 400; }
.mtp-auth-field input {
    padding: 11px 14px;
    border: 1.5px solid #E4E2F0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #0F1235;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.mtp-auth-field input:focus {
    outline: none;
    border-color: #1C1777;
    box-shadow: 0 0 0 3px rgba(28,23,119,.12);
}
.mtp-auth-field input:invalid:not(:placeholder-shown) { border-color: #DC2626; }

.mtp-auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) { .mtp-auth-grid-2 { grid-template-columns: 1fr; } }

.mtp-auth-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    margin-top: -4px;
}
.mtp-auth-check {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: #3A3D5C; cursor: pointer;
}
.mtp-auth-check input { width: 16px; height: 16px; accent-color: #1C1777; }
.mtp-auth-check--block { margin: 4px 0; line-height: 1.5; }
.mtp-auth-check--block a { color: #1C1777; }
.mtp-auth-check--block a:hover { color: #EE7922; }

.mtp-auth-link {
    font-size: 13px; color: #1C1777; text-decoration: none; font-weight: 500;
}
.mtp-auth-link:hover { color: #EE7922; }

.mtp-auth-btn {
    background: #EE7922;
    color: #fff;
    border: none;
    padding: 13px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, transform .1s;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(238,121,34,.28);
}
.mtp-auth-btn:hover  { background: #C25E15; }
.mtp-auth-btn:active { transform: translateY(1px); }

.mtp-auth-foot {
    text-align: center;
    font-size: 13.5px;
    color: #6B6E89;
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid #F2F1F8;
}
.mtp-auth-foot a { color: #1C1777; font-weight: 600; text-decoration: none; }
.mtp-auth-foot a:hover { color: #EE7922; text-decoration: underline; }

.mtp-auth-notice {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 18px;
    border: 1px solid;
}
.mtp-auth-notice--success { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.mtp-auth-notice--error   { background: #FEE2E2; border-color: #FCA5A5; color: #B91C1C; }
.mtp-auth-notice a { color: inherit; font-weight: 700; }

/* ── Verify banner ────────────────────────────────────────────────────── */

.mtp-verify-banner {
    background: linear-gradient(135deg, #FFF4EB 0%, #EEEBFA 100%);
    border: 1.5px solid #FEE7D2;
    border-left: 4px solid #EE7922;
    border-radius: 10px;
    padding: 18px 22px;
    margin: 0 0 24px;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
}
.mtp-verify-banner__icon { font-size: 28px; flex-shrink: 0; }
.mtp-verify-banner__body { flex: 1; min-width: 200px; }
.mtp-verify-banner__body strong { display: block; color: #0F1235; font-size: 14.5px; margin-bottom: 4px; }
.mtp-verify-banner__body p { margin: 0; font-size: 12.5px; color: #6B6E89; line-height: 1.55; }
.mtp-verify-banner__body p strong { display: inline; font-size: 12.5px; color: #1C1777; margin: 0; }
.mtp-verify-banner__btn {
    background: #EE7922; color: #fff;
    border: none; padding: 9px 16px; border-radius: 6px;
    font-weight: 700; font-size: 12.5px; cursor: pointer;
    font-family: inherit; transition: background .15s; flex-shrink: 0;
}
.mtp-verify-banner__btn:hover { background: #C25E15; }

/* ── Toast (top of dashboard for transient messages) ────────────────── */

.mtp-auth-toast {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin: 0 0 18px;
    border: 1px solid;
    font-family: 'Inter', sans-serif;
}
.mtp-auth-toast--success { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.mtp-auth-toast--error   { background: #FEE2E2; border-color: #FCA5A5; color: #B91C1C; }
.mtp-auth-notice--info { background: #EEEBFA; border-color: #C7BFEB; color: #1C1777; }