/* ============================================
   E-Kendra — Secondary pages CSS
   (our-software / api-accounts / my-commission / help)
   ============================================ */

/* ===== PAGE HERO ===== */
.page-hero {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, #EEF2FF 0%, var(--bg-body) 100%);
    text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; top: -30%; right: -15%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%; z-index: 0;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .badge {
    display: inline-block; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--primary); background: var(--primary-glow);
    padding: 4px 16px; border-radius: 50px; margin-bottom: 14px;
}
.page-hero h1 {
    font-size: 42px; font-weight: 900; line-height: 1.1;
    margin-bottom: 12px;
}
.page-hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-hero p {
    color: var(--text-secondary); font-size: 17px;
    max-width: 600px; margin: 0 auto; line-height: 1.6;
}

/* ===== FEATURE GRID (software page) ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; margin-top: 36px;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 28px 24px;
    box-shadow: var(--shadow-sm); transition: var(--transition-bounce);
    display: flex; flex-direction: column; align-items: flex-start;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg); border-color: var(--primary-light);
}
.feature-card .fc-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--primary); margin-bottom: 18px;
}
.feature-card h3 {
    font-size: 17px; font-weight: 800;
    margin-bottom: 8px; color: var(--text-primary);
}
.feature-card p {
    font-size: 14px; color: var(--text-secondary);
    line-height: 1.6; margin: 0;
}

/* ===== API GRID ===== */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px; margin-top: 36px;
}
.api-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow-sm); transition: var(--transition-bounce);
    display: flex; align-items: flex-start; gap: 14px;
}
.api-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg); border-color: var(--primary-light);
}
.api-card .api-icon {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--primary); flex-shrink: 0;
}
.api-card .api-body { flex: 1; min-width: 0; }
.api-card h3 {
    font-size: 15px; font-weight: 800;
    margin-bottom: 4px; color: var(--text-primary);
}
.api-card p {
    font-size: 12.5px; color: var(--text-secondary);
    line-height: 1.5; margin: 0;
}

/* ===== HOW IT WORKS ===== */
.steps-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; margin-top: 36px;
}
.step-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 26px 22px;
    text-align: center; box-shadow: var(--shadow-sm);
    transition: var(--transition); position: relative;
}
.step-card:hover {
    box-shadow: var(--shadow-lg); border-color: var(--primary-light);
}
.step-card .step-num {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900;
    margin: 0 auto 14px;
    box-shadow: 0 6px 18px var(--primary-glow-strong);
}
.step-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.step-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* ===== CODE BLOCK ===== */
.code-block {
    background: var(--bg-dark); border-radius: var(--radius);
    padding: 24px 26px; margin-top: 36px;
    color: var(--text-light); box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.code-block .cb-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; gap: 10px; flex-wrap: wrap;
}
.code-block .cb-head h3 {
    font-size: 15px; font-weight: 700; color: #fff;
    display: flex; align-items: center; gap: 8px;
}
.code-block .cb-head h3 i { color: var(--primary-light); }
.code-block .cb-dots { display: flex; gap: 6px; }
.code-block .cb-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-block .cb-dots span:nth-child(1) { background: #EF4444; }
.code-block .cb-dots span:nth-child(2) { background: #F59E0B; }
.code-block .cb-dots span:nth-child(3) { background: #10B981; }
.code-block pre {
    font-family: 'Courier New', monospace; font-size: 13px;
    line-height: 1.7; white-space: pre-wrap; word-break: break-word;
    color: #A5B4FC;
}
.code-block pre .c-key { color: #F472B6; }
.code-block pre .c-str { color: #6EE7B7; }
.code-block pre .c-com { color: #64748B; }

/* ===== ROLE TABS (commission page) ===== */
.role-tabs {
    display: flex; justify-content: center; gap: 10px;
    margin: 32px 0 36px; flex-wrap: wrap;
    position: relative; z-index: 2;
}
.role-tab {
    padding: 14px 28px; border-radius: 50px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-weight: 700; font-size: 14px;
    cursor: pointer; transition: var(--transition-bounce);
    display: inline-flex; align-items: center; gap: 9px;
    font-family: 'Inter', sans-serif;
}
.role-tab:hover {
    border-color: var(--primary-light);
    background: var(--primary-glow); transform: translateY(-2px);
}
.role-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border-color: transparent;
    box-shadow: 0 8px 24px var(--primary-glow-strong);
    transform: translateY(-2px);
}
.role-tab i { font-size: 15px; }

.plan-panel { display: none; animation: fadeIn 0.35s ease; }
.plan-panel.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.plan-head-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius); padding: 30px 36px;
    margin-bottom: 24px; color: #fff;
    display: flex; justify-content: space-between; align-items: center;
    gap: 24px; flex-wrap: wrap;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.3);
    position: relative; overflow: hidden;
}
.plan-head-card::before {
    content: ''; position: absolute; top: -40%; right: -5%;
    width: 320px; height: 320px;
    background: rgba(255,255,255,0.08); border-radius: 50%;
}
.plan-head-card .phc-left { position: relative; z-index: 1; }
.plan-head-card .phc-icon {
    width: 58px; height: 58px; border-radius: 16px;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.25);
}
.plan-head-card h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; line-height: 1.2; }
.plan-head-card p {
    font-size: 14px; color: rgba(255,255,255,0.88);
    max-width: 520px; line-height: 1.6;
}
.plan-head-card .phc-right {
    position: relative; z-index: 1;
    display: flex; gap: 14px;
}
.plan-head-card .ms-box {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 14px; padding: 14px 20px;
    text-align: center; min-width: 120px;
}
.plan-head-card .ms-box .ms-val { font-size: 24px; font-weight: 900; line-height: 1.1; }
.plan-head-card .ms-box .ms-lbl {
    font-size: 10.5px; color: rgba(255,255,255,0.8);
    text-transform: uppercase; letter-spacing: 0.5px;
    font-weight: 600; margin-top: 4px;
}

.section-block {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 24px 26px; box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px; gap: 10px; flex-wrap: wrap;
}
.section-head h3 {
    font-size: 16px; font-weight: 800; color: var(--text-primary);
    margin: 0; display: flex; align-items: center; gap: 9px;
}
.section-head h3 i { color: var(--secondary); font-size: 15px; }
.section-head .sh-count {
    font-size: 11px; font-weight: 700; color: var(--primary);
    background: var(--primary-glow); padding: 4px 12px; border-radius: 50px;
}

.rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}
.rate-card {
    background: #F8FAFC; border: 1px solid #EEF2F6;
    border-radius: 12px; padding: 12px 14px;
    display: flex; align-items: center; gap: 12px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    min-width: 0;
}
.rate-card:hover {
    background: #F5F3FF; border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.1);
}
.rate-card .rc-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: #EEF2FF; color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0; transition: all 0.2s ease;
}
.rate-card:hover .rc-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.rate-card .rc-body { flex: 1; min-width: 0; }
.rate-card .rc-label {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    line-height: 1.3; white-space: normal; word-break: break-word;
}
.rate-card .rc-sub {
    font-size: 9.5px; color: var(--text-muted);
    margin-top: 2px; text-transform: uppercase;
    letter-spacing: 0.4px; font-weight: 600;
}
.rate-card .rc-val {
    font-size: 16px; font-weight: 900; color: var(--text-primary);
    font-variant-numeric: tabular-nums; flex-shrink: 0;
    white-space: nowrap; text-align: right;
}
.rate-card .rc-val .u { font-size: 11px; color: var(--primary); margin-left: 1px; }
.rate-card .rc-val.flat .u { color: var(--success); }

.empty-panel {
    text-align: center; padding: 70px 20px;
    background: var(--bg-card); border-radius: var(--radius);
    border: 2px dashed var(--border-color);
    color: var(--text-muted);
}
.empty-panel i { font-size: 60px; margin-bottom: 16px; opacity: 0.25; }
.empty-panel h3 { font-size: 20px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-panel p { font-size: 14px; }

/* ===== CTA BOX INLINE (secondary pages) ===== */
.cta-box-inline {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius); padding: 48px 40px;
    text-align: center; color: #fff; margin-top: 36px;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.3);
    position: relative; overflow: hidden;
}
.cta-box-inline::before {
    content: ''; position: absolute; top: -50%; left: -10%;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.06); border-radius: 50%;
}
.cta-box-inline .cta-content { position: relative; z-index: 1; }
.cta-box-inline h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.cta-box-inline p {
    color: rgba(255,255,255,0.88); font-size: 16px;
    margin-bottom: 24px; max-width: 560px;
    margin-left: auto; margin-right: auto; line-height: 1.6;
}
.cta-box-inline .btn-cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 36px; background: #fff; color: var(--primary);
    border-radius: 50px; font-weight: 700; font-size: 15px;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cta-box-inline .btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

/* ===== BENEFIT SECTION ===== */
.benefit-section {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 36px 32px; margin-top: 36px;
    box-shadow: var(--shadow-sm);
}
.benefit-section h2 {
    font-size: 24px; font-weight: 800;
    margin-bottom: 20px; text-align: center;
}
.benefit-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px; list-style: none;
}
.benefit-list li {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 14px; color: var(--text-secondary); line-height: 1.5;
}
.benefit-list li i {
    color: var(--success); font-size: 16px; margin-top: 2px; flex-shrink: 0;
}

/* ===== HELP PAGE ===== */
.help-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}
.help-cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-bounce);
}
.help-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.help-cat-card .hc-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}
.help-cat-card h3 {
    font-size: 16px; font-weight: 800;
    margin-bottom: 6px; color: var(--text-primary);
}
.help-cat-card > p {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.55; margin: 0 0 14px;
}
.help-cat-card .hc-list {
    list-style: none; margin: 0; padding: 0;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}
.help-cat-card .hc-list li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 12.5px; color: var(--text-secondary);
    padding: 6px 0; line-height: 1.5;
}
.help-cat-card .hc-list li i {
    color: var(--primary-light); font-size: 10px;
    margin-top: 4px; flex-shrink: 0;
}

/* FAQ accordion */
.faq-list {
    max-width: 820px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 10px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition);
}
.faq-item.open {
    border-color: var(--primary-light);
    box-shadow: 0 6px 20px rgba(79,70,229,0.08);
}
.faq-q {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
}
.faq-q:hover { background: var(--bg-hover); }
.faq-q i {
    color: var(--primary);
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 20px;
}
.faq-item.open .faq-a {
    max-height: 500px;
    padding: 0 20px 16px;
}
.faq-a p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Help contact buttons */
.help-contact-btns {
    display: flex; justify-content: center;
    gap: 12px; flex-wrap: wrap;
    position: relative; z-index: 1;
}

/* ===== LEGAL PAGES (privacy / terms / cookies) ===== */
.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: flex-start;
}
.legal-toc {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
}
.legal-toc h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.legal-toc h3 i { color: var(--primary); font-size: 13px; }
.legal-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.legal-toc ul li { margin-bottom: 2px; }
.legal-toc ul li a {
    display: block;
    font-size: 12.5px;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: var(--transition);
    line-height: 1.4;
}
.legal-toc ul li a:hover {
    background: var(--primary-glow);
    color: var(--primary);
    border-left-color: var(--primary);
}
.legal-meta {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}
.legal-meta i { color: var(--primary-light); margin-right: 6px; }

.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 36px 36px;
    box-shadow: var(--shadow-sm);
}
.legal-intro {
    background: var(--primary-glow);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 28px;
}
.legal-intro p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0;
}
.legal-section {
    padding-top: 8px;
    margin-bottom: 28px;
    scroll-margin-top: calc(var(--nav-height) + 20px);
}
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.3;
}
.legal-section h2 .legal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow-strong);
}
.legal-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 10px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul {
    list-style: none;
    margin: 10px 0 12px;
    padding: 0;
}
.legal-section ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}
.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-light);
}
.legal-section strong { color: var(--text-primary); }
.legal-section a {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}
.legal-section a:hover { color: var(--primary-dark); text-decoration: underline; }

.legal-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 18px;
}
.legal-contact > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
}
.legal-contact > div > i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.legal-contact strong {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legal-contact a { color: var(--primary); font-weight: 600; }
.legal-contact a:hover { text-decoration: underline; }

/* ===== PAGE RESPONSIVE ===== */
@media (max-width: 1024px) {
    .plan-head-card .phc-right { width: 100%; }
    .plan-head-card .ms-box { flex: 1; }
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { position: static; }
    .legal-toc ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2px 8px;
    }
}
@media (max-width: 768px) {
    .page-hero { padding: 40px 0 30px; }
    .page-hero h1 { font-size: 28px; }
    .page-hero p { font-size: 15px; }
    .role-tab { padding: 11px 20px; font-size: 13px; }
    .plan-head-card { padding: 24px 20px; }
    .plan-head-card h2 { font-size: 21px; }
    .plan-head-card .ms-box { padding: 12px 14px; }
    .plan-head-card .ms-box .ms-val { font-size: 20px; }
    .rate-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .benefit-section { padding: 24px 20px; }
    .code-block { padding: 18px 16px; }
    .code-block pre { font-size: 11.5px; }
    .cta-box-inline { padding: 32px 22px; }
    .cta-box-inline h2 { font-size: 22px; }
    .feature-grid { grid-template-columns: 1fr; }
    .api-grid { grid-template-columns: 1fr; }
    .steps-wrap { grid-template-columns: 1fr; }
    .help-cat-grid { grid-template-columns: 1fr; }
    .faq-q { font-size: 13.5px; padding: 14px 16px; }
    .help-contact-btns { flex-direction: column; align-items: stretch; }
    .help-contact-btns .btn-cta { justify-content: center; }
    .legal-card { padding: 24px 20px; }
    .legal-section h2 { font-size: 17px; }
    .legal-section p,
    .legal-section ul li { font-size: 13.5px; }
    .legal-toc ul { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .page-hero h1 { font-size: 24px; }
    .rate-grid { grid-template-columns: 1fr; }
}