<?php include "top.php"; 

// company details
$company = f(q("SELECT * FROM tbl_company WHERE c_id=53"));

?>
<!DOCTYPE html>
<html>
<head>
	<?php include('include/head.php'); ?>
	<title><?php echo $company['c_name']?></title>
</head>
<body class="login-body">
	<div class="login-split-container">
		<!-- Left Side: Branding Panel (Hidden on Mobile) -->
		<div class="login-split-left">
			<div class="login-left-header">
				<img src="src/images/logo.png" alt="logo" style="max-height: 40px; width: auto;">
				<h3><?php echo $company['c_name']?></h3><br>
				<!-- <h5 style="color:white;"><?php echo $company['c_name']?></h5> -->
			</div>
			
			<div class="login-left-body">
				<div class="login-left-tagline">Billing & Management Portal</div>
				<h1>Smart solutions for <span>Cable & Internet</span> networks.</h1>
				<p>Empower your business with our centralized invoice processing, real-time client tracking, and instant digital payment integrations.</p>
				
				<div class="login-features-list">
					<div class="login-feature-item">
						<div class="login-feature-icon">
							<i class="fa fa-line-chart"></i>
						</div>
						<div class="login-feature-text">
							<h4>Real-time Analytics Dashboard</h4>
							<p>Monitor daily payments, active subscriptions, and pending collections instantly.</p>
						</div>
					</div>
					<div class="login-feature-item">
						<div class="login-feature-icon">
							<i class="fa fa-credit-card"></i>
						</div>
						<div class="login-feature-text">
							<h4>Automated Digital Invoicing</h4>
							<p>Generate bills automatically and accept multiple digital payment modes.</p>
						</div>
					</div>
					<div class="login-feature-item">
						<div class="login-feature-icon">
							<i class="fa fa-ticket"></i>
						</div>
						<div class="login-feature-text">
							<h4>Support Ticket System</h4>
							<p>Track complaints, organize agent visits, and improve resolution timeframes.</p>
						</div>
					</div>
				</div>
			</div>
			
			<div class="login-left-footer">
				<p>&copy; <?php echo date('Y'); ?> <?php echo $company['c_name']?>. All rights reserved.</p>
			</div>
		</div>

		<!-- Right Side: Form Panel -->
		<div class="login-split-right">
			<div class="login-form-card">
				<!-- Mobile-only logo view -->
				<div class="login-logo-mobile">
					<img src="src/images/logo.png" alt="logo" style="max-height: 80px; width: auto;">
					<h3><?php echo $company['c_shortname']?></h3>
				</div>
				
				<h2>Welcome Back</h2>
				<p class="subtitle">Please sign in to access your administrative workspace.</p>
				
				<form action="logcheck.php" method="post">
					<div class="form-group">
						<label for="uid_input">Username or ID</label>
						<div class="input-group">
							<input type="text" class="form-control" placeholder="Enter username" name="uid" id="uid_input" required>
							<div class="input-group-append">
								<span class="input-group-text"><i class="fa fa-user" aria-hidden="true"></i></span>
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<label for="pass_input">Password</label>
						<div class="input-group">
							<input type="password" class="form-control" placeholder="Enter password" name="pass" id="pass_input" required>
							<div class="input-group-append">
								<span class="input-group-text"><i class="fa fa-lock" aria-hidden="true"></i></span>
							</div>
						</div>
					</div>
					
					<div class="row align-items-center mt-3">
						<div class="col-6">
							<div class="custom-control custom-checkbox">
								<input type="checkbox" class="custom-control-input" id="customCheck1" name="loggedin">
								<label class="custom-control-label" for="customCheck1">Remember me</label>
							</div>
						</div>
						<div class="col-6 text-right">
							<div class="forgot-password"><a href="forgot-password.php">Forgot Password?</a></div>
						</div>
					</div>
					
					<button type="submit" class="login-btn-submit">Sign In <i class="fa fa-sign-in ml-2"></i></button>
				</form>
			</div>
		</div>
	</div>
	<?php include('include/script.php'); ?>
</body>
</html>