/* ============================================================
   Cribmed Affiliate Partner — Shared Styles
   Used by: affiliate-partner-signup, affiliate-partner-dashboard
   ============================================================ */

/* ── Signup Page ── */
.partner-signup-page {
    background: #f7f8fa;
    min-height: calc(100vh - 80px);
    padding: 48px 0 64px;
}

/* Left benefits panel */
.benefits-panel {
    background: linear-gradient(160deg, #ef6a25 0%, #c0392b 100%);
    border-radius: 16px;
    padding: 40px 36px;
    color: #fff;
    height: 100%;
    position: sticky;
    top: 100px;
}
.benefits-panel h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
    color: white;
}
.benefits-panel .tagline {
    font-size: 14px;
    color: rgba(255,255,255,0.82);
    margin-bottom: 32px;
    line-height: 1.5;
}
.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}
.benefit-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.benefit-item h5 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 3px;
    color: #fff;
}
.benefit-item p {
    font-size: 12px;
    color: rgba(255,255,255,0.78);
    margin: 0;
    line-height: 1.4;
}
.benefits-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 28px 0;
}
.testimonial-box {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.92);
    line-height: 1.6;
}
.testimonial-box .author {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    margin-top: 8px;
}
.guide-link-box {
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.guide-link-box a {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.guide-link-box a:hover { text-decoration: underline; }

/* Right form panel */
.form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    overflow: hidden;
}
.form-card-header {
    background: #fff;
    padding: 28px 36px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.form-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px;
}
.form-card-header p {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}
.form-card-body { padding: 28px 36px 36px; }

.section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #d1d5db;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 14px;
}
.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f3f4f6;
}

.form-label-c { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #111827;
    background: #fafafa;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
    appearance: none;
}
.form-input:focus {
    border-color: #ef6a25;
    box-shadow: 0 0 0 3px rgba(239,106,37,.1);
    background: #fff;
}
.form-input.is-invalid { border-color: #ef4444; background: #fff5f5; }
.form-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.field-error { color: #ef4444; font-size: 12px; margin-top: 4px; }
.field-error::before { content: '⚠ '; }
.helper-text { font-size: 11px; color: #9ca3af; margin-top: 4px; }

.terms-wrap {
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.terms-wrap.is-invalid { border-color: #ef4444; background: #fff5f5; }
.terms-wrap input[type=checkbox] {
    width: 16px; height: 16px;
    margin-top: 2px; flex-shrink: 0;
    accent-color: #ef6a25;
    cursor: pointer;
}
.terms-wrap label { font-size: 13px; color: #374151; margin: 0; cursor: pointer; }
.terms-wrap a { color: #ef6a25; font-weight: 600; text-decoration: none; }
.terms-wrap a:hover { text-decoration: underline; }

.btn-signup {
    width: 100%;
    background: linear-gradient(135deg, #ef6a25, #c0392b);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px;
    cursor: pointer;
    transition: opacity .18s, transform .1s;
    letter-spacing: .3px;
}
.btn-signup:hover { opacity: .92; }
.btn-signup:active { transform: scale(.99); }

.signin-link {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    margin-top: 16px;
}
.signin-link a { color: #ef6a25; font-weight: 600; text-decoration: none; }

.alert-error-box {
    background: #fff3ef;
    border: 1px solid #ef6a25;
    border-left: 4px solid #ef6a25;
    color: #c0470a;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 16px;
}

.success-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.success-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #fde8d8, #fcc4a8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
}
.success-wrap h3 { color: #1f2937; font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.success-wrap p { color: #6b7280; font-size: 15px; line-height: 1.7; max-width: 460px; margin: 0 auto; }
.btn-back {
    display: inline-block;
    margin-top: 24px;
    background: linear-gradient(135deg, #ef6a25, #c0392b);
    color: #fff;
    border-radius: 8px;
    padding: 12px 32px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

/* ============================================================
   Dashboard Styles
   ============================================================ */
* { box-sizing: border-box; }
body.hh-partner-dashboard { background: #f0f2f5; }

.ap-nav {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}
.ap-nav .ap-brand {
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -.3px;
}
.ap-nav .ap-brand span {
    display: inline-block;
    background: linear-gradient(135deg, #ef6a25, #e84040);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.ap-nav .ap-nav-right { display: flex; align-items: center; gap: 16px; }
.ap-nav .ap-user { display: flex; align-items: center; gap: 10px; color: #ccc; font-size: 13px; }
.ap-nav .ap-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef6a25, #e84040);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.ap-logout {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    text-decoration: none;
    transition: background .2s;
}
.ap-logout:hover { background: rgba(255,255,255,0.2); color:#fff; text-decoration:none; }
.ap-guide-nav {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color .2s;
}
.ap-guide-nav:hover { color: #fff; text-decoration: none; }

.ap-hero {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 60%, #3d566e 100%);
    padding: 32px 32px 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.ap-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(239,106,37,.12);
}
.ap-hero::after {
    content: '';
    position: absolute;
    bottom: -40px; right: 120px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: rgba(239,106,37,.08);
}
.ap-hero h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; position: relative; color: #fff !important; }
.ap-hero p  { font-size: 13px; color: rgba(255,255,255,.75) !important; margin: 0; position: relative; }
.ap-hero .ap-ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 13px;
    color: #fff;
    margin-top: 12px;
    position: relative;
}
.ap-hero .ap-ref-pill strong { color: #ef6a25; }

.ap-content { padding: 28px 32px; background: #f0f2f5; min-height: calc(100vh - 64px); }

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    display: flex; align-items: center; gap: 14px;
    border: 1px solid #f0f0f0;
    transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; flex-shrink: 0;
}
.stat-card .stat-label { font-size: 12px; color: #9ca3af; margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stat-card .stat-value { font-size: 24px; font-weight: 800; color: #111827; line-height: 1; }

.ap-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); border: 1px solid #f0f0f0; margin-bottom: 24px; overflow: hidden; }
.ap-card-header { padding: 18px 24px 14px; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; justify-content: space-between; }
.ap-card-header h5 { font-size: 15px; font-weight: 700; color: #111827; margin: 0; display: flex; align-items: center; gap: 8px; }
.ap-card-header h5 i { color: #ef6a25; }
.ap-card-body { padding: 20px 24px; }

.widget-code-block {
    background: #1e2a3b;
    border-radius: 8px;
    padding: 16px 80px 16px 16px;
    position: relative;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #7dd3fc;
    line-height: 1.6;
}
.widget-code-block .tag-bracket { color: #f472b6; }
.widget-code-block .attr-name   { color: #86efac; }
.widget-code-block .attr-val    { color: #fcd34d; }

.copy-btn {
    position: absolute; top: 10px; right: 10px;
    background: #ef6a25; color: #fff; border: none;
    border-radius: 6px; padding: 5px 12px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background .2s; display: flex; align-items: center; gap: 4px;
}
.copy-btn:hover { background: #d4591e; }
.copy-btn.copied { background: #16a34a; }

.ref-link-row {
    display: flex; align-items: center; gap: 10px;
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 10px 14px;
}
.ref-link-row input { flex: 1; border: none; background: transparent; font-family: monospace; font-size: 13px; color: #374151; outline: none; }
.ref-link-row .copy-btn { position: static; }

.code-label { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }

.ap-table thead th { background: #f9fafb; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; border-bottom: 2px solid #f0f0f0; padding: 12px 16px; }
.ap-table tbody td { padding: 14px 16px; vertical-align: middle; font-size: 13px; border-bottom: 1px solid #f9fafb; color: #374151; }
.ap-table tbody tr:last-child td { border-bottom: none; }
.ap-table tbody tr:hover td { background: #fafafa; }

.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.badge-pending   { background: #fef9c3; color: #854d0e; }
.badge-eligible  { background: #dcfce7; color: #166534; }
.badge-paid      { background: #e0f2fe; color: #0369a1; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

.ap-empty { text-align: center; padding: 56px 32px; }
.ap-empty .ap-empty-icon { width: 72px; height: 72px; border-radius: 50%; background: #f3f4f6; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 30px; color: #d1d5db; }
.ap-empty p { color: #9ca3af; font-size: 14px; margin: 0 0 4px; line-height: 1.6; }

.ap-dashboard-note {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.ap-dashboard-note .ap-note-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(239,106,37,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ap-dashboard-note .ap-note-icon { font-size: 22px; color: #ef6a25; }
.ap-dashboard-note .ap-note-text { font-size: 13px; color: rgba(255,255,255,0.80); line-height: 1.7; margin: 0; }
.ap-dashboard-note .ap-note-text strong { color: #ef6a25; font-weight: 700; }

.ap-pending-banner { background: linear-gradient(135deg, #fff8f4, #fff3ed); border: 1px solid #fcd9c0; border-left: 4px solid #ef6a25; border-radius: 10px; padding: 20px 24px; margin-bottom: 24px; display: flex; align-items: flex-start; gap: 16px; }
.ap-pending-banner .ap-pending-icon { width: 42px; height: 42px; border-radius: 10px; background: #fde8d8; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ap-pending-banner h6 { font-size: 14px; font-weight: 700; color: #92400e; margin: 0 0 4px; }
.ap-pending-banner p  { font-size: 13px; color: #b45309; margin: 0; }

@media (max-width: 768px) {
    .ap-nav { padding: 0 16px; }
    .ap-hero { padding: 24px 16px 20px; }
    .ap-content { padding: 20px 16px; }
    .ap-user .ap-user-name { display: none; }
    .ap-guide-nav span { display: none; }
}
