/* =========================
   AUTHENTICATION PAGES
========================= */

.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background-color: white;
    padding: 35px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.auth-card h1 {
    text-align: center;
    margin-top: 0;
    color: #2563eb;
}

.auth-card > p {
    text-align: center;
    color: #555;
}

.auth-card form {
    margin-top: 25px;
}

.auth-card label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.auth-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}

.auth-card input:focus {
    outline: none;
    border-color: #2563eb;
}

.auth-card button {
    width: 100%;
    border: none;
    cursor: pointer;
}


/* =========================
   DASHBOARD
========================= */

.dashboard-container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    padding: 45px 25px 70px;
}


/* =========================
   WELCOME SECTION
========================= */

.dashboard-welcome {
    background: linear-gradient(
        135deg,
        #ffffff,
        #f3f7ff
    );
    padding: 45px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.dashboard-label,
.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #2563eb;
    margin-bottom: 8px;
}

.dashboard-welcome h1 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 32px;
}

.dashboard-welcome p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    max-width: 650px;
}


/* =========================
   GENERAL DASHBOARD CARDS
========================= */

.add-product-section,
.edit-product-section,
.products-section {
    max-width: none;
    padding: 0;
    margin: 0 0 25px;
}

.product-form-card,
.products-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.04);
}


/* =========================
   SECTION HEADINGS
========================= */

.section-heading {
    margin-bottom: 25px;
}

.section-heading h2,
.products-heading h2 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 24px;
}

.section-heading p,
.products-heading p {
    margin: 0;
    color: #64748b;
}


/* =========================
   FORM
========================= */

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.form-group {
    flex: 1;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    color: #111827;
    font-size: 15px;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* =========================
   BUTTONS
========================= */

.product-form-card .primary-button {
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 12px 22px;
}

.primary-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.secondary-button {
    cursor: pointer;
}


/* =========================
   MESSAGES
========================= */

.product-message {
    margin: 15px 0 0;
    font-size: 14px;
    font-weight: 600;
}

.success-message {
    color: #15803d;
}

.error-message {
    color: #dc2626;
}


/* =========================
   PRODUCTS
========================= */

.products-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.products-heading h2 {
    margin-top: 0;
}

.no-products-message {
    text-align: center;
    padding: 35px 20px;
    color: #64748b;
    background-color: #f8fafc;
    border-radius: 10px;
    margin: 0;
}


/* =========================
   PRODUCT TABLE
========================= */

.products-table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.products-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.products-table th {
    background-color: #f8fafc;
    color: #475569;
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
}

.products-table td {
    padding: 15px;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #eef0f3;
}

.products-table tbody tr:last-child td {
    border-bottom: none;
}

.products-table tbody tr:hover {
    background-color: #f8fafc;
}


/* =========================
   ACTION BUTTONS
========================= */

.edit-button,
.delete-button {
    border: none;
    border-radius: 6px;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 5px;
}

.edit-button {
    background-color: #eff6ff;
    color: #2563eb;
}

.edit-button:hover {
    background-color: #dbeafe;
}

.delete-button {
    background-color: #fef2f2;
    color: #dc2626;
}

.delete-button:hover {
    background-color: #fee2e2;
}


/* =========================
   EDIT BUTTONS
========================= */

.edit-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.edit-buttons .primary-button,
.edit-buttons .secondary-button {
    border: none;
    cursor: pointer;
}


/* =========================
   DASHBOARD LOGOUT
========================= */

.dashboard-actions {
    max-width: none;
    padding: 10px 0 0;
    margin: 0;
    text-align: center;
}

#dashboard-logout-button {
    padding: 11px 25px;
    font-weight: 600;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .dashboard-container {
        padding: 30px 15px 50px;
    }

    .dashboard-welcome {
        padding: 30px 25px;
        border-radius: 12px;
    }

    .dashboard-welcome h1 {
        font-size: 27px;
    }

    .dashboard-welcome p {
        font-size: 15px;
    }

    .product-form-card,
    .products-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .products-heading {
        display: block;
    }

    .products-table-container {
        margin-top: 5px;
    }

    .products-table th,
    .products-table td {
        padding: 12px;
    }

    .edit-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .edit-buttons button {
        width: 100%;
    }
}


/* =========================
   SMALL PHONES
========================= */

@media (max-width: 480px) {

    .dashboard-container {
        padding: 20px 12px 40px;
    }

    .dashboard-welcome {
        padding: 25px 20px;
    }

    .dashboard-welcome h1 {
        font-size: 24px;
    }

    .product-form-card,
    .products-card {
        padding: 20px 15px;
    }

    .section-heading h2,
    .products-heading h2 {
        font-size: 21px;
    }

    .form-group input {
        padding: 12px;
    }

    .products-table {
        min-width: 680px;
    }

    .edit-button,
    .delete-button {
        display: block;
        width: 100%;
        margin: 3px 0;
    }
}