﻿/* =========================================================
   MOB365 POS — FINAL ENTERPRISE LAYOUT
   Ky fajll duhet të ngarkohet i fundit.
   ========================================================= */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

#app {
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* =========================================================
   SHELL KRYESOR
   ========================================================= */

.pos-app-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: 58px minmax(0, 1fr) 30px;
    overflow: hidden;
    background: #eef2f6;
    color: #101828;
}

/* Header */

.pos-command-bar {
    min-width: 0;
    height: 58px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid #d0d5dd;
    background: #ffffff;
    overflow: hidden;
}

.command-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.command-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #087f74;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.command-brand strong {
    display: block;
    color: #101828;
    font-size: 14px;
    font-weight: 850;
}

.command-brand small {
    display: block;
    margin-top: 2px;
    color: #667085;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.command-statuses {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.command-pill {
    height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #f9fafb;
    color: #344054;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

    .command-pill i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #12b76a;
    }

.command-session {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #667085;
    font-size: 9px;
    white-space: nowrap;
}

/* =========================================================
   LAYOUT I POS-IT
   ========================================================= */

.pos-layout,
.pos-layout-premium {
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    display: grid !important;
    grid-template-columns: 228px minmax(420px, 1fr) minmax(450px, 500px) 126px !important;
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    overflow: hidden;
}

    /* Çdo kolonë lejohet të zvogëlohet pa dalë jashtë */

    .pos-layout > *,
    .pos-layout-premium > * {
        min-width: 0;
        min-height: 0;
        height: 100%;
    }

/* =========================================================
   SIDEBAR KLASIK
   ========================================================= */

.pos-sidebar {
    width: 228px !important;
    min-width: 228px !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 9px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid #263548 !important;
    border-radius: 7px !important;
    background: #101828 !important;
    color: #d0d5dd !important;
    box-shadow: none !important;
}

/* Logo */

.sidebar-logo {
    width: 100%;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 0 8px !important;
    padding: 0 11px !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid #344054 !important;
    border-radius: 5px !important;
    background: #172033 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    letter-spacing: 0.4px !important;
}

    .sidebar-logo::before {
        content: "M";
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 28px !important;
        margin-right: 9px !important;
        display: grid !important;
        place-items: center !important;
        border: 1px solid #667085 !important;
        border-radius: 4px !important;
        background: #25334a !important;
        color: #ffffff !important;
        font-size: 13px !important;
        font-weight: 900 !important;
    }

/* Vetëm menyja bën scroll */

.sidebar-nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 0 3px 8px 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #475467 transparent;
}

    .sidebar-nav::-webkit-scrollbar {
        width: 5px;
    }

    .sidebar-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        border-radius: 10px;
        background: #475467;
    }

.sidebar-group {
    flex: 0 0 auto !important;
}

.sidebar-group-header {
    width: 100% !important;
    height: 30px !important;
    padding: 0 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border: 0 !important;
    background: transparent !important;
    color: #98a2b3 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
}

    .sidebar-group-header:hover,
    .sidebar-group-header.open {
        color: #ffffff !important;
    }

.sidebar-group-items {
    margin-top: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.sidebar-link {
    width: 100% !important;
    min-height: 38px !important;
    padding: 0 7px !important;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 7px !important;
    border: 1px solid transparent !important;
    border-radius: 5px !important;
    background: transparent !important;
    color: #d0d5dd !important;
    text-align: left !important;
    cursor: pointer !important;
}

    .sidebar-link:hover {
        border-color: #344054 !important;
        background: #1d2939 !important;
        color: #ffffff !important;
    }

    .sidebar-link.active {
        border-color: #667085 !important;
        background: #344054 !important;
        color: #ffffff !important;
    }

/* Ikonat monokromatike */

.sidebar-icon {
    width: 26px !important;
    height: 26px !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid #475467 !important;
    border-radius: 4px !important;
    background: #1d2939 !important;
    color: #d0d5dd !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: 8px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
    border-color: #98a2b3 !important;
    background: #475467 !important;
    color: #ffffff !important;
}

.sidebar-text {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* Dalja mbetet gjithmonë poshtë */

.sidebar-spacer {
    display: none !important;
}

.logout-btn {
    flex: 0 0 42px !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 7px 0 0 !important;
    padding: 0 7px !important;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 7px !important;
    border: 1px solid #475467 !important;
    border-radius: 5px !important;
    background: #172033 !important;
    color: #fda29b !important;
    text-align: left !important;
    cursor: pointer !important;
}

    .logout-btn:hover {
        border-color: #b42318 !important;
        background: #7a271a !important;
        color: #ffffff !important;
    }

.logout-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

/* =========================================================
   PRODUKTET
   ========================================================= */

.pos-products {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

/* Çdo zonë artikujsh duhet të bëjë scroll brenda vetes */

.products-content,
.products-grid,
.product-results,
.pos-products-list {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* =========================================================
   SHPORTA
   ========================================================= */

.pos-cart {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

    .pos-cart > h3 {
        flex: 0 0 58px !important;
        height: 58px !important;
        min-height: 58px !important;
        margin: 0 !important;
        padding: 0 14px !important;
        display: flex !important;
        align-items: center !important;
        border-bottom: 1px solid #e4e7ec !important;
        color: #101828 !important;
        font-size: 17px !important;
        font-weight: 850 !important;
    }

.customer-box {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 11px 13px !important;
    border: 0 !important;
    border-bottom: 1px solid #e4e7ec !important;
    border-radius: 0 !important;
    background: #f9fafb !important;
}

    .customer-box label {
        margin-bottom: 5px !important;
        color: #475467 !important;
        font-size: 9px !important;
        font-weight: 850 !important;
        letter-spacing: 0.8px !important;
        text-transform: uppercase !important;
    }

    .customer-box input {
        width: 100% !important;
        height: 40px !important;
        padding: 0 10px !important;
        border: 1px solid #d0d5dd !important;
        border-radius: 5px !important;
        background: #ffffff !important;
        font-size: 12px !important;
        font-weight: 700 !important;
    }

.selected-customer {
    margin-top: 6px !important;
    color: #667085 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

/* Vetëm artikujt bëjnë scroll */

.cart-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #ffffff !important;
}

.cart-empty {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 24px !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #98a2b3 !important;
    text-align: center !important;
    font-size: 12px !important;
}

.cart-line {
    min-height: 86px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    border: 0 !important;
    border-bottom: 1px solid #eaecf0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

    .cart-line:hover {
        background: #f9fafb !important;
    }

.cart-info {
    min-width: 0 !important;
}

    .cart-info strong {
        display: block !important;
        max-width: none !important;
        color: #1d2939 !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
        font-weight: 850 !important;
    }

.cart-right {
    min-width: 95px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
}

    .cart-right b {
        color: #101828 !important;
        font-size: 13px !important;
        font-weight: 850 !important;
        white-space: nowrap !important;
    }

/* Totali dhe pagesat nuk dalin poshtë ekranit */

.cart-secondary-actions,
.cart-summary,
.cart-total,
.items-count,
.checkout-buttons,
.cancel-btn {
    flex-shrink: 0 !important;
}

.cart-total {
    margin: 0 !important;
    padding: 12px 14px !important;
    border-top: 1px solid #d0d5dd !important;
    border-radius: 0 !important;
    background: #10233f !important;
    color: #ffffff !important;
}

    .cart-total span {
        color: #98a2b3 !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        letter-spacing: 1px !important;
        text-transform: uppercase !important;
    }

    .cart-total strong {
        font-size: 27px !important;
        font-weight: 900 !important;
    }

.items-count {
    margin: 0 !important;
    padding: 5px 13px !important;
    background: #ffffff !important;
    color: #667085 !important;
    font-size: 9px !important;
    text-align: right !important;
}

.checkout-buttons {
    margin: 0 !important;
    padding: 7px 12px 10px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
    background: #ffffff !important;
}

.cash-btn,
.card-btn {
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}

/* =========================================================
   QUICK ACTIONS
   ========================================================= */

.pos-quick-actions {
    width: 126px !important;
    min-width: 126px !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 9px 7px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

.quick-actions-title {
    padding: 0 2px 7px !important;
    border-bottom: 1px solid #e4e7ec !important;
}

    .quick-actions-title span {
        font-size: 9px !important;
        line-height: 1.25 !important;
        letter-spacing: 0.8px !important;
    }

    .quick-actions-title small {
        display: none !important;
    }

.quick-action {
    width: 100% !important;
    min-height: 50px !important;
    padding: 6px !important;
    display: grid !important;
    grid-template-columns: 27px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 5px !important;
    border-radius: 5px !important;
    text-align: left !important;
}

.qa-icon {
    width: 25px !important;
    height: 25px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 4px !important;
    font-size: 12px !important;
}

.qa-label {
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
}

.quick-action kbd {
    display: none !important;
}

.quick-actions-foot {
    display: none !important;
}

/* =========================================================
   STATUS BAR POSHTË
   ========================================================= */

.pos-system-strip {
    min-width: 0;
    height: 30px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    border-top: 1px solid #d0d5dd;
    background: #ffffff;
    color: #667085;
    font-size: 9px;
    white-space: nowrap;
}

    .pos-system-strip i {
        width: 6px;
        height: 6px;
        display: inline-block;
        border-radius: 50%;
        background: #12b76a;
    }

/* =========================================================
   PAYMENT DIALOG
   ========================================================= */

.cash-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    padding: 20px;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.68);
}

.cash-popup {
    position: relative;
    width: min(470px, 100%);
    max-height: calc(100dvh - 40px);
    padding: 24px;
    overflow-y: auto;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24);
}

    .cash-popup h2 {
        margin: 0 42px 18px 0;
        color: #101828;
        font-size: 22px;
        line-height: 1.2;
        font-weight: 850;
    }

.cash-row {
    margin: 8px 0;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 5px;
    background: #f9fafb;
}

    .cash-row span {
        color: #667085;
        font-size: 12px;
        font-weight: 650;
    }

    .cash-row strong {
        color: #101828;
        font-size: 14px;
        font-weight: 850;
        text-align: right;
    }

.cash-popup label {
    display: block;
    margin: 14px 0 6px;
    color: #344054;
    font-size: 11px;
    font-weight: 800;
}

.cash-popup input {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    outline: 0;
    background: #ffffff;
    color: #101828;
    font-size: 18px;
    font-weight: 850;
}

    .cash-popup input:focus {
        border-color: #0b766e;
        box-shadow: 0 0 0 3px rgba(11, 118, 110, 0.1);
    }

.confirm-btn,
.close-btn {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.confirm-btn {
    margin-top: 15px;
    background: #0b766e;
    color: #ffffff;
}

    .confirm-btn:hover:not(:disabled) {
        background: #08665f;
    }

.close-btn {
    margin-top: 7px;
    background: #f2f4f7;
    color: #475467;
}

    .confirm-btn:disabled,
    .close-btn:disabled {
        cursor: not-allowed;
        opacity: 0.55;
    }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1500px) {
    .pos-layout,
    .pos-layout-premium {
        grid-template-columns: 190px minmax(360px, 1fr) minmax(410px, 450px) 112px !important;
    }

    .pos-sidebar {
        width: 190px !important;
        min-width: 190px !important;
    }

    .pos-quick-actions {
        width: 112px !important;
        min-width: 112px !important;
    }
}

@media (max-width: 1250px) {
    .pos-layout,
    .pos-layout-premium {
        grid-template-columns: 172px minmax(330px, 1fr) minmax(380px, 420px) 96px !important;
    }

    .pos-sidebar {
        width: 172px !important;
        min-width: 172px !important;
    }

    .pos-quick-actions {
        width: 96px !important;
        min-width: 96px !important;
    }

    .sidebar-text {
        font-size: 10px !important;
    }

    .qa-label {
        font-size: 7px !important;
    }
}

@media (max-width: 1050px) {
    .pos-app-shell {
        overflow: auto;
    }

    .pos-layout,
    .pos-layout-premium {
        min-width: 1020px;
    }
}
