/* ==========================================
   FANOMART - Partner Dashboard Styles
   ========================================== */

body {
    background-color: #f4f7f6;
    overflow-x: hidden;
}

.dashboard-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
}

/* ---- Sidebar Styling ---- */
.dashboard-sidebar {
    width: 260px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    height: fit-content;
    box-sizing: border-box;
}

.user-profile-brief {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: #fff3e0;
    color: #ff6600;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 2px dashed #ff9800;
}

.user-profile-brief h4 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 800;
}

.user-profile-brief p {
    margin: 5px 0 0;
    font-size: 12px;
    background: #eafaf1;
    color: #2ecc71;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
}

.dashboard-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-nav li {
    margin-bottom: 8px;
}

.dashboard-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #7f8fa6;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: 0.3s;
    cursor: pointer;
}

.dashboard-nav li a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dashboard-nav li.active a,
.dashboard-nav li a:hover {
    background: #ff6600;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.2);
}

.dashboard-nav li.logout .logout-btn {
    color: #e74c3c;
    margin-top: 15px;
    border-top: 1px solid #f1f2f6;
    border-radius: 0 0 8px 8px;
}

.dashboard-nav li.logout .logout-btn:hover {
    background: #fff0f1;
    color: #e74c3c;
    box-shadow: none;
}

/* ---- Main Content Styling ---- */
.dashboard-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    overflow: hidden;
}

/* ---- Tabs Logic ---- */
.partner-tab {
    display: none;
    animation: fadeIn 0.4s ease;
    width: 100%;
    box-sizing: border-box;
}

.partner-tab.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 140px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 900;
}

.stat-card p {
    margin: 0;
    font-size: 11px;
    color: #7f8fa6;
    font-weight: 600;
    text-transform: uppercase;
}

/* ---- Affiliate Link Box ---- */
.fano-link-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    border-left: 4px solid #ff6600;
    margin-bottom: 25px;
    box-sizing: border-box;
    display: none;
}

.fano-link-box.approved {
    display: block;
}

.fano-link-box h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 800;
}

.link-input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.link-input-group input {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
    outline: none;
    background: #f8f9fa;
}

.copy-btn {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    font-size: 13px;
}

.copy-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
}

/* ---- Reseller Rights Box ---- */
.reseller-rights-box {
    background: linear-gradient(135deg, #fff9f0 0%, #fff3e0 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.1);
    display: none;
}

.reseller-rights-box.approved {
    display: block;
}

.reseller-rights-box h4 {
    color: #d35400;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reseller-rights-box p {
    color: #555;
    font-size: 13px;
    margin-bottom: 15px;
}

.reseller-rights-box .product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 10px;
}

.reseller-rights-box .product-item .product-name {
    font-weight: bold;
    color: #2c3e50;
}

.reseller-rights-box .product-item .product-price {
    color: #e74c3c;
    font-weight: 900;
}

.btn-apply-rights {
    background: #ff6600;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-apply-rights:hover {
    background: #e65c00;
    transform: translateY(-2px);
}

.btn-apply-rights:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.badge-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
}

.badge-status.pending {
    background: #fff3cd;
    color: #856404;
}

.badge-status.approved {
    background: #d4edda;
    color: #155724;
}

.badge-status.rejected {
    background: #f8d7da;
    color: #721c24;
}

/* ---- Responsive Table Fix ---- */
.table-responsive {
    width: 100%;
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
    box-sizing: border-box;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.dashboard-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-size: 11px;
    color: #7f8fa6;
    text-transform: uppercase;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.dashboard-table td {
    padding: 12px 15px;
    font-size: 13px;
    color: #2c3e50;
    border-bottom: 1px solid #f1f2f6;
    vertical-align: middle;
}

.profit-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    display: inline-block;
    white-space: nowrap;
}

.profit-badge.ownership {
    background: #fff3e0;
    color: #ff6600;
    border: 1px solid #ffcc80;
}

.profit-badge.affiliate {
    background: #eafaf1;
    color: #2ecc71;
    border: 1px solid #a5dfb2;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    display: inline-block;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.paid {
    background: #cce5ff;
    color: #004085;
}

/* ---- Forms Styling ---- */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 13px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
    transition: 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #ff6600;
    box-shadow: 0 0 5px rgba(255, 102, 0, 0.2);
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 40px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #7f8fa6;
    font-size: 15px;
}

.toggle-password:hover {
    color: #2c3e50;
}

.password-strength-meter {
    font-size: 11px;
    font-weight: bold;
    margin-top: 5px;
    display: block;
}

.strength-low {
    color: #e74c3c;
}

.strength-medium {
    color: #f39c12;
}

.strength-strong {
    color: #2ecc71;
}

.btn-save {
    background: linear-gradient(90deg, #ff6600, #e65c00);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-save:hover {
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    transform: translateY(-2px);
}

.btn-buy-rights {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-buy-rights:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

/* ---- Pending Screen Styling ---- */
#pending-activation-screen {
    display: none;
    max-width: 650px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-top: 5px solid #ff6600;
    box-sizing: border-box;
}

#pending-activation-screen i.fa-lock {
    font-size: 50px;
    color: #ff6600;
    margin-bottom: 15px;
}

#pending-activation-screen h2 {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
}

.professional-msg {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
    background: #fdfdfd;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.whatsapp-btn {
    display: inline-block;
    background: #25D366;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background: #1ebd5a;
    transform: translateY(-3px);
    color: white;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
    }

    .dashboard-sidebar {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }

    .dashboard-content {
        padding: 15px;
    }

    .link-input-group {
        flex-direction: column;
    }

    .dashboard-stats {
        flex-direction: column;
    }

    .stat-card {
        width: 100%;
        box-sizing: border-box;
    }
}