/* Dashboard CSS - Sihate Affiliate Pro Premium (Shopify-inspired) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --sah-bg: #f8fafc;
    --sah-card-bg: #ffffff;
    --sah-border: #f1f5f9;
    --sah-border-strong: #e2e8f0;
    --sah-text-primary: #0f172a;
    --sah-text-secondary: #64748b;
    --sah-accent: #fdef06;
    --sah-accent-hover: #e5d905;
    --sah-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05), 0 2px 10px -5px rgba(0, 0, 0, 0.05);
    --sah-shadow-hover: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --sah-radius: 16px;
    --sah-primary: #1e293b;
}

.sah-dashboard-wrapper { 
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: var(--sah-bg); 
    padding: 24px; 
    border-radius: var(--sah-radius); 
    color: var(--sah-text-primary);
    max-width: 1200px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
}

/* Dashboard Auth */
.sah-auth-wrapper {
    position: relative;
    max-width: 760px;
    margin: 32px auto;
    padding: clamp(24px, 5vw, 56px);
    border-radius: 32px;
    overflow: hidden;
    isolation: isolate;
}

.sah-auth-dashboard {
    background:
        radial-gradient(circle at top right, rgba(253, 239, 6, 0.22), transparent 34%),
        radial-gradient(circle at bottom left, rgba(30, 41, 59, 0.1), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--sah-border-strong);
    box-shadow: var(--sah-shadow);
}

.sah-auth-dashboard::before,
.sah-auth-dashboard::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.sah-auth-dashboard::before {
    width: 200px;
    height: 200px;
    top: -88px;
    right: -72px;
    background: radial-gradient(circle, rgba(253, 239, 6, 0.24) 0%, rgba(253, 239, 6, 0) 70%);
}

.sah-auth-dashboard::after {
    width: 180px;
    height: 180px;
    bottom: -96px;
    left: -64px;
    background: radial-gradient(circle, rgba(30, 41, 59, 0.1) 0%, rgba(30, 41, 59, 0) 72%);
}

.sah-auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 40px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 28px;
    box-shadow: 0 30px 60px -36px rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(12px);
}

.sah-auth-login-card {
    text-align: left;
}

.sah-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.82);
    color: var(--sah-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sah-auth-hero {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.sah-auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 16px 30px -18px rgba(15, 23, 42, 0.55);
}

.sah-auth-header {
    margin: 0;
}

.sah-auth-header h2 {
    margin: 0 0 12px;
    color: var(--sah-primary);
    font-size: clamp(30px, 4vw, 38px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.sah-auth-header p {
    margin: 0;
    color: var(--sah-text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.sah-auth-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 26px;
}

.sah-auth-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.84);
    color: var(--sah-text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.sah-auth-form form {
    margin: 0;
}

.sah-auth-form p {
    margin: 0 0 18px;
}

.sah-auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--sah-primary);
    font-size: 13px;
    font-weight: 700;
}

.sah-auth-form input[type="text"],
.sah-auth-form input[type="email"],
.sah-auth-form input[type="password"] {
    width: 100% !important;
    min-height: 54px;
    padding: 14px 16px !important;
    border: 1px solid var(--sah-border-strong) !important;
    border-radius: 16px !important;
    background: #fff !important;
    color: var(--sah-text-primary) !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sah-auth-form input[type="text"]:focus,
.sah-auth-form input[type="email"]:focus,
.sah-auth-form input[type="password"]:focus {
    outline: none !important;
    border-color: rgba(30, 41, 59, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(253, 239, 6, 0.18) !important;
}

.sah-auth-form .forgetmenot {
    margin: -2px 0 20px;
}

.sah-auth-form .forgetmenot label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--sah-text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.sah-auth-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--sah-primary);
}

.sah-auth-form .login-submit {
    margin-top: 22px;
}

.sah-auth-form .button.button-primary,
.sah-auth-form #wp-submit {
    width: 100%;
    min-height: 56px;
    padding: 16px 20px;
    border: none !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 18px 32px -18px rgba(15, 23, 42, 0.68);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sah-auth-form .button.button-primary:hover,
.sah-auth-form #wp-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 36px -20px rgba(15, 23, 42, 0.72);
    filter: brightness(1.02);
}

.sah-auth-footer {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.sah-auth-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sah-auth-links .sah-btn-primary,
.sah-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sah-auth-links .sah-btn-primary {
    box-shadow: 0 18px 32px -18px rgba(15, 23, 42, 0.68);
}

.sah-btn-outline {
    border: 1px solid var(--sah-border-strong);
    background: rgba(255, 255, 255, 0.84);
    color: var(--sah-primary);
}

.sah-auth-links .sah-btn-primary:hover,
.sah-btn-outline:hover {
    transform: translateY(-1px);
}

.sah-btn-outline:hover {
    background: #fff;
    border-color: rgba(30, 41, 59, 0.28);
}

.sah-auth-sub-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    color: var(--sah-text-secondary);
    font-size: 13px;
}

.sah-btn-link {
    color: var(--sah-text-secondary);
    text-decoration: none !important;
}

.sah-btn-link:hover {
    color: var(--sah-primary);
    text-decoration: underline !important;
}

/* Premium Header Card */
.sah-header-card {
    background: var(--sah-card-bg);
    border-radius: var(--sah-radius);
    padding: 40px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    box-shadow: var(--sah-shadow);
    border: none;
    background-image: radial-gradient(at 100% 0%, rgba(253, 239, 6, 0.08) 0, transparent 40%), radial-gradient(at 0% 100%, rgba(30, 41, 59, 0.03) 0, transparent 40%);
}

.sah-user-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.sah-avatar {
    width: 80px;
    height: 80px;
    background: var(--sah-primary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    border: 4px solid #fff;
    box-shadow: 0 8px 16px -4px rgba(30, 41, 59, 0.2);
}

.sah-user-details h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sah-user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.sah-code-badge {
    background: var(--sah-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
}

/* Tabs Navigation */
.sah-nav-container {
    position: relative;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    background: var(--sah-card-bg);
    border-radius: 20px;
    padding: 8px;
    box-shadow: var(--sah-shadow);
}

.sah-dashboard-nav { 
    display: flex; 
    overflow-x: auto;
    gap: 6px;
    flex-grow: 1;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.sah-dashboard-nav::-webkit-scrollbar { display: none; }

.sah-dashboard-nav a { 
    padding: 12px 24px; 
    color: var(--sah-text-secondary); 
    text-decoration: none !important; 
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sah-dashboard-nav a:hover { 
    background: #f1f5f9;
    color: var(--sah-primary); 
}

.sah-dashboard-nav a.active { 
    background: var(--sah-accent); 
    color: var(--sah-primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(253, 239, 6, 0.3);
}

/* Stats Cards */
.sah-stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 24px; 
    margin-bottom: 32px;
}

.sah-stat-card { 
    background: var(--sah-card-bg); 
    border-radius: var(--sah-radius); 
    padding: 28px;
    box-shadow: var(--sah-shadow);
    border: 1px solid var(--sah-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sah-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: var(--sah-accent);
}

.sah-stat-title { 
    font-size: 12px; 
    color: var(--sah-text-secondary); 
    font-weight: 700; 
    margin-bottom: 14px; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sah-stat-value { 
    font-size: 38px; 
    font-weight: 900; 
    color: var(--sah-text-primary); 
    letter-spacing: -1.5px;
    line-height: 1;
}

/* Cards & Tables */
.sah-card { 
    background: var(--sah-card-bg); 
    border-radius: 24px; 
    margin-bottom: 32px; 
    box-shadow: var(--sah-shadow);
    overflow: hidden;
    border: 1px solid var(--sah-border);
    transition: box-shadow 0.3s ease;
}

.sah-card:hover {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.sah-card-header { 
    padding: 28px 32px; 
    border-bottom: 1px solid var(--sah-border); 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sah-card-header h3 { 
    margin: 0; 
    font-size: 18px; 
    font-weight: 800;
    letter-spacing: -0.3px;
}

.sah-card-body { padding: 32px; }

.sah-top-sales-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sah-top-sales-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    transform: translateY(-1px);
}

.sah-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--sah-text-primary);
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    box-sizing: border-box;
}

.sah-rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.sah-rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sah-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 32px;
    align-items: stretch;
}

/* Table Styling */
.sah-responsive-table {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sah-responsive-table::-webkit-scrollbar {
    height: 10px;
}

.sah-responsive-table::-webkit-scrollbar-track {
    background: transparent;
}

.sah-responsive-table::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sah-responsive-table .sah-table {
    width: max-content;
    min-width: 100%;
}

.sah-table th { 
    padding: 16px 24px; 
    background: #f8fafc; 
    font-weight: 700; 
    color: var(--sah-text-secondary); 
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--sah-border);
}

.sah-table td { 
    padding: 18px 24px; 
    border-bottom: 1px solid var(--sah-border);
    font-size: 14px;
    color: var(--sah-text-primary);
    vertical-align: top;
}

/* Buttons */
.sah-btn { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px; 
    border-radius: 12px; 
    font-weight: 700; 
    cursor: pointer; 
    border: none;
    font-size: 14px;
    text-decoration: none !important;
    gap: 10px;
    transition: all 0.2s;
}

.sah-btn-primary { 
    background: var(--sah-primary); 
    color: #fff !important; 
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2);
}

.sah-btn-primary:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(30, 41, 59, 0.3);
}

.sah-btn-secondary {
    background: #fff;
    color: var(--sah-primary) !important;
    border: 1px solid var(--sah-border-strong);
}

.sah-btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--sah-primary);
}

/* Badges */
.sah-badge { 
    padding: 6px 14px; 
    border-radius: 30px; 
    font-size: 11px; 
    font-weight: 800; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sah-badge-active, .sah-badge-approved, .sah-badge-paid { background: #dcfce7; color: #15803d; }
.sah-badge-pending { background: #fef9c3; color: #a16207; }
.sah-badge-rejected, .sah-badge-failed { background: #fee2e2; color: #b91c1c; }

/* Promo Share Chips */
.sah-share-strip {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sah-share-caption {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.sah-share-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sah-share-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.sah-share-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sah-share-icon svg {
    width: 12px;
    height: 12px;
    display: block;
}

.sah-share-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
}

.sah-share-icon-youtube {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.sah-share-icon-instagram {
    background: linear-gradient(135deg, rgba(249, 168, 212, 0.26), rgba(192, 132, 252, 0.22));
    color: #f5d0fe;
}

.sah-share-icon-facebook {
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
}

.sah-share-icon-tiktok {
    background: rgba(148, 163, 184, 0.16);
    color: #e2e8f0;
}

.sah-share-icon-whatsapp {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

/* Section Helper */
.sah-header-helper {
    max-width: 320px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--sah-text-secondary);
    text-align: right;
}

.sah-header-helper a {
    color: var(--sah-primary);
    font-weight: 700;
    text-decoration: none;
}

.sah-header-helper a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sah-dashboard-wrapper { padding: 12px; }
    .sah-header-card { padding: 24px 20px; gap: 16px; margin-bottom: 24px; }
    .sah-user-info { flex-direction: row; text-align: left; gap: 16px; }
    .sah-avatar { width: 60px; height: 60px; font-size: 24px; border-radius: 18px; border-width: 3px; }
    .sah-user-details h3 { font-size: 20px; }
    .sah-user-meta { flex-wrap: wrap; gap: 8px; }
    .sah-header-actions { width: 100%; justify-content: space-between; }
    .sah-header-actions .sah-btn { flex: 1; padding: 10px; font-size: 13px; }
    
    .sah-card-header { padding: 20px; }
    .sah-card-body { padding: 20px; }
    .sah-stats-grid { gap: 16px; }
    .sah-stat-card { padding: 20px; }
    .sah-stat-value { font-size: 30px; }
    
    .sah-auth-wrapper { margin: 20px auto 28px; padding: 18px; border-radius: 24px; }
    .sah-auth-card { padding: 24px 20px; border-radius: 22px; }
    .sah-auth-hero { flex-direction: column; gap: 14px; }
    .sah-auth-icon { width: 56px; height: 56px; border-radius: 18px; }
    .sah-auth-header h2 { font-size: 30px; }
    .sah-auth-header p { font-size: 14px; line-height: 1.65; }
    .sah-auth-sub-links { justify-content: flex-start; }
    .sah-overview-grid { gap: 16px; margin-bottom: 24px; }
    .sah-share-pill { padding: 6px 9px 6px 6px; }
    .sah-share-label { font-size: 10px; }
    .sah-header-helper {
        max-width: none;
        font-size: 11px;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .sah-user-info { flex-direction: column; text-align: center; }
    .sah-user-meta { justify-content: center; }
    .sah-header-actions { flex-direction: column; }
    .sah-header-actions a { width: 100%; }
    
    .sah-nav-container { padding: 4px; border-radius: 16px; }
    .sah-dashboard-nav a { padding: 10px 16px; font-size: 13px; }
}

@media (min-width: 992px) {
    .sah-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Onboarding Checklist */
.sah-onboarding-card {
    background: var(--sah-card-bg);
    border-radius: var(--sah-radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--sah-shadow);
    border: 1px solid var(--sah-border);
    background-image: linear-gradient(135deg, rgba(253, 239, 6, 0.05) 0%, transparent 100%);
}

.sah-onboarding-card h4 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 800;
    color: var(--sah-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sah-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.sah-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--sah-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.sah-checklist-item:hover {
    border-color: var(--sah-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.sah-check-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
}

.sah-check-icon.completed {
    background: #dcfce7;
    color: #15803d;
}

.sah-checklist-text h5 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--sah-text-primary);
}

.sah-checklist-text p {
    margin: 0;
    font-size: 13px;
    color: var(--sah-text-secondary);
    line-height: 1.5;
}
