<?php 
include 'header.php';
?>

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Master Produk - UMKM Galeri 3D</title>
<style>
body {
    background: #f3f4f6;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}
.container {
  	max-width: 1200px;
    margin: 5px auto;
    padding: 0 30px;
}
/* Umum (untuk semua perangkat) */
.button-row .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

/* Untuk tampilan HP (maksimal 767px) */
@media (max-width: 767px) {
  .button-row {
    display: block;
    margin-top: 15px;
  }
  .button-row .col-md-6 {
    width: 100%;
    padding: 0 10px;
  }
  .button-row .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Untuk tampilan Desktop (min 768px) */
@media (min-width: 768px) {
  .button-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 40px;
  }
  .button-row .col-md-6 {
    flex: 0 0 48%;
  }
}
</style>
<div class="container">
	<h2 style=" width: 100%; border-bottom: 4px solid gray"><b>Tambah Admin</b></h2>

	<form action="proses/tambah_admin.php" method="POST">
		<div class="row">
			 <div class="col-md-6">
				<div class="form-group">
					<label>Toko</label>
					<input type="text" class="form-control" name="nama_toko" placeholder="Masukkan Toko" required>
				</div>
			</div>

            <div class="col-md-6">
				<div class="form-group">
					<label>Nama</label>
					<input type="text" class="form-control" name="nama_admin" placeholder="Masukkan Nama" required>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="col-md-6">
				<div class="form-group">
					<label>Username</label>
					<input type="text" class="form-control" name="username" placeholder="Masukkan Username" required>
				</div>
			</div>

			<div class="col-md-6">
				<div class="form-group">
					<label>Password</label>
					<input type="password" class="form-control" name="password" placeholder="Masukkan Password" required>
				</div>
			</div>
		</div>
		
		<div class="row">
			<div class="col-md-6">
				<div class="form-group">
					<label>Role</label>
					<select class="form-control" name="level" required>
						<option value="">-- Pilih Level --</option>
						<option value="admin">Admin</option>
						<option value="kasir">Kasir</option>
						<option value="cabang">Cabang</option>
					</select>
				</div>
			</div>
		</div>

		<div class="row button-row" style="margin-top: 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px;">
			<div class="col-md-6 mb-2">
				<button type="submit" class="btn btn-warning btn-block">
				<i class="glyphicon glyphicon-edit"></i> Edit
				</button>
			</div>
			<div class="col-md-6 mb-2">
				<a href="m_admin.php" class="btn btn-danger btn-block">
				<i class="glyphicon glyphicon-remove"></i> Cancel
				</a>
			</div>
		</div>
	</form>
</div>

</body>
</html>
