
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6fa;
    color: #14213d;
}

button, input, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.admin-header {
    background: #14213d;
    color: white;
    padding: 20px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header a {
    color: white;
    text-decoration: none;
}

.brand {
    font-size: 22px;
    font-weight: bold;
}

.admin-container {
    width: min(1200px, 92%);
    margin: 40px auto;
}

.login-card {
    width: min(420px, 100%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin: 60px auto;
    box-shadow: 0 5px 25px rgba(0,0,0,.05);
}

.login-card h1 {
    margin-bottom: 10px;
}

.login-card p {
    color: #697586;
    margin-bottom: 20px;
}

form label {
    display: block;
    margin: 16px 0 8px;
    font-weight: bold;
    font-size: 14px;
}

form input:not([type="checkbox"]),
form textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #dce2ec;
    border-radius: 7px;
    outline: none;
}

form input:focus,
form textarea:focus {
    border-color: #155eef;
}

form button {
    width: 100%;
    background: #155eef;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 7px;
    margin-top: 20px;
    font-weight: bold;
}

form button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-heading p {
    color: #697586;
    margin-top: 8px;
}

.logout-button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 7px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
    align-items: start;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,.04);
}

.admin-card h2 {
    margin-bottom: 12px;
}

.admin-card > p {
    color: #697586;
    margin-bottom: 20px;
}

.hint {
    color: #697586;
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.5;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

#previewContainer {
    margin-top: 15px;
}

#imagePreview {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f4f6fa;
    border-radius: 8px;
}

.secondary-button {
    background: #64748b;
}

.admin-product {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e5eaf2;
    padding: 15px 0;
}

.admin-product img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 7px;
}

.admin-product-info {
    flex: 1;
    min-width: 0;
}

.admin-product-info h3 {
    font-size: 15px;
    margin-bottom: 7px;
    overflow-wrap: anywhere;
}

.admin-product-info p {
    font-size: 13px;
    color: #155eef;
    font-weight: bold;
}

.admin-product-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.admin-product-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
}

.edit-button {
    background: #dbeafe;
    color: #155eef;
}

.delete-button {
    background: #fee2e2;
    color: #dc2626;
}

.message {
    margin-top: 15px;
    font-size: 14px;
    color: #155eef;
    line-height: 1.5;
}

.message.error {
    color: #dc2626;
}

.message.success {
    color: #15803d;
}

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

@media(max-width: 500px) {
    .admin-header {
        padding: 18px 4%;
    }

    .admin-container {
        margin: 25px auto;
    }

    .admin-card {
        padding: 18px;
    }

    .dashboard-heading {
        align-items: flex-start;
        gap: 15px;
    }

    .admin-product {
        align-items: flex-start;
    }

    .admin-product-actions {
        flex-direction: column;
    }
}

/* FORGOT PASSWORD */

.forgot-password {
    display: block;
    width: fit-content;
    margin-top: 12px;
    color: #155eef;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.forgot-password:focus-visible {
    outline: 2px solid #155eef;
    outline-offset: 3px;
}

.forgot-password:active {
    opacity: 0.7;
}