body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    min-height: 100vh; /* allow scrolling if content is tall */
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl; /* Right-to-left for Arabic */
    /* vertical gradient: dark blue top → light blue bottom */
    background: linear-gradient(to bottom, #1a4b8d, #6fc3f9);
}

.login-container {
    background: white;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%;            /* responsive width for small screens */
    max-width: 400px;      /* max width for desktops */
    text-align: right;
}

.login-container h1 {
    margin-bottom: 30px;
    color: #3a8dde;
    text-align: center;
}

* {
    box-sizing: border-box; /* ensures padding & border stay inside width */
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;       /* full width of container */
    max-width: 100%;   /* prevent overflow */
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    text-align: right; /* for Arabic text */
}

.login-container button {
    width: 100%;
    padding: 12px 15px;
    margin-top: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    color: white;
    background: linear-gradient(135deg, #3a8dde, #6fc3f9);
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: linear-gradient(135deg, #6fc3f9, #3a8dde);
}

.error-message {
    color: red;
    margin-top: 10px;
    font-size: 14px;
    text-align: right;
}

/* index *//* index *//* index *//* index */
/* Dashboard container */
/* Dashboard container */

.dashboard-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    color: #333;
    text-align: right;
}

/* Dashboard heading */
.dashboard-container h1 {
    text-align: center;
    font-size: 28px;
    color: #fff;
}

/* Cards wrapper as grid */
.cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* White cards with icon */
.dashboard-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    color: #1a4b8d;
    text-decoration: none;
    font-size: 18px;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card i {
    margin-bottom: 15px;
}

/* Hover effect */
.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

/* Logout button (reuse styles with smaller hover effect) */
.logout-button {
    margin-top: 40px;
    padding: 12px 20px;
    width: 200px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    color: white;
    background: linear-gradient(to bottom, #1a4b8d, #6fc3f9);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.logout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .dashboard-card {
        padding: 20px;
        font-size: 16px;
    }
    .logout-button {
        width: 100%;
    }
}

/* products *//* products *//* products */

/* Form container styling */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.form-container label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
    color: #1a4b8d;
}

.form-container input,
.form-container select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

/* Default desktop/tablet style */
.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Scrollable on small screens only */
@media (max-width: 600px) {
    .products-table {
        display: block;
        overflow-x: auto;
    }

    .products-table th, .products-table td {
        white-space: nowrap;
        padding: 8px;
        font-size: 14px;
    }
}

.products-table th,
.products-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.products-table th {
    background: #1a4b8d;
    color: white;
}

.products-table tr:hover {
    background: #f1f1f1;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .form-container {
        padding: 20px;
    }
    .products-table th,
    .products-table td {
        font-size: 14px;
        padding: 8px;
    }
}

/* Separator line */
.form-separator {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 25px 0;
}

/* Navigation buttons under form */
.form-nav-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

.form-nav-buttons .dashboard-card {
    flex: 1 1 150px;
    padding: 15px;
    text-align: center;
    font-size: 16px;
}

/* SALES PAGE*//* SALES PAGE*//* SALES PAGE*/
/* SALES PAGE*//* SALES PAGE*/

/* Container */
.pos-container {
    display: flex;
    flex-direction: column;

    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Top inputs */
.pos-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pos-top input, .pos-top select {
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    flex: 1;
    transition: 0.2s all;
}

.pos-top input:focus, .pos-top select:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76,175,80,0.5);
}

/* Buttons */
.pos-btn {
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s all;
    flex-shrink: 0;
}

.pos-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.pos-btn:active {
    transform: translateY(0);
}

/* Table */
table.pos-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

table.pos-table th {
    background-color: #4CAF50;
    color: white;
    padding: 12px;
    text-align: center;
}

table.pos-table td {
    background-color: #fff;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

table.pos-table tr:hover td {
    background-color: #f1f1f1;
}

.total-row {
    font-weight: bold;
    font-size: 18px;
    text-align: right;
    background-color: #f0f0f0;
}

/* Remove button inside table */
table.pos-table button {
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s all;
}

table.pos-table button:hover {
    background-color: #e53935;
}

/* Payment dropdown */
#payment_method {
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    transition: 0.2s all;
}

#payment_method:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76,175,80,0.5);
}

/* Quantity input styling */
.pos-table td input[type="number"] {
    width: 100px;      /* fixed width for quantity */
    text-align: center;
    padding: 4px 6px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Optional: make quantity column narrow */
.pos-table th:nth-child(2),
.pos-table td:nth-child(2) {
    width: 70px;
}

.table-wrapper {
    overflow-x: auto; /* allows horizontal scroll */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    width: 100%;
}

table.pos-table {
    min-width: 600px; /* ensure table has minimum width to scroll */
}



/* Make number inputs bigger and more touch-friendly */
input[type="number"] {
    height: 45px;           /* taller field */
    font-size: 18px;        /* bigger numbers */
    padding: 0 10px;        /* more padding */
    width: 100%;            /* optional, fill container */
}

/* Chrome, Edge, Safari - make spinners a bit bigger */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    width: 30px;           /* make buttons wider */
    height: 30px;          /* make buttons taller */
    margin: 0;
}

/* Firefox - the spinner buttons */
input[type="number"] {
    -moz-appearance: textfield; /* disables tiny default arrows */
}

/* Optional: when focused, highlight field */
input[type="number"]:focus {
    border-color: #888;
    outline: none;
}

@media (max-width: 768px) {
    #numpad {
        display: none !important;
    }

    .pos-container {
        flex: 1 1 100% !important; /* full width */
        max-width: 100% !important;
    }
}

.pos-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* ensures table doesn't shrink too small */
}

.table-wrapper {
    overflow-x: auto; /* allows horizontal scroll */
}