<style>
	.upgrade-container {
		max-width: 800px;
		margin: 0 auto;
		padding: 30px 20px;
	}
	
	.success-card {
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		border-radius: 20px;
		padding: 40px;
		box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
		color: white;
		text-align: center;
		position: relative;
		overflow: hidden;
	}
	
	.success-card::before {
		content: '';
		position: absolute;
		top: -50%;
		right: -50%;
		width: 200%;
		height: 200%;
		background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
		animation: pulse 3s ease-in-out infinite;
	}
	
	@keyframes pulse {
		0%, 100% { transform: scale(1); opacity: 0.5; }
		50% { transform: scale(1.1); opacity: 0.8; }
	}
	
	.success-icon {
		font-size: 80px;
		margin-bottom: 20px;
		display: inline-block;
		animation: bounceIn 0.8s ease-out;
	}
	
	@keyframes bounceIn {
		0% { transform: scale(0); opacity: 0; }
		50% { transform: scale(1.2); }
		100% { transform: scale(1); opacity: 1; }
	}
	
	.success-card h2 {
		font-size: 32px;
		font-weight: 700;
		margin-bottom: 15px;
		text-shadow: 0 2px 10px rgba(0,0,0,0.2);
	}
	
	.success-card h3 {
		font-size: 24px;
		font-weight: 500;
		margin-bottom: 10px;
		opacity: 0.95;
	}
	
	.success-card p {
		font-size: 18px;
		opacity: 0.9;
		margin: 0;
		line-height: 1.6;
	}
	
	.info-banner {
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		border-radius: 15px;
		padding: 30px;
		margin-bottom: 30px;
		box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
		color: white;
		position: relative;
		overflow: hidden;
	}
	
	.info-banner::before {
		content: '';
		position: absolute;
		top: -50px;
		right: -50px;
		width: 200px;
		height: 200px;
		background: rgba(255,255,255,0.1);
		border-radius: 50%;
	}
	
	.info-banner h4 {
		font-size: 24px;
		font-weight: 600;
		margin-bottom: 15px;
		display: flex;
		align-items: center;
		gap: 12px;
	}
	
	.info-banner h4 i {
		font-size: 28px;
	}
	
	.info-banner h5 {
		font-size: 20px;
		font-weight: 500;
		margin-bottom: 12px;
	}
	
	.info-banner p {
		font-size: 16px;
		line-height: 1.7;
		margin-bottom: 8px;
		opacity: 0.95;
	}
	
	.upgrade-card {
		background: #ffffff;
		border-radius: 20px;
		box-shadow: 0 10px 40px rgba(0,0,0,0.1);
		overflow: hidden;
		border: none;
	}
	
	.upgrade-header {
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		padding: 25px 30px;
		color: white;
		position: relative;
	}
	
	.upgrade-header h3 {
		margin: 0;
		font-size: 24px;
		font-weight: 600;
		display: flex;
		align-items: center;
		gap: 12px;
	}
	
	.upgrade-header h3 i {
		font-size: 28px;
	}
	
	.upgrade-body {
		padding: 40px;
	}
	
	.form-group {
		margin-bottom: 25px;
	}
	
	.form-group label {
		font-weight: 600;
		color: #333;
		margin-bottom: 10px;
		display: block;
		font-size: 14px;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}
	
	.form-control {
		border: 2px solid #e0e0e0;
		border-radius: 10px;
		padding: 12px 18px;
		font-size: 15px;
		transition: all 0.3s ease;
		height: auto;
	}
	
	.form-control:focus {
		border-color: #667eea;
		box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
		outline: none;
	}
	
	.form-control[readonly] {
		background-color: #f8f9fa;
		color: #6c757d;
		cursor: not-allowed;
	}
	
	.upgrade-footer {
		padding: 25px 40px;
		background: #f8f9fa;
		display: flex;
		justify-content: space-between;
		gap: 15px;
		align-items: center;
	}
	
	.btn-modern {
		padding: 12px 30px;
		border-radius: 10px;
		font-weight: 600;
		font-size: 15px;
		transition: all 0.3s ease;
		border: none;
		cursor: pointer;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}
	
	.btn-primary-modern {
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		color: white;
		box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
	}
	
	.btn-primary-modern:hover {
		transform: translateY(-2px);
		box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
		color: white;
	}
	
	.btn-default-modern {
		background: #ffffff;
		color: #667eea;
		border: 2px solid #667eea;
	}
	
	.btn-default-modern:hover {
		background: #667eea;
		color: white;
		transform: translateY(-2px);
	}
	.text-muted{
		text-transform: none;
		font-size: 12px;
		font-weight: 400;
		color: #6c757d;
		margin-top: 8px;
		text-align: left;
		letter-spacing: 0.5px;
	}
	
	@media (max-width: 768px) {
		.upgrade-container {
			padding: 20px 15px;
		}
		
		.success-card, .info-banner {
			padding: 25px 20px;
		}
		
		.upgrade-body {
			padding: 25px 20px;
		}
		
		.upgrade-footer {
			padding: 20px;
			flex-direction: column;
		}
		
		.btn-modern {
			width: 100%;
		}
	}
</style>

<div class="upgrade-container">
	<?php if(LICENSE==MY_LICENSE): ?>
		<div class="success-card">
			<div class="success-icon">
				<i class="fas fa-check-circle"></i>
			</div>
			<h2>🎉 Congratulations!</h2>
			<h3>Welcome to <?= settings()['site_name']??'Qrexorder';?></h3>
			<p>You are successfully using the <strong>Extended License</strong></p>
			<p style="margin-top: 15px; font-size: 16px;">Enjoy all premium features and unlimited possibilities!</p>
		</div>
	<?php else: ?>
		<div class="info-banner">
			<h4>
				<i class="fas fa-rocket"></i>
				Upgrade to Extended License
			</h4>
			<h5>Welcome to <?= settings()['site_name']??'Qrexorder';?>!</h5>
			<p>✨ Unlock the full potential of your platform by upgrading from Regular license to <strong>Extended License</strong></p>
			<p>🚀 Get access to premium features, priority support, and exclusive updates</p>
			<p>📝 Simply enter your extended license code below to get started</p>
		</div>

		<div class="upgrade-card">
			<div class="upgrade-header">
				<h3>
					<i class="fas fa-key"></i>
					<?= !empty(lang('upgrade'))?lang('upgrade'):"Upgrade";?>
				</h3>
			</div>
			
			<form action="<?= base_url('admin/dashboard/apply_upgrade') ?>" method="post" class="skill_form" enctype="multipart/form-data">
				<div class="upgrade-body">
					<!-- csrf token -->
					<input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">

					<div class="form-group">
						<label for="old_code">
							<i class="fas fa-lock"></i> 
							<?= !empty(lang('old_purchase_code'))?lang('old_purchase_code'):"Current Purchase Code";?> <small class="text-muted">(Regular license purchase code)</small>
						</label>
						<input type="text" name="old_code" id="old_code" class="form-control" 
							placeholder="<?= !empty(lang('old_purchase_code'))?lang('old_purchase_code'):"Current Purchase Code";?>" 
							value="<?= !empty($settings['purchase_code'])?html_escape($settings['purchase_code']):""; ?>" 
							readonly>
					</div>

					<div class="form-group">
						<label for="purchase_code">
							<i class="fas fa-star"></i> 
							<?= !empty(lang('new_purchase_code'))?lang('new_purchase_code'):"New Extended Purchase Code";?>
						</label>
						<input type="text" name="purchase_code" id="purchase_code" class="form-control" 
							placeholder="<?= !empty(lang('new_purchase_code'))?lang('new_purchase_code'):"Enter your extended license code";?>" 
							value="" required>
						<small style="color: #6c757d; margin-top: 8px; display: block;">
							<i class="fas fa-info-circle"></i> Enter your new extended license code to upgrade
						</small>
					</div>

					<input type="hidden" name="id" value="<?= isset($settings['id']) && $settings['id']!=0?$settings['id']:0 ?>">
					<input type="hidden" name="site_id" value="<?= $settings['site_id'] ;?>">
					<input type="hidden" name="site_url" value="<?= $settings['site_url'] ;?>">
				</div>
				
				<div class="upgrade-footer">
					<?php if(isset($settings['id']) && $settings['id'] !=0): ?>
						<a href="<?= base_url('admin/dashboard/'); ?>" class="btn btn-modern btn-default-modern">
							<i class="fas fa-times"></i> <?= !empty(lang('cancel'))?lang('cancel'):"Cancel";?>
						</a>
					<?php endif; ?>
					<button type="submit" name="register" class="btn btn-modern btn-primary-modern" style="margin-left: auto;">
						<i class="fas fa-check"></i> <?= !empty(lang('submit'))?lang('submit'):"Upgrade Now";?>
					</button>
				</div>
			</form>
		</div>
	<?php endif; ?>
</div>


