/* Additional styles for company-plans page */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    margin-top: 80px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.breadcrumb {
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: white;
}

.plan-highlight {
    background: linear-gradient(135deg, #f8f9fa, white);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.plan-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    border: 1px solid #e9ecef;
}

.percentage-display {
    text-align: center;
    margin: 3rem 0;
}

.percentage-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.percentage-label {
    font-size: 1.2rem;
    color: var(--dark-color);
    font-weight: 600;
}

.breakdown-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    margin: 3rem 0;
}

.breakdown-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
}

.breakdown-percentage {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.breakdown-description {
    color: var(--muted-color);
    margin-top: 0.5rem;
}

.green-point-section {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    color: white;
    padding: 4rem 0;
    margin: 3rem 0;
}

.green-point-section .plan-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* New Referral Tree Design */
.referral-tree-container {
    position: relative;
    margin: 4rem 0;
    overflow-x: auto;
}

.referral-tree {
    position: relative;
    min-width: 1200px;
    padding: 2rem 0;
}

/* Root Level */
.tree-root {
    text-align: center;
    margin-bottom: 3rem;
}

.root-node {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 10;
}

.root-node::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #FF6B6B, transparent);
}

.root-node .node-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.root-node h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.root-node p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

/* Tree Levels */
.tree-level {
    margin-bottom: 3rem;
    position: relative;
}

.level-title {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.level-title h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.level-title p {
    margin: 0.5rem 0 0 0;
    color: var(--muted-color);
    font-size: 0.9rem;
}

/* Tree Branches */
.tree-branches {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.branch-line {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.branch-nodes {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.branch-node {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 150px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.branch-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.branch-node::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: var(--primary-color);
}

.branch-node .node-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.branch-node h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.commission {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
}

/* Level-specific colors */
.level-1 .branch-node {
    border-color: #FF6B6B;
}

.level-1 .branch-node .node-icon {
    color: #FF6B6B;
}

.level-1 .branch-node .commission {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
}

.level-2 .branch-node {
    border-color: #4ECDC4;
}

.level-2 .branch-node .node-icon {
    color: #4ECDC4;
}

.level-2 .branch-node .commission {
    background: linear-gradient(135deg, #4ECDC4, #6EE7DF);
}

.level-3 .branch-node {
    border-color: #45B7D1;
}

.level-3 .branch-node .node-icon {
    color: #45B7D1;
}

.level-3 .branch-node .commission {
    background: linear-gradient(135deg, #45B7D1, #67C9E1);
}

.level-4 .branch-node {
    border-color: #96CEB4;
}

.level-4 .branch-node .node-icon {
    color: #96CEB4;
}

.level-4 .branch-node .commission {
    background: linear-gradient(135deg, #96CEB4, #B8E6C8);
}

.level-5 .branch-node {
    border-color: #FFEAA7;
}

.level-5 .branch-node .node-icon {
    color: #FFB347;
}

.level-5 .branch-node .commission {
    background: linear-gradient(135deg, #FFEAA7, #FFF2C7);
    color: #333;
}

/* Tree Legend */
.tree-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.legend-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 50%;
}

.legend-item span {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .referral-tree {
        min-width: 100%;
        padding: 1rem;
    }
    
    .branch-nodes {
        gap: 1rem;
    }
    
    .branch-node {
        min-width: 120px;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .referral-tree {
        min-width: 100%;
    }
    
    .branch-nodes {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .branch-node {
        width: 100%;
        max-width: 200px;
    }
    
    .tree-legend {
        flex-direction: column;
        align-items: center;
    }
    
    .legend-item {
        width: 100%;
        justify-content: center;
    }
}

/* Old grid styles (keeping for reference) */
.referral-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.referral-level {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.referral-level:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.level-number {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.level-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.green-fund {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    color: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin: 3rem 0;
}

.fund-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.flexible-rate {
    background: linear-gradient(135deg, #f8f9fa, white);
    padding: 4rem 0;
    margin: 3rem 0;
}

.title-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .plan-card {
        padding: 2rem;
    }
    
    .referral-levels {
        grid-template-columns: 1fr;
    }
    
    .percentage-number {
        font-size: 3rem;
    }
}

/* --- Referral Tree Structure Design --- */
.referral-tree-container {
    position: relative;
    margin: 4rem 0;
    overflow-x: auto;
}
.referral-tree {
    position: relative;
    min-width: 1200px;
    padding: 2rem 0;
}
.tree-root {
    text-align: center;
    margin-bottom: 3rem;
}
.root-node {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 10;
}
.root-node::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #FF6B6B, transparent);
}
.root-node .node-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.root-node h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}
.root-node p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}
.tree-level {
    margin-bottom: 3rem;
    position: relative;
}
.level-title {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.level-title h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}
.level-title p {
    margin: 0.5rem 0 0 0;
    color: var(--muted-color);
    font-size: 0.9rem;
}
.tree-branches {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.branch-line {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}
.branch-nodes {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.branch-node {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 150px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.branch-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}
.branch-node::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: var(--primary-color);
}
.branch-node .node-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.branch-node h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
}
.commission {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
}
.level-1 .branch-node {
    border-color: #FF6B6B;
}
.level-1 .branch-node .node-icon {
    color: #FF6B6B;
}
.level-1 .branch-node .commission {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
}
.level-2 .branch-node {
    border-color: #4ECDC4;
}
.level-2 .branch-node .node-icon {
    color: #4ECDC4;
}
.level-2 .branch-node .commission {
    background: linear-gradient(135deg, #4ECDC4, #6EE7DF);
}
.level-3 .branch-node {
    border-color: #45B7D1;
}
.level-3 .branch-node .node-icon {
    color: #45B7D1;
}
.level-3 .branch-node .commission {
    background: linear-gradient(135deg, #45B7D1, #67C9E1);
}
.level-4 .branch-node {
    border-color: #96CEB4;
}
.level-4 .branch-node .node-icon {
    color: #96CEB4;
}
.level-4 .branch-node .commission {
    background: linear-gradient(135deg, #96CEB4, #B8E6C8);
}
.level-5 .branch-node {
    border-color: #FFEAA7;
}
.level-5 .branch-node .node-icon {
    color: #FFB347;
}
.level-5 .branch-node .commission {
    background: linear-gradient(135deg, #FFEAA7, #FFF2C7);
    color: #333;
}
.tree-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.legend-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 50%;
}
.legend-item span {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}
@media (max-width: 1200px) {
    .referral-tree {
        min-width: 100%;
        padding: 1rem;
    }
    .branch-nodes {
        gap: 1rem;
    }
    .branch-node {
        min-width: 120px;
        padding: 1rem;
    }
}
@media (max-width: 768px) {
    .referral-tree {
        min-width: 100%;
    }
    .branch-nodes {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .branch-node {
        width: 100%;
        max-width: 200px;
    }
    .tree-legend {
        flex-direction: column;
        align-items: center;
    }
    .legend-item {
        width: 100%;
        justify-content: center;
    }
} 