/* Google Font Roboto import */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --bs-body-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-body-font-size: 0.78rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.4;
    --bs-body-bg: #f4f6f9;
    --bs-body-color: #334155;
}

body {
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 75px; /* space for sticky bottom navigation on mobile */
}

/* Typography refinements for smaller, compact crisp text */
h1, .h1 { font-size: 1.15rem; font-weight: 700; }
h2, .h2 { font-size: 1.02rem; font-weight: 600; }
h3, .h3 { font-size: 0.92rem; font-weight: 600; }
h4, .h4 { font-size: 0.85rem; font-weight: 600; }
h5, .h5 { font-size: 0.78rem; font-weight: 600; }
small, .small { font-size: 0.7rem; }

/* Mobile Navbar & Card Styling */
.navbar-custom {
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #e2e8f0;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.brand-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

/* Light Theme Card Components */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    background-color: #ffffff;
    margin-bottom: 0.75rem;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.card-body {
    padding: 0.75rem;
}

/* Category Badges */
.badge-daily {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.badge-emergency {
    background-color: #ffe4e6;
    color: #be123c;
    border: 1px solid #fecdd3;
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.badge-inward {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 0.7rem;
}

.badge-outward {
    background-color: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-size: 0.7rem;
}

.badge-return {
    background-color: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
    font-size: 0.7rem;
}

/* Alert Notification Banner */
.alert-banner {
    border-radius: 0.4rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    margin-bottom: 0.65rem;
}

.alert-low-stock {
    background-color: #fff7ed;
    border: 1px solid #ffedd5;
    color: #9a3412;
}

.alert-emergency-used {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
}

/* Mobile Touch-friendly Navigation Bar (Bottom) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 54px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 1040;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    width: 20%;
    padding: 2px 0;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1rem;
    margin-bottom: 1px;
}

.mobile-bottom-nav .nav-item.active {
    color: #0d6efd;
    font-weight: 600;
}

/* Form Controls - Small & Compact Crisp Text */
.form-control, .form-select {
    font-size: 0.78rem;
    padding: 0.3rem 0.55rem;
    border-radius: 0.35rem;
    border: 1px solid #cbd5e1;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.15);
}

.btn-sm {
    font-size: 0.72rem;
    padding: 0.22rem 0.5rem;
    border-radius: 0.3rem;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Table styling for mobile responsiveness */
.table-custom {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.table-custom th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.74rem;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.45rem 0.6rem;
}

.table-custom td {
    padding: 0.45rem 0.6rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Stock counter pill */
.stock-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 0.35rem;
}

.stock-ok {
    background-color: #ecfdf5;
    color: #047857;
}

.stock-low {
    background-color: #fff7ed;
    color: #c2410c;
}

.stock-zero {
    background-color: #fef2f2;
    color: #b91c1c;
}
