/* ==============================================
   M&E Turnkey Invoicing – Water & Engineering
   Theme: Deep blues, teal, cyan, professional
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --brand-dark: #0B2239;
    --brand-primary: #0A4C7E;
    --brand-teal: #0F7B8A;
    --brand-cyan: #17A2B8;
    --brand-light: #E8F4F8;
    --brand-accent: #2A9FD6;
    --brand-gray: #5C6B7A;
    --brand-success: #28A745;
    --brand-warning: #FFC107;
    --brand-danger: #DC3545;
    --text-dark: #1E2A36;
    --text-muted: #6C7A88;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 6px rgba(10, 76, 126, 0.08);
    --shadow-md: 0 4px 14px rgba(10, 76, 126, 0.12);
    --shadow-lg: 0 8px 24px rgba(10, 76, 126, 0.18);
}

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #F0F7FA 0%, #E3EEF5 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

/* ---------- Navbar ---------- */
.custom-navbar {
    background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand-primary) 100%) !important;
    box-shadow: var(--shadow-md);
}

.custom-navbar .navbar-brand {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.custom-navbar .nav-link {
    font-weight: 500;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.custom-navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.custom-navbar .navbar-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ---------- Cards & Containers ---------- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.invoice-box {
    background: var(--white);
    padding: 25px;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-teal) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0B3D5C 0%, #0A5C6B 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-info {
    background: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-accent) 100%);
    border: none;
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #108396 0%, #1B7FAE 100%);
    color: white;
}

/* ---------- Tables ---------- */
.table {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: linear-gradient(90deg, #0A4C7E 0%, #0F7B8A 100%);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-bottom: none;
    padding: 12px 10px;
    white-space: nowrap;
}

.table tbody td {
    padding: 10px;
    vertical-align: middle;
    border-bottom: 1px solid #E9ECEF;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #F7FBFD;
}

.table-striped tbody tr:hover {
    background-color: #E8F4F8;
}

/* ---------- Pagination ---------- */
.pagination .page-link {
    color: var(--brand-primary);
    border: 1px solid #D6E4EC;
    margin: 0 2px;
    border-radius: 6px !important;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-teal));
    border-color: var(--brand-primary);
    color: #fff;
}

.pagination .page-link:hover {
    background-color: var(--brand-light);
    color: var(--brand-dark);
}

/* ---------- Forms ---------- */
.form-control {
    border-radius: 8px;
    border: 1px solid #C8D9E5;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.2rem rgba(42, 159, 214, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
}

/* ---------- Invoice Header ---------- */
.invoice-header {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-dark);
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

/* ---------- Invoice Detail Boxes ---------- */
.invoice-detail-box {
    background: var(--brand-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.invoice-detail-box h5 {
    color: var(--brand-primary);
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 1px solid #C8D9E5;
    padding-bottom: 5px;
}

.invoice-total-row {
    display: flex;
    justify-content: flex-end;
    padding: 8px 0;
    font-weight: 500;
}

.invoice-total-row span:first-child {
    margin-right: 20px;
    color: var(--text-muted);
}

.invoice-total-row span:last-child {
    font-weight: 700;
    min-width: 120px;
    text-align: right;
}

/* ---------- Login Page ---------- */
.card.shadow {
    border-radius: 14px;
    border: none;
    box-shadow: var(--shadow-lg) !important;
}

.card.shadow .card-title {
    color: var(--brand-primary);
    font-weight: 700;
}

/* ---------- Dashboard Stats ---------- */
.display-6 {
    font-weight: 700;
    color: var(--brand-primary);
}

/* ---------- Responsive Fine Tuning ---------- */
@media (max-width: 768px) {
    .invoice-header {
        font-size: 1.5rem;
    }
    .table thead th {
        font-size: 0.85rem;
        padding: 8px 6px;
    }
}

/* New classes for invoice layout */
.invoice-wrapper {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.invoice-supplier-purchaser {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.invoice-supplier-purchaser .box {
    flex: 1 1 45%;
    background: #F8FBFE;
    border: 1px solid #D6E4EC;
    border-radius: 10px;
    padding: 15px;
}

.invoice-supplier-purchaser .box h5 {
    color: var(--brand-primary);
    font-weight: 600;
    border-bottom: 1px solid #D6E4EC;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.items-heading {
    text-align: center;
    font-weight: 600;
    color: var(--brand-dark);
    margin: 25px 0 10px;
    font-size: 1.2rem;
}