.inventory-page {

    font-family: Arial, sans-serif;

    background-color: #f4f6f8;

    padding: 20px;
}

/* ========================= */
/* TOP BAR */
/* ========================= */

.top-bar {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    margin-top: 16px;

    gap: 12px;

    margin-bottom: 10px;
}

.role-badge {

    padding: 4px 12px;

    border-radius: 20px;

    font-size: 13px;

    font-weight: 600;
}

.badge-superuser {

    background: #dc2626;

    color: #ffffff;

    font-size: 15px;

    padding: 6px 16px;
}

.badge-user {

    background: #1e40af;

    color: #ffffff;

    font-size: 15px;

    padding: 6px 16px;
}

.badge-customer {

    background: #dc2626;

    color: #ffffff;

    font-size: 13px;

    padding: 6px 14px;

    border-radius: 5px;
}

.badge-customer:hover {

    opacity: 0.7;

    cursor: pointer;
}

.logout-link {

    padding: 6px 14px;

    background: #065f46;

color: white;

    text-decoration: none;

    border-radius: 5px;

    font-size: 13px;
}

.logout-link:hover {

    background: #064e3b;
}

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

.login-container {

    display: flex;

    justify-content: center;

    align-items: center;

    min-height: 20vh;

    margin-top: 80px;
}

.login-card {

    background: white;

    padding: 40px;

    border-radius: 10px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.1);

    width: 480px;
}

.login-error {

    background: #fee2e2;

    color: #dc2626;

    padding: 10px;

    border-radius: 5px;

    margin-bottom: 15px;

    font-size: 14px;
}

.login-hint {

    margin-top: 20px;

    padding-top: 15px;

    border-top: 1px solid #e5e7eb;

    font-size: 13px;

    color: #6b7280;
}

.login-hint p {

    margin: 4px 0;
}

/* ========================= */
/* TITLE */
/* ========================= */

.main-title {

    text-align: center;

    color: #333;

    margin-top: 48px;

    margin-bottom: 25px;

    font-size: 28px;

    font-weight: 600;
}

/* ========================= */
/* FORM LAYOUT */
/* ========================= */

.form-container {

    display: flex;

    gap: 20px;

    align-items: flex-start;

    margin-bottom: 40px;
}

/* ========================= */
/* FORM CARD */
/* ========================= */

.form-card {

    background: white;

    padding: 20px;

    border-radius: 10px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.1);

    width: 320px;
}

.wide-card {

    width: 720px;
}

/* ========================= */
/* INPUTS */
/* ========================= */

form input,
form select {

    width: 100%;

    padding: 10px;

    margin-top: 5px;

    border-radius: 5px;

    border: 1px solid #ccc;

    box-sizing: border-box;

    font-size: 15px;
}

/* ========================= */
/* GLOBAL BUTTON */
/* ========================= */

button {

    width: 100%;

    background-color: #2d89ef;

    color: white;

    border: none;

    cursor: pointer;

    padding: 10px;

    margin-top: 10px;

    border-radius: 5px;
}

button:hover {

    background-color: #1b5fbf;
}

/* ========================= */
/* CATEGORY TOOLBAR */
/* ========================= */

.category-row {

    display: flex;

    gap: 12px;

    flex-wrap: nowrap;
}

.menu-section-divider {

    font-size: 13px;

    font-weight: 600;

    color: #6b7280;

    text-transform: uppercase;

    letter-spacing: 0.05em;

    border-top: 1px solid #e5e7eb;

    padding-top: 12px;

    margin-top: 12px;

    margin-bottom: 8px;
}

.inline-form {

    display: flex;

    flex-direction: column;

    width: 160px;
}

.inline-column {

    display: flex;

    flex-direction: column;

    gap: 10px;

    width: auto;
}

.inline-top-row {

    display: flex;

    flex-direction: row;

    gap: 16px;

    align-items: flex-start;
}

.inline-form-inner {

    display: flex;

    flex-direction: column;

    width: 160px;
}

.inline-form-upload {

    width: 220px;
}

.file-input-wrapper {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 6px;
}

.btn-choose-file {

    display: inline-block;

    padding: 5px 10px;

    font-size: 13px;

    background-color: #3b82f6;

    color: white;

    border-radius: 6px;

    cursor: pointer;

    margin: 0;

    white-space: nowrap;
}

.btn-choose-file:hover {

    background-color: #2563eb;
}

.file-input-hidden {

    display: none;
}

.file-status-icon {

    font-size: 18px;

    font-weight: 700;

    line-height: 1;
}

.file-none {

    color: #dc2626;
}

.file-selected {

    color: #16a34a;
}

/* ========================= */
/* INVENTORY LAYOUT */
/* ========================= */

.category-card {

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 15px;

    margin-bottom: 20px;

    width: 960px;

    position: relative;

    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

/* ========================= */
/* CATEGORY TITLE */
/* ========================= */

.category-title {

    padding-left: 40px;

    font-size: 18px;

    text-decoration: underline;

    color: #444;

    font-weight: bold;

    margin-bottom: 0;
}

.category-delete-form {
    margin: 0;
    padding: 0;
    display: inline;
}

.btn-delete-category {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    opacity: 0.7;
}

.btn-delete-category:hover {
    opacity: 1;
}

.btn-remove-image {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    opacity: 0.7;
    align-self: flex-start;
}

.btn-remove-image:hover {
    opacity: 1;
}

/* ========================= */
/* MOVE BUTTONS */
/* ========================= */

.category-card .customer-category-header {

    padding-left: 45px;
}

.category-actions {

    position: absolute;

    top: 10px;

    left: 10px;

    display: flex;

    flex-direction: column;

    gap: 5px;
}

.move-form {

    display: inline-flex;

    flex-direction: column;

    gap: 5px;

    margin: 0;

    width: fit-content;
}

.move-form button {

    width: 26px;

    height: 26px;

    min-width: 26px;

    padding: 0;

    margin: 0;

    font-size: 16px;

    font-weight: bold;

    background-color: #f0f0f0 !important;

    color: #333;

    border: 1px solid #ccc;

    border-radius: 3px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;
}

.move-form button:hover {

    background-color: #e0e0e0;
}

/* ========================= */
/* PRODUCT LIST */
/* ========================= */

.product-list {

    list-style: none;

    padding: 0;

    margin: 0;
}

/* ========================= */
/* PRODUCT ROW */
/* ========================= */

.product-row {

    display: flex;

    align-items: center;

    padding: 10px 0;

    border-bottom: 1px solid #eee;
}

/* ========================= */
/* PRODUCT INFO */
/* ========================= */

.product-info {

    display: flex;

    align-items: center;

    padding-left: 40px;

    min-width: 320px;

    flex-wrap: wrap;
}

.product-name-qty {

    display: flex;

    align-items: center;

    gap: 6px;

    flex-wrap: nowrap;
}

.flag-bracket {

    font-size: 13px;

    color: #6b7280;
}

.product-price-tag {

    margin-left: 8px;
}

.flag-alert {

    font-size: 22px;

    color: #dc2626;
}

.qty {

    font-size: 12px;

    color: #666;
}

/* ========================= */
/* ACTIONS */
/* ========================= */

.actions {

    display: flex;

    align-items: center;

    gap: 20px;

    margin-left: auto;
}

/* ========================= */
/* STOCK FORMS */
/* ========================= */

.qty-form {

    display: flex;

    align-items: center;

    gap: 5px;

    margin: 0;
}

.qty-form input {

    width: 60px;

    padding: 5px;

    margin: 0;

    text-align: center;

    font-size: 12px;
}

.qty-form button {

    width: auto;

    padding: 6px 10px;

    margin: 0;
}

.btn-delete-product {

    background: none !important;

    border: none !important;

    color: #dc2626 !important;

    font-size: 20px;

    font-weight: 700;

    line-height: 1;

    padding: 4px 8px !important;

    cursor: pointer;

    box-shadow: none !important;

    opacity: 0.75;
}

.btn-delete-product:hover {

    opacity: 1;

    background: none !important;
}

/* ========================= */
/* EMPTY STATE */
/* ========================= */

.empty-state {

    padding-left: 40px;

    color: #888;

    font-style: italic;
}

/* ========================= */
/* HEADINGS */
/* ========================= */

h2 {

    font-size: 18px;

    font-weight: 500;

    margin-bottom: 10px;

    color: #444;
}

/* ========================= */
/* INVENTORY + ORDERS LAYOUT */
/* ========================= */

.inventory-layout {

    display: flex;

    gap: 30px;

    align-items: flex-start;
}

.inventory-column {

    flex: 0 0 auto;
}

.orders-column {

    width: 300px;

    flex-shrink: 0;

    position: sticky;

    top: 20px;
}

.order-card {

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 15px 18px;

    margin-bottom: 16px;

    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.order-customer-name {

    font-size: 15px;

    font-weight: 600;

    color: #1e40af;

    margin-bottom: 10px;

    padding-bottom: 6px;

    border-bottom: 1px solid #e5e7eb;
}

.order-item-row {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 5px 0;

    border-bottom: 1px solid #f3f4f6;
}

.order-item-row:last-child {

    border-bottom: none;
}

.order-item-name {

    flex: 1;

    font-size: 13px;

    color: #333;
}

.order-item-qty {

    font-size: 13px;

    font-weight: 600;

    color: #dc2626;

    white-space: nowrap;
}

.apply-form {

    margin: 0;
}

.btn-apply {

    width: auto;

    padding: 3px 10px;

    margin: 0;

    font-size: 12px;

    background-color: #16a34a;

    color: white;

    border: none;

    border-radius: 4px;

    cursor: pointer;
}

.btn-apply:hover {

    background-color: #15803d;
}

.no-orders-msg {

    font-size: 13px;

    color: #9ca3af;

    font-style: italic;
}

/* ========================= */
/* CUSTOMER PAGE */
/* ========================= */

.customer-layout {

    display: flex;

    gap: 30px;

    align-items: flex-start;
}

.customer-products {

    flex: 0 0 600px;

    display: flex;

    flex-direction: column;

    gap: 20px;
}

.customer-category-card {

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 15px 20px;

    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.customer-category-header {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 12px;
}

.category-img-placeholder {

    width: 300px;

    height: 60px;

    background-color: transparent;

    border-radius: 6px;

    flex-shrink: 0;

    overflow: hidden;
}

.category-img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;
}

.customer-category-title {

    font-size: 16px;

    font-weight: bold;

    text-decoration: underline;

    color: #444;
}

.customer-product-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 8px 0;

    border-bottom: 1px solid #f0f0f0;
}

.customer-product-row:last-child {

    border-bottom: none;
}

.customer-product-name {

    font-size: 14px;

    color: #333;
}

.customer-product-actions {

    display: flex;

    align-items: center;

    gap: 6px;
}

.customer-qty-input {

    width: 65px;

    padding: 5px 8px;

    border: 1px solid #ccc;

    border-radius: 5px;

    font-size: 13px;

    text-align: center;

    margin: 0;
}

.customer-product-price {

    font-size: 14px;

    color: #6b7280;

    white-space: nowrap;
}

.btn-add {

    width: auto;

    padding: 5px 14px;

    margin: 0;

    font-size: 13px;

    background-color: #2d89ef;

    color: white;

    border: none;

    border-radius: 5px;

    cursor: pointer;
}

.btn-add:hover {

    background-color: #1b5fbf;
}

/* ========================= */
/* CUSTOMER NAME COLUMN */
/* ========================= */

.customer-name-column {

    width: 180px;

    flex-shrink: 0;
}

.customer-name-card {

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 20px;

    box-shadow: 0 3px 8px rgba(0,0,0,0.06);

    position: sticky;

    top: 20px;
}

.customer-name-error {

    color: #dc2626;

    font-size: 12px;

    margin: 4px 0 0 0;
}

.customer-name-input {

    width: 100%;

    padding: 8px 10px;

    border: 1px solid #ccc;

    border-radius: 5px;

    font-size: 14px;

    box-sizing: border-box;

    margin-top: 8px;
}

/* ========================= */
/* ORDER PANEL */
/* ========================= */

.customer-order-panel {

    width: 700px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 20px;

    box-shadow: 0 3px 8px rgba(0,0,0,0.06);

    position: sticky;

    top: 20px;

    display: flex;

    flex-direction: column;

    gap: 10px;
}

.ordered-list {

    list-style: none;

    padding: 0;

    margin: 0;

    display: flex;

    flex-direction: column;

    gap: 6px;
}

.ordered-item {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 6px 0;

    border-bottom: 1px solid #f0f0f0;

    font-size: 14px;
}

.ordered-item-name {

    color: #333;
}

.ordered-item-qty {

    color: #6b7280;

    font-size: 13px;

    white-space: nowrap;
}

.ordered-item-price {

    font-size: 14px;

    color: #6b7280;

    margin-left: 20px;

    white-space: nowrap;
}

.order-total {

    font-size: 14px;

    font-weight: 700;

    color: #111827;

    border-top: 2px solid #e5e7eb;

    padding-top: 8px;

    text-align: right;
}

.total-row {

    font-size: 13px;

    color: #6b7280;

    text-align: right;
}

.total-original {

    text-decoration: line-through;

    color: #9ca3af;

    font-weight: 400;

    font-size: 13px;
}

.total-discount-label {

    color: #16a34a;

    font-size: 12px;

    font-weight: 600;
}

.total-final {

    color: #111827;

    font-size: 15px;
}

.empty-order-msg {

    font-size: 13px;

    color: #9ca3af;

    font-style: italic;

    margin: 0;
}

.order-panel-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 10px;
}

.order-panel-header h2 {

    margin: 0;
}

.btn-currency {

    font-size: 13px;

    padding: 4px 6px;

    border: 1px solid #6b7280;

    border-radius: 5px;

    background: white;

    color: #374151;

    cursor: pointer;

    width: 70px;
}

.btn-currency:hover {

    background: #f3f4f6;
}

.ordered-qty-input {

    width: 52px;

    padding: 2px 6px;

    border: 1px solid #ccc;

    border-radius: 4px;

    font-size: 13px;

    text-align: center;

    margin: 0 2px;
}

.ordered-item-price-remove {

    display: flex;

    align-items: center;

    gap: 16px;
}

.btn-remove-item {

    background: none !important;

    border: none !important;

    outline: none;

    box-shadow: none !important;

    color: #dc2626 !important;

    font-size: 22px;

    font-weight: 700;

    line-height: 1;

    padding: 0;

    width: auto;

    min-width: unset;

    cursor: pointer;
}

.btn-remove-item:focus {

    outline: none;

    box-shadow: none;
}

.btn-order {

    width: 100%;

    padding: 10px;

    margin: 0;

    background-color: #16a34a;

    color: white;

    border: none;

    border-radius: 5px;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;
}

.btn-order:hover {

    background-color: #15803d;
}

.order-success {

    background: #d1fae5;

    color: #065f46;

    padding: 10px;

    border-radius: 5px;

    font-size: 14px;

    text-align: center;
}

/* ========================= */
/* HISTORY LINK (TOP BAR) */
/* ========================= */

.history-link {

    padding: 6px 14px;

    background: #6b7280;

    color: white;

    text-decoration: none;

    border-radius: 5px;

    font-size: 13px;
}

.history-link:hover {

    background: #4b5563;
}

/* ========================= */
/* HISTORY PAGE */
/* ========================= */

.history-card {

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 16px 20px;

    margin-bottom: 20px;

    max-width: 720px;

    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.history-card-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 12px;

    padding-bottom: 8px;

    border-bottom: 1px solid #e5e7eb;
}

.history-date {

    font-size: 15px;

    font-weight: 700;

    color: #374151;
}

.btn-delete-day {

    width: auto;

    padding: 4px 12px;

    margin: 0;

    font-size: 12px;

    background-color: #dc2626;

    color: white;

    border: none;

    border-radius: 4px;

    cursor: pointer;
}

.btn-delete-day:hover {

    background-color: #b91c1c;
}

.btn-delete-entry {
    width: auto;
    padding: 2px 7px;
    margin: 0;
    font-size: 12px;
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete-entry:hover {
    background-color: #b91c1c;
}

.history-entries {

    display: flex;

    flex-direction: column;

    gap: 4px;
}

.history-row {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 6px 8px;

    border-radius: 5px;

    font-size: 14px;
}

.history-add {

    background: #f0fdf4;
}

.history-remove {

    background: #fff1f2;
}

.history-sign {

    font-size: 16px;

    font-weight: 700;

    width: 16px;

    text-align: center;

    flex-shrink: 0;
}

.history-add .history-sign {

    color: #16a34a;
}

.history-remove .history-sign {

    color: #dc2626;
}

.history-product {

    flex: 1;

    color: #374151;
}

.history-customer {

    font-size: 12px;

    color: #6b7280;

    background: #f3f4f6;

    border-radius: 10px;

    padding: 1px 8px;

    white-space: nowrap;
}

.history-qty {

    font-weight: 600;

    white-space: nowrap;

    color: #374151;
}

.history-time {

    font-size: 12px;

    color: #9ca3af;

    white-space: nowrap;

    min-width: 36px;

    text-align: right;
}

.history-price {

    font-size: 12px;

    color: #6b7280;

    white-space: nowrap;
}

.btn-stage {

    background: none;

    border: none;

    color: #2563eb;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    padding: 0 4px;

    line-height: 1;

    opacity: 0.7;
}

.btn-stage:hover {

    opacity: 1;
}

.btn-unstage {

    background: none;

    border: none;

    color: #dc2626;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    padding: 0 4px;

    line-height: 1;

    opacity: 0.7;
}

.btn-unstage:hover {

    opacity: 1;
}

.staged-section-title {

    font-size: 16px;

    font-weight: 700;

    color: #374151;

    margin-bottom: 10px;
}

.staged-card {

    border-color: #3b82f6;

    border-width: 2px;
}

.btn-push-invoice {

    width: auto;

    padding: 4px 14px;

    margin: 0;

    font-size: 12px;

    background-color: #2563eb;

    color: white;

    border: none;

    border-radius: 4px;

    cursor: pointer;

    font-weight: 600;
}

.btn-push-invoice:hover {

    background-color: #1d4ed8;
}

.billingo-success {

    background: #f0fdf4;

    border: 1px solid #16a34a;

    color: #15803d;

    border-radius: 8px;

    padding: 10px 16px;

    margin-bottom: 16px;

    max-width: 720px;

    font-size: 14px;
}

.billingo-error {

    background: #fff1f2;

    border: 1px solid #dc2626;

    color: #b91c1c;

    border-radius: 8px;

    padding: 10px 16px;

    margin-bottom: 16px;

    max-width: 720px;

    font-size: 14px;
}