/**
 * SPARE PARTS SHOP MANAGEMENT SYSTEM
 * Main Stylesheet
 */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-color);
    color: #334155;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-page .card {
    border: none;
    border-radius: 15px;
}

/* Header/Navbar */
.navbar {
    background-color: var(--dark-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Sidebar */
.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: #475569;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: #f1f5f9;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Tables */
.table {
    background-color: #fff;
}

.table thead th {
    background-color: #f8fafc;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.table-responsive {
    border-radius: 10px;
    overflow: hidden;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #334155;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.625rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-card.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

.stats-card .stats-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stats-card .stats-label {
    opacity: 0.9;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Invoice/Receipt */
.invoice-container {
    background: #fff;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.invoice-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.invoice-footer {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1.5rem;
}

/* Thermal Receipt */
.thermal-receipt {
    width: 80mm;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.thermal-receipt .receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.thermal-receipt .receipt-items {
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.thermal-receipt .receipt-footer {
    text-align: center;
    margin-top: 10px;
}

/* POS Cart */
.cart-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.cart-item:last-child {
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .stats-card .stats-value {
        font-size: 1.5rem;
    }

    .invoice-container {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-break {
        page-break-after: always;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Utilities */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.bg-success { background-color: var(--success-color) !important; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05) !important; }
.shadow { box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1) !important; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important; }

