body {
    width: 100%;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding: 0;
}

header {
    background: #333;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 20px;
}

nav a {
    color: #fff;
    margin-left: 10px;
    text-decoration: none;
    background: #555;
    padding: 6px 10px;
    border-radius: 5px;
}

nav a:hover {
    background: #ff9800;
}

main {
    padding: 20px;
}

h2 {
    text-align: center;
    color: #333;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

th, td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background: #ff9800;
    color: #fff;
}

td img {
    border-radius: 4px;
}

.btn {
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.edit {
    background: #4CAF50;
}

.delete {
    background: #F44336;
}

.btn:hover {
    opacity: 0.8;
}

footer {
    text-align: center;
    background: #333;
    color: white;
    padding: 10px;
    margin-top: 40px;
}
/* --- Add Product Form --- */
/* --- ADD PRODUCT FORM --- */
.form-container {
    display: flex;
    justify-content: center;
    padding: 40px;
    background: #f8f9fa;
    min-height: 100vh;
}

.product-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 30px;
    width: 100%;
    max-width: 520px;
}

.product-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.product-form label {
    display: block;
    font-weight: 600;
    margin-top: 12px;
    color: #444;
}

.product-form input[type="text"],
.product-form input[type="number"],
.product-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    margin-top: 5px;
    transition: border 0.3s;
}

.product-form input:focus,
.product-form textarea:focus {
    border-color: #007bff;
}

.product-form textarea {
    resize: none;
    height: 100px;
}

/* Disable scroll/spin on number input */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] { -moz-appearance: textfield; }

/* --- FILE UPLOAD STYLE --- */
.file-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f3f5;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 6px;
    cursor: pointer;
}

.file-label {
    background: #007bff;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.file-label:hover {
    background: #0056b3;
}

.file-name {
    color: #555;
    font-size: 13px;
    flex: 1;
    text-align: right;
    margin-left: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- SUBMIT BUTTON --- */
.product-form .btn.primary {
    width: 100%;
    margin-top: 20px;
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.product-form .btn.primary:hover {
    background: #0056b3;
}
body.login-body {
    font-family: Poppins, sans-serif;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 1rem;
    color: #333;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.login-container button {
    width: 100%;
    background: #4CAF50;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.login-container button:hover {
    background: #45a049;
}

.error {
    color: red;
    margin-bottom: 10px;
}
/* --- Layout --- */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f4f5f7;
    display: flex;
}

.dashboard-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 240px;
    background: #111827;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: #2563eb;
    color: #fff;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 30px;
}

header h1 {
    color: #111827;
}

/* --- Stats --- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
}

.card h3 {
    margin-bottom: 10px;
    color: #555;
}

.card p {
    font-size: 22px;
    font-weight: bold;
    color: #2563eb;
}

/* --- Table --- */
.products table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.products th, .products td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.products th {
    background: #f1f5f9;
    color: #111827;
}

.products tr:hover {
    background: #f9fafb;
}

.products img {
    border-radius: 8px;
}

/* --- Buttons --- */
.btn {
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn.edit {
    background: #3b82f6;
    color: #fff;
}

.btn.delete {
    background: #ef4444;
    color: #fff;
}

.btn:hover {
    opacity: 0.8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        padding: 15px;
    }
}

/* ============ PROFESSIONAL FILE UPLOAD STYLING ============ */

.file-upload-container {
    margin: 15px 0;
    position: relative;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 180px;
    border: 2px dashed #007bff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f4ff 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}

.file-upload-label:hover {
    border-color: #0056b3;
    background: linear-gradient(135deg, #e8f0ff 0%, #dfe8ff 100%);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.15);
}

.file-upload-label svg {
    color: #007bff;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-upload-label:hover svg {
    color: #0056b3;
    transform: scale(1.1);
}

.file-upload-label span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-top: 10px;
}

.file-upload-label:hover span {
    color: #0056b3;
}

/* Image Preview */
.image-preview {
    position: relative;
    margin-top: 15px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Gallery Preview for Multiple Images */
.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

#galleryContainer {
    display: contents;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.gallery-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    font-size: 16px;
}
