/**
 * mystamp.lk Billing System - Main Stylesheet
 * Mobile-first responsive design
 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-icon {
    font-size: 4rem;
    color: var(--primary-color);
}

.login-box h2 {
    color: var(--dark-color);
    font-weight: 600;
}

/* Dashboard Statistics Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.stat-card .card-title {
    font-size: 1.8rem;
    font-weight: 700;
}

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

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--light-color);
    font-weight: 600;
}

/* Tables */
.table {
    background-color: white;
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Buttons */
.btn {
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.875rem;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 20px;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    background-color: var(--light-color);
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

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

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.page-link {
    border-radius: 5px;
    margin: 0 3px;
    border: none;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .stat-card .card-title {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-icon {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        padding: 6px 15px;
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background-color: white;
    }
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm-hover:hover {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}

/* Status Colors */
.status-draft { color: var(--secondary-color); }
.status-sent { color: var(--primary-color); }
.status-approved { color: var(--success-color); }
.status-rejected { color: var(--danger-color); }
.status-pending { color: var(--warning-color); }
.status-paid { color: var(--success-color); }
.status-overdue { color: var(--danger-color); }
