* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: #f5f7f6;
    color: #1f2937;
}

.navbar {
    background: white;
    padding: 18px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    color: #064e3b;
}

.logo span {
    color: #16a34a;
}

.navbar a {
    text-decoration: none;
    color: #1f2937;
    margin-left: 20px;
    font-weight: 600;
}

.hero {
    padding: 70px 7%;
    text-align: center;
    background: linear-gradient(135deg, #064e3b, #16a34a);
    color: white;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 12px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 28px;
}

.search-box {
    max-width: 760px;
    margin: auto;
    display: flex;
    gap: 10px;
}

.search-box input,
.search-box select {
    padding: 14px;
    border: none;
    border-radius: 12px;
    width: 100%;
}

.search-box button {
    padding: 14px 22px;
    background: #facc15;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
}

.product-section {
    padding: 45px 7%;
}

.product-section h2 {
    color: #064e3b;
    margin-bottom: 25px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
    position: relative;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    background: #e5e7eb;
}

.badge {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
}

.product-card h3 {
    margin-top: 10px;
    font-size: 18px;
}

.category {
    color: #6b7280;
    font-size: 14px;
    margin: 6px 0;
}

.price {
    color: #064e3b;
    font-size: 20px;
    font-weight: 800;
    margin: 8px 0;
}

.stock {
    color: #6b7280;
    font-size: 14px;
}

.btn-detail,
.btn-primary {
    display: inline-block;
    background: #16a34a;
    color: white;
    padding: 11px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 14px;
}

.detail-container {
    width: 86%;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 35px;
    background: white;
    padding: 30px;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

.detail-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 18px;
    background: #e5e7eb;
}

.detail-info h1 {
    margin: 16px 0 8px;
    color: #064e3b;
}

.detail-info h2 {
    color: #16a34a;
    margin: 15px 0;
}

.detail-info form {
    margin-top: 25px;
}

.page-card,
.box {
    width: 86%;
    margin: 35px auto;
    background: white;
    padding: 28px;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

th {
    background: #f0fdf4;
    color: #064e3b;
    text-align: left;
    padding: 14px;
}

td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.btn-danger {
    background: #dc2626;
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.btn-edit {
    background: #2563eb;
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.form-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 45px 15px;
}

.form-card {
    width: 100%;
    max-width: 720px;
    background: white;
    padding: 35px;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.form-card.wide {
    max-width: 1000px;
}

.form-card h1 {
    color: #064e3b;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #d1d5db;
    border-radius: 13px;
    outline: none;
}

textarea {
    min-height: 100px;
}

button {
    background: #16a34a;
    color: white;
    border: none;
    padding: 13px 20px;
    border-radius: 13px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 18px;
}

.btn-back {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #166534;
    text-decoration: none;
    font-weight: 700;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #064e3b, #166534);
    color: white;
    padding: 28px 22px;
    position: fixed;
    height: 100vh;
}

.sidebar h2 {
    margin-bottom: 8px;
}

.sidebar p {
    color: #d1fae5;
    margin-bottom: 28px;
}

.sidebar a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.12);
}

.sidebar a:hover {
    background: rgba(255,255,255,0.25);
}

.admin-content {
    margin-left: 270px;
    width: calc(100% - 270px);
    padding: 32px;
}

.admin-content h1 {
    color: #064e3b;
    margin-bottom: 22px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
    border-left: 6px solid #16a34a;
}

.stat-card h3 {
    color: #6b7280;
    font-size: 15px;
}

.stat-card p {
    color: #064e3b;
    font-size: 26px;
    font-weight: 800;
    margin-top: 8px;
}

.table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.empty {
    text-align: center;
    color: #777;
    padding: 25px;
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .detail-container {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .admin-content {
        margin-left: 0;
        width: 100%;
        padding: 18px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 800px;
    }

    .box,
    .page-card {
        overflow-x: auto;
    }
}