/* ============================================================
   LRC Inventory - Custom Styles
   ============================================================ */

/*===== GENERAL =====*/
body {
    font-family: 'Inter', sans-serif;
    background: #f4f6f9;
    font-size: 0.925rem;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/*===== DASHBOARD SPECIFIC =====*/
.stat-card-primary { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.stat-card-success { background: linear-gradient(135deg, #198754, #157347); }
.stat-card-info { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }
.stat-card-warning { background: linear-gradient(135deg, #ffc107, #d39e00); }
.stat-card-danger { background: linear-gradient(135deg, #dc3545, #b02a37); }
.stat-card-secondary { background: linear-gradient(135deg, #6c757d, #5c636a); }
.stat-card-dark { background: linear-gradient(135deg, #212529, #1a1e21); }
.stat-card-purple { background: linear-gradient(135deg, #6f42c1, #553098); }
.stat-card-pink { background: linear-gradient(135deg, #d63384, #b82c6f); }
.stat-card-orange { background: linear-gradient(135deg, #fd7e14, #d96d0a); }
.stat-card-teal { background: linear-gradient(135deg, #20c997, #1ba87e); }
.stat-card-indigo { background: linear-gradient(135deg, #6610f2, #520dc2); }

/*===== CHART CONTAINERS =====*/
.chart-container {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.chart-container canvas {
    max-height: 300px;
}

/*===== INVENTORY DETAILS =====*/
.inventory-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #f8f9fa;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/*===== BARCODE / QR DISPLAY =====*/
.barcode-container {
    text-align: center;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px dashed #dee2e6;
}

.barcode-container svg,
.barcode-container img {
    max-width: 100%;
    height: auto;
}

/*===== GATE PASS / RECEIPT PRINT =====*/
.gatepass-wrapper,
.receipt-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.gatepass-header,
.receipt-header {
    text-align: center;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.gatepass-header h2,
.receipt-header h2 {
    color: #1a1c2e;
    font-weight: 700;
    margin: 0.5rem 0;
}

/*===== SEARCH HIGHLIGHT =====*/
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

/*===== EMPTY STATE =====*/
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: #6c757d;
    font-weight: 600;
}

/*===== ACTIVITY FEED =====*/
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-feed .feed-item {
    position: relative;
    padding: 0.75rem 0 0.75rem 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.activity-feed .feed-item:last-child {
    border-bottom: none;
}

.activity-feed .feed-item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d6efd;
}

.activity-feed .feed-time {
    font-size: 0.75rem;
    color: #adb5bd;
}

/*===== IMPORT/EXPORT =====*/
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #0d6efd;
    background: rgba(13,110,253,0.05);
}

.upload-area i {
    font-size: 3rem;
    color: #adb5bd;
}

/*===== RECENT ACTIVITY SIDEBAR =====*/
.recent-activity-list .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 0;
}

.recent-activity-list .list-group-item:first-child {
    border-top: none;
}

/*===== FILTER PANEL =====*/
.filter-panel {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .filter-panel {
    background: #252733;
}

/*===== KANBAN / STATUS BOARD =====*/
.status-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.status-column {
    min-width: 280px;
    max-width: 320px;
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1rem;
}

[data-bs-theme="dark"] .status-column {
    background: #252733;
}

.status-column-header {
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0.75rem;
}

/*===== CUSTOM CHECKBOX TOGGLE =====*/
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ced4da;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #0d6efd;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

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

[data-bs-theme="dark"] .spinner-overlay {
    background: rgba(0,0,0,0.8);
}

/*===== SECTION TITLE =====*/
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1c2e;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .section-title {
    color: #e5e7eb;
}

/*===== TABLE ACTIONS =====*/
.table-actions {
    display: flex;
    gap: 0.25rem;
}

/*===== CARD WITH HEADER ACTIONS =====*/
.card-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/*===== ATTACHMENT PREVIEW =====*/
.attachment-preview {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*===== MODAL LARGE =====*/
.modal-xl {
    max-width: 90%;
}

@media (min-width: 1200px) {
    .modal-xl {
        max-width: 1140px;
    }
}

/*============================================================
   DASHBOARD 2.0 — Professional KPI & Status Design
   ============================================================*/

/* KPI Cards */
.kpi-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(16,24,40,0.05);
    border-radius: 16px;
    padding: 1.25rem 1.3rem;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05), 0 4px 14px rgba(16,24,40,0.04);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card::after {
    content: '';
    position: absolute;
    right: -48px;
    top: -48px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.10), transparent 70%);
    pointer-events: none;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(16,24,40,0.12);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 8px 18px rgba(16,24,40,0.15);
}

.kpi-icon-primary { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.kpi-icon-info    { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.kpi-icon-success { background: linear-gradient(135deg, #10b981, #059669); }
.kpi-icon-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }

.kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
    margin-top: 0.8rem;
}

.kpi-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.kpi-footer {
    margin-top: auto;
    padding-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
}

.kpi-footer a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

.kpi-footer a:hover {
    text-decoration: underline;
}

.kpi-trend {
    color: #10b981;
    font-weight: 600;
}

/* Stock Status tiles */
.stock-tile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #f8fafc;
    border: 1px solid rgba(16,24,40,0.05);
    border-radius: 13px;
    padding: 0.85rem 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.stock-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(16,24,40,0.08);
}

.stock-tile .st-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
}

.st-icon-green  { background: linear-gradient(135deg, #10b981, #059669); }
.st-icon-yellow { background: linear-gradient(135deg, #f59e0b, #d97706); }
.st-icon-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.st-icon-blue   { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.st-icon-slate  { background: linear-gradient(135deg, #64748b, #475569); }
.st-icon-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }

.stock-tile .st-num {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.stock-tile .st-label {
    font-size: 0.74rem;
    color: #6b7280;
}

/* Alert banners */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: none;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin: 0;
}

.alert-banner .alert-banner-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
}

.alert-banner-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    box-shadow: 0 6px 18px rgba(217,119,6,0.12);
}

.alert-banner-warning .alert-banner-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.alert-banner-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    box-shadow: 0 6px 18px rgba(220,38,38,0.12);
}

.alert-banner-danger .alert-banner-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.alert-banner strong {
    display: block;
    font-size: 0.95rem;
}

.alert-banner p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.alert-banner .alert-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Activity feed */
.activity-list {
    padding: 0.25rem 0;
}

.activity-item {
    display: flex;
    gap: 0.9rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(16,24,40,0.05);
    transition: background 0.15s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(16,24,40,0.02);
}

.activity-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
}

.av-green  { background: linear-gradient(135deg, #10b981, #059669); }
.av-blue   { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.av-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.av-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.av-slate  { background: linear-gradient(135deg, #64748b, #475569); }

.activity-content {
    min-width: 0;
    flex: 1;
}

.activity-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #111827;
}

.activity-desc {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* Low stock list */
.lowstock-list {
    padding: 0.25rem 0;
}

.lowstock-item {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid rgba(16,24,40,0.05);
}

.lowstock-item:last-child {
    border-bottom: none;
}

.lowstock-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.lowstock-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lowstock-meta {
    font-size: 0.74rem;
    color: #6b7280;
    white-space: nowrap;
}

.lowstock-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(16,24,40,0.06);
    overflow: hidden;
}

.lowstock-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.lowstock-empty {
    text-align: center;
    color: #9ca3af;
    padding: 2rem 0;
    font-size: 0.85rem;
}

/* Chart toolbar */
.chart-toolbar .btn {
    border-radius: 9px;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}

.chart-toolbar .btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* Quick action buttons in page header */
.page-actions .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
}

.dash-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid rgba(16,24,40,0.06);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #111827;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
}

[data-bs-theme="dark"] .dash-date-chip {
    background: #1e2029;
    border-color: rgba(255,255,255,0.08);
    color: #e5e7eb;
}
