/* ================================================
   POS SYSTEM - Main Stylesheet
   ================================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --border-color: #e5e7eb;
    --text-color: #333;
    --text-muted: #6b7280;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

/* Layout with Sidebar */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.top-bar h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-display {
    color: var(--text-muted);
    font-size: 14px;
}

/* Content Wrapper */
.content-wrapper {
    padding: 30px;
    max-width: 1400px;
}

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-banner.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.alert-banner .alert-icon {
    font-size: 32px;
}

.alert-banner .alert-content {
    flex: 1;
}

.alert-banner strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

.alert-banner p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-card.blue {
    color: var(--info-color);
}

.stat-card.green {
    color: var(--success-color);
}

.stat-card.orange {
    color: var(--warning-color);
}

.stat-card.purple {
    color: #8b5cf6;
}

.stat-icon {
    font-size: 48px;
    opacity: 0.9;
}

.stat-details {
    flex: 1;
}

.stat-details h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-color);
}

.stat-details p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.stat-link:hover {
    text-decoration: underline;
}

/* Session Card */
.session-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.session-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.session-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.session-body {
    padding: 25px;
}

.session-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.session-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    background: #f9fafb;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 0;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #f9fafb;
}

.table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: #f9fafb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #e5e7eb;
    color: #374151;
}

.badge-primary {
    background: #e0e7ff;
    color: #3730a3;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}