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

body {
    background: #fff8f0;
    color: #333;
}

a {
    text-decoration: none;
}

/* ===== LOGIN PAGE ===== */

.login-container {
    width: 420px;
    margin: 90px auto;
    background: white;
    padding: 40px 45px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-container .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #7a1717;
    margin-bottom: 8px;
}

.login-container .logo span {
    font-size: 34px;
}

.login-container .logo h1 {
    font-size: 26px;
}

.login-container .welcome {
    color: #666;
    margin-bottom: 28px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    color: #444;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    outline: none;
    font-size: 14px;
    background: white;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #b53a1d;
    box-shadow: 0 0 0 2px rgba(181, 58, 29, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.admin-btn {
    display: inline-block;
    padding: 12px 22px;
    border: none;
    border-radius: 7px;
    background: #8b1e1e;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.admin-btn:hover {
    background: #a32620;
}

.admin-btn.full {
    width: 100%;
}

.admin-btn.secondary {
    background: #6b7280;
}

.admin-btn.secondary:hover {
    background: #4b5563;
}

.admin-btn.danger {
    background: #b91c1c;
}

.admin-btn.danger:hover {
    background: #991b1b;
}

.error-msg {
    background: #fde2e2;
    color: #8b1e1e;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

.success-msg {
    background: #e2f7e6;
    color: #1e6b2f;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

.home-link {
    display: inline-block;
    margin-top: 20px;
    color: #8b1e1e;
    font-size: 14px;
}

.home-link:hover {
    text-decoration: underline;
}

/* ===== ADMIN LAYOUT ===== */

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

.admin-sidebar {
    width: 240px;
    background: #7a1717;
    color: white;
    padding: 25px 20px;
    flex-shrink: 0;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.admin-logo span {
    font-size: 26px;
}

.admin-logo h2 {
    font-size: 19px;
}

.admin-tag {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 30px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-nav a {
    color: white;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
}

.admin-nav a.logout-link {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: white;
    padding: 20px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.admin-topbar h1 {
    font-size: 22px;
    color: #333;
}

.admin-user {
    color: #666;
    font-size: 14px;
}

.admin-content {
    padding: 30px 35px;
}

/* ===== DASHBOARD STAT CARDS ===== */

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 5px solid #b53a1d;
}

.stat-card .stat-number {
    font-size: 30px;
    font-weight: bold;
    color: #7a1717;
}

.stat-card .stat-label {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.dashboard-actions {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-actions h3 {
    margin-bottom: 15px;
    color: #333;
}

.dashboard-actions .admin-btn {
    margin-right: 12px;
    margin-bottom: 10px;
}

/* ===== PRODUCTS TABLE ===== */

.content-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
}

table.admin-table th,
table.admin-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}

table.admin-table th {
    color: #7a1717;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

table.admin-table img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

table.admin-table .row-actions a {
    margin-right: 10px;
    font-size: 13px;
    font-weight: bold;
}

table.admin-table .row-actions .edit-link {
    color: #1d6fb5;
}

table.admin-table .row-actions .delete-link {
    color: #b91c1c;
}

.product-form {
    max-width: 560px;
}

.image-preview {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

@media (max-width: 800px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
