/* General Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
}

/* Navbar Styles */
.navbar {
    padding: 0.7rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(to right, #1a237e, #283593) !important;
}

.navbar-brand {
    font-size: 1.3rem;
    padding: 0;
}

.navbar-nav .nav-item {
    position: relative;
    margin: 0 2px;
}

.navbar-nav .nav-link {
    padding: 0.7rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 500;
}

.navbar-nav .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
}

/* Dropdown hover functionality */
.navbar-nav .nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 10px;
    padding: 8px;
}

.dropdown-item {
    border-radius: 5px;
    padding: 8px 15px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f0f7ff;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    color: #0d6efd;
}

/* Logo Styles */
.logo-container {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

/* Dashboard */
.dashboard-stats .card {
    transition: transform 0.3s;
}

.dashboard-stats .card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* POS Screen */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 1rem;
    height: calc(100vh - 150px);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    padding: 1rem;
    height: 100%;
}

.product-item {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-item:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.product-image {
    height: 80px;
    width: 100%;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.product-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    height: 2.7rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    color: #28a745;
    font-weight: bold;
}

.cart-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.cart-header {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity input {
    width: 40px;
    text-align: center;
    margin: 0 0.25rem;
}

.cart-footer {
    padding: 1rem;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
}

.cart-total {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 4rem;
    color: #343a40;
}

/* Products Page */
.product-image-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Inventory Page */
.low-stock {
    color: #dc3545;
    font-weight: bold;
}

/* Print Styles for Receipt */
@media print {
    .no-print {
        display: none !important;
    }
    
    .receipt {
        width: 80mm;
        font-size: 12px;
        margin: 0;
        padding: 0;
    }
    
    .receipt-header {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .receipt-items {
        border-top: 1px dashed #000;
        border-bottom: 1px dashed #000;
        margin: 10px 0;
        padding: 10px 0;
    }
    
    .receipt-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;
    }
    
    .receipt-total {
        font-weight: bold;
        text-align: right;
        margin-top: 10px;
    }
    
    .receipt-footer {
        text-align: center;
        margin-top: 10px;
        font-size: 10px;
    }
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .pos-container {
        grid-template-columns: 1fr 400px;
    }
}

@media (max-width: 992px) {
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }
    
    .product-grid, .cart-container {
        height: 500px;
        min-height: 400px;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .product-item {
        height: 180px;
        padding: 0.5rem;
    }
    
    .product-image {
        height: 70px;
    }
    
    .product-name {
        font-size: 0.85rem;
        height: 2.5rem;
    }
    
    .cart-container {
        margin-top: 1rem;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }
    
    .cart-item-quantity {
        justify-content: flex-start;
    }
    
    .cart-item-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .logo-container {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .product-item {
        height: 160px;
        padding: 0.4rem;
    }
    
    .product-image {
        height: 60px;
    }
    
    .product-name {
        font-size: 0.8rem;
        height: 2.2rem;
    }
    
    .product-price {
        font-size: 0.85rem;
    }
    
    .cart-header h5 {
        font-size: 1rem;
    }
    
    .cart-total {
        font-size: 1.1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand small {
        display: none;
    }
    
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .input-group-text {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    .dropdown-menu {
        font-size: 0.9rem;
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
    }
    
    h1, .h1 {
        font-size: 1.5rem;
    }
    
    h2, .h2 {
        font-size: 1.3rem;
    }
    
    h3, .h3 {
        font-size: 1.1rem;
    }
    
    h4, .h4 {
        font-size: 1rem;
    }
    
    h5, .h5 {
        font-size: 0.95rem;
    }
    
    h6, .h6 {
        font-size: 0.9rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .product-item {
        height: 150px;
    }
    
    .product-image {
        height: 50px;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 992px) and (orientation: landscape) {
    .pos-container {
        height: calc(100vh - 120px);
    }
    
    .product-grid,
    .cart-container {
        height: calc(100vh - 200px);
    }
}

/* Print media adjustments */
@media print {
    .navbar,
    .no-print,
    .btn,
    .dropdown-menu {
        display: none !important;
    }
    
    body {
        padding: 0;
        margin: 0;
    }
    
    .container-fluid {
        padding: 0;
    }
    
    .card {
        border: none;
        box-shadow: none;
        margin: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
} 