/* Global styles */
body {
    background-color: #f8f9fa;
}

/* Card shadows */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Form styling */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Custom button styles */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Navigation active state */
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Table responsiveness */
.table-responsive {
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Custom alert styling */
.alert {
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* Form validation styles */
.was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Dashboard card styles */
.dashboard-card {
    border-radius: 0.5rem;
    border: none;
    transition: transform 0.3s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* Custom badge styles */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* Chart container styles */
.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
    margin-bottom: 2rem;
}

/* ── Invoice & Quotation System Styles ────────────────── */

/* Invoice preview card */
.invoice-preview {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
}

.invoice-preview .card-body {
    padding: 1.5rem;
}

/* Invoice header gradient */
.invoice-header {
    border-radius: 8px 8px 0 0;
}

/* PAID stamp overlay */
.paid-stamp div {
    font-family: 'Arial Black', Arial, sans-serif;
    user-select: none;
}

/* Items table in forms */
#itemsTable textarea {
    resize: vertical;
    min-height: 50px;
}

#itemsTable .form-control {
    font-size: 0.9rem;
}

/* Print styles */
@media print {
    .no-print,
    .navbar,
    .alert,
    .btn-group,
    footer {
        display: none !important;
    }

    .invoice-preview {
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
    }

    body {
        background: #fff !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .invoice-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .paid-stamp div {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Status badges */
.badge.bg-draft { background-color: #6c757d !important; }
.badge.bg-sent { background-color: #ffc107 !important; color: #333; }
.badge.bg-paid { background-color: #198754 !important; }
.badge.bg-cancelled { background-color: #dc3545 !important; }

/* Invoice form totals card */
.card.bg-light .card-body hr {
    margin: 0.5rem 0;
}

/* Company profile cards */
.card.h-100 .card-body hr {
    margin: 0.75rem 0;
}
