/* Custom styles for KCC POS System */

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Login page styles */
.login-container {
    margin-top: 100px;
}

/* Dashboard styles */
.dashboard-container {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
}

.dashboard-stats {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-stats i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Modern Stats Cards */
.stats-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stats-card.stats-primary::before {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
}

.stats-card.stats-success::before {
    background: linear-gradient(90deg, #28a745 0%, #1e7e34 100%);
}

.stats-card.stats-info::before {
    background: linear-gradient(90deg, #17a2b8 0%, #117a8b 100%);
}

.stats-card.stats-warning::before {
    background: linear-gradient(90deg, #ffc107 0%, #e0a800 100%);
}

.stats-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #007bff;
}

.stats-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.change-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.change-indicator.positive {
    background-color: rgba(34, 197, 94, 0.1);
    color: #059669;
}

.change-indicator.negative {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.change-indicator.neutral {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.change-text {
    font-size: 0.75rem;
    color: #6c757d;
}

.stats-footer {
    font-size: 0.875rem;
    color: #6c757d;
    border-top: 1px solid #f1f3f4;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* Mini Stats Cards */
.mini-stats-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.mini-stats-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mini-stats-icon {
    font-size: 1.25rem;
}

/* Sales Chart Container */
.sales-chart-container {
    height: 300px;
    position: relative;
}

/* Top Products List */
.top-products-list {
    max-height: 300px;
    overflow-y: auto;
}

.top-product-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.top-product-item:last-child {
    border-bottom: none;
}

.product-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.rank-number {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.product-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
}

.product-code {
    font-size: 0.75rem;
}

.sold-qty {
    font-size: 0.75rem;
    color: #6c757d;
}

.revenue {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Activity Timeline */
.activity-timeline {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.activity-sale {
    background-color: rgba(34, 197, 94, 0.1);
    color: #059669;
}

.activity-product {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.activity-customer {
    background-color: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}

.activity-content {
    flex-grow: 1;
}

.activity-description {
    font-size: 0.875rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.activity-amount {
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
}

/* Navigation styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
}

.nav-link i {
    margin-right: 5px;
}

/* Card styles */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Table styles */
.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Form styles */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Button styles */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Alert styles */
.alert {
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Product card styles */
.product-card {
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 200px;
    object-fit: cover;
}

/* POS sale screen styles */
.pos-container {
    height: calc(100vh - 56px);
    overflow-y: hidden;
}

.products-grid {
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.cart-container {
    height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Dashboard Responsive Styles */
@media (max-width: 1200px) {
    .stats-number {
        font-size: 1.75rem;
    }
    
    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 992px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .sales-chart-container {
        height: 250px;
    }
    
    .top-products-list {
        max-height: 250px;
    }
    
    .activity-timeline {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .pos-container {
        height: auto;
    }
    
    .products-grid,
    .cart-container {
        height: auto;
        max-height: 500px;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-title {
        font-size: 0.75rem;
    }
    
    .stats-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .change-indicator {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .change-text {
        font-size: 0.7rem;
    }
    
    .stats-footer {
        font-size: 0.8rem;
    }
    
    .mini-stats-card .card-body {
        padding: 0.75rem;
    }
    
    .mini-stats-icon {
        font-size: 1rem;
    }
    
    .product-rank {
        width: 25px;
        height: 25px;
        margin-right: 0.5rem;
    }
    
    .rank-number {
        font-size: 0.75rem;
    }
    
    .activity-icon {
        width: 35px;
        height: 35px;
        margin-right: 0.5rem;
    }
}

@media (max-width: 576px) {
    .dashboard-container {
        padding: 0.5rem;
    }
    
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .stats-number {
        font-size: 1.25rem;
    }
    
    .stats-icon {
        display: none;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .btn {
        width: 100%;
    }
    
    .sales-chart-container {
        height: 200px;
    }
}

/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.stats-card {
    animation: fadeInUp 0.6s ease-out;
}

.stats-card:nth-child(1) { animation-delay: 0.1s; }
.stats-card:nth-child(2) { animation-delay: 0.2s; }
.stats-card:nth-child(3) { animation-delay: 0.3s; }
.stats-card:nth-child(4) { animation-delay: 0.4s; }

.mini-stats-card {
    animation: fadeInUp 0.4s ease-out;
}

.change-indicator.positive {
    animation: pulse 2s infinite;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dashboard-container {
        background-color: #1a202c;
    }
    
    .stats-card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .stats-number {
        color: #e2e8f0;
    }
    
    .activity-item {
        border-bottom-color: #4a5568;
    }
    
    .top-product-item {
        border-bottom-color: #4a5568;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
} 