/* ========================================
   Modern Plans Redesign
   ======================================== */

.plans-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 20px 0;
    margin-bottom: 30px;
}

.plancard-modern {
    background: var(--Bgcolor-default);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.plancard-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #369B39 0%, #2d7d2e 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plancard-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(102, 126, 234, 0.3);
}

.plancard-modern:hover::before {
    opacity: 1;
}

.plancard-modern.active-plan {
    border-color: #369B39;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.plancard-modern.active-plan::before {
    opacity: 1;
}

.active-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.4);
}

.plan-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.plan-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.plan-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plan-title-section {
    flex: 1;
}

.plan-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--Textcolor-default);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-amount {
    font-size: 28px;
    font-weight: 800;
    color: #369B39;
    background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 14px;
    color: var(--Textcolor-secondary);
    font-weight: 500;
}

.plan-description {
    margin-bottom: 24px;
    min-height: 80px;
    flex-grow: 1;
}

.plan-description p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--Textcolor-secondary);
    margin: 0;
}

.view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #369B39;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.view-more-link:hover {
    color: #2d7d2e;
    gap: 8px;
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.btn-plan-subscribe,
.btn-plan-active,
.btn-plan-cancel,
.btn-plan-edit,
.btn-plan-delete {
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-plan-subscribe {
    background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-plan-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-plan-subscribe svg {
    transition: transform 0.3s ease;
}

.btn-plan-subscribe:hover svg {
    transform: translateX(4px);
}

.btn-plan-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 2px solid #10b981;
    cursor: default;
}

.btn-plan-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid transparent;
}

.btn-plan-cancel:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.btn-plan-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 2px solid transparent;
}

.btn-plan-edit:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
}

.btn-plan-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid transparent;
}

.btn-plan-delete:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.btn-create-plan-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin: 20px 0;
}

.btn-create-plan-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-create-plan-modern svg {
    transition: transform 0.3s ease;
}

.btn-create-plan-modern:hover svg {
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 992px) {
    .plans-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .plans-grid-modern {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 15px 0;
    }

    .plancard-modern {
        padding: 20px;
    }

    .plan-title {
        font-size: 20px;
    }

    .price-amount {
        font-size: 24px;
    }

    .plan-icon {
        width: 56px;
        height: 56px;
    }

    .btn-plan-subscribe,
    .btn-plan-active,
    .btn-plan-cancel,
    .btn-plan-edit,
    .btn-plan-delete {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .plancard-modern {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    }

    .plancard-modern:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    }
}
