/**
 * Inventory Management System — application stylesheet.
 * Loaded after Bootstrap 5 (CDN) in resources/views/layouts/app.blade.php
 * and layouts/guest.blade.php via asset('css/app.css').
 */

:root {
    --ims-sidebar-bg: #1e293b;
    --ims-sidebar-hover: #334155;
    --ims-sidebar-muted: #94a3b8;
    --ims-body-bg: #f4f6f9;
    --ims-brand: #2563eb;
}

body {
    background: var(--ims-body-bg);
}

/* ---------- Sidebar ---------- */
.sidebar {
    min-height: 100vh;
    background: var(--ims-sidebar-bg);
}

.sidebar .nav-link {
    color: #cbd5e1;
    border-radius: .375rem;
    margin-bottom: 2px;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    color: #fff;
    background: var(--ims-sidebar-hover);
}

.sidebar .nav-header {
    color: var(--ims-sidebar-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .75rem 1rem .25rem;
}

.brand-mark {
    color: #fff;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        z-index: 1030;
        left: 0;
        top: 0;
    }
}

/* ---------- Cards & tables ---------- */
.card {
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: .78rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: .03em;
}

.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    color: #64748b;
    border-top: 0;
    white-space: nowrap;
}

.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, .04);
}

/* ---------- Dynamic line-item forms ---------- */
.row-form-table td {
    vertical-align: middle;
}

.row-form-table select.product-select,
.row-form-table select.unit-select {
    min-width: 160px;
}

.row-form-table input[type="number"] {
    text-align: right;
}

/* ---------- Status badges ---------- */
.badge-status-draft { background-color: #94a3b8; }
.badge-status-confirmed,
.badge-status-paid,
.badge-status-active,
.badge-status-accepted { background-color: #16a34a; }
.badge-status-partial,
.badge-status-partially_paid,
.badge-status-sent { background-color: #d97706; }
.badge-status-cancelled,
.badge-status-rejected,
.badge-status-inactive,
.badge-status-expired { background-color: #dc2626; }

/* ---------- Login / guest layout ---------- */
.guest-body {
    background: linear-gradient(135deg, #1e293b, #334155);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 420px;
    margin: auto;
}

/* ---------- Misc ---------- */
.cursor-pointer { cursor: pointer; }

.text-muted-sm {
    font-size: .8rem;
    color: #64748b;
}

@media print {
    .sidebar, .navbar, .btn, form button { display: none !important; }
    main { padding: 0 !important; }
}
