/* EXP.net app - Expansion Apparels Web ERP */

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 15px; } }

body { background: #f4f6f9; font-family: Arial, Helvetica, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
.erp-page { flex: 1; padding-bottom: 20px; }

/* ---------- Header ---------- */
.erp-header {
    background: #1d2b44;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.erp-brand { display: flex; align-items: center; }
.erp-logo { height: 50px; margin-right: 12px; background: #fff; padding: 4px; border-radius: 6px; }
.erp-title { color: #fff; font-size: 22px; font-weight: bold; }
.erp-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.erp-nav-btn {
    color: #fff; padding: 8px 15px; border-radius: 5px; border: 0;
    text-decoration: none; display: inline-block; font-size: 15px; cursor: pointer;
}
.erp-nav-btn:hover, .erp-nav-btn:focus { color: #fff; text-decoration: none; opacity: .9; }
.erp-nav-grey { background: #6c757d; }
.erp-nav-blue { background: #0d6efd; }
.erp-nav-active { background: #0d6efd; box-shadow: inset 0 -3px 0 #fff; }

@media (max-width: 576px) {
    .erp-header { padding: 10px; }
    .erp-title { font-size: 16px; }
    .erp-logo { height: 38px; }
}

.erp-footer { padding: 15px; text-align: center; color: #666; font-size: 13px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 85vh; display: flex; justify-content: center; align-items: center; background: #e5e7eb; margin: 0 -15px; padding: 20px; }
.login-box { width: 360px; max-width: 100%; background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 0 15px rgba(0,0,0,.1); }

/* ---------- Boxes, tabs, toolbar ---------- */
.main-box {
    background: #fff; margin-top: 20px; padding: 20px;
    border-radius: 10px; box-shadow: 0 0 10px rgba(0,0,0,.08); width: 100%;
}
@media (max-width: 576px) { .main-box { padding: 12px; } }

.tabs { margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a {
    padding: 10px 20px; text-decoration: none; background: #e9ecef; color: #000;
    border-radius: 5px; display: inline-block;
}
.tabs a:hover { text-decoration: none; background: #dde1e5; color: #000; }
.tabs a.active { background: #0d6efd; color: #fff; }

.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.total-qty { font-size: 26px; font-weight: bold; }
.total-qty small { font-size: 14px; font-weight: normal; }
.toolbar-search { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar-search .form-control { width: 340px; max-width: 100%; flex: 1 1 220px; }

/* ---------- Tables ---------- */
.table-scroll { max-height: 70vh; overflow: auto; border-radius: 6px; }
.erp-table { width: 100%; border-collapse: collapse; }
.erp-table th {
    background: #343a40; color: #fff; padding: 11px 12px; text-align: left;
    position: sticky; top: 0; z-index: 5; white-space: nowrap;
}
.erp-table td { padding: 10px 12px; border-bottom: 1px solid #ddd; vertical-align: middle; }
.erp-table tbody tr:hover { background: #f5f5f5; }
.erp-table tr.invoice-row, .erp-table tr.invoice-row:hover { background: #6c757d; color: #fff; }
.erp-table tr.row-problem { background: #fff3f3; }
.invoice-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.sep { display: inline-block; width: 18px; }
.remarks-cell { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #555; font-size: 13px; }
.erp-table .btn + .btn { margin-left: 4px; }

.pill { color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.pill-urgent { background: #dc3545; }
.pill-normal { background: #28a745; }

.status-closed { color: green; font-weight: bold; }
.status-problem { color: red; font-weight: bold; }
.status-rectified { color: orange; font-weight: bold; }

.big-check { width: 20px; height: 20px; cursor: pointer; }

/* ---------- Dashboard ---------- */
.dashboard-container { padding: 20px 5px; }
.dashboard-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.dashboard-card {
    background: #fff; border-radius: 12px; padding: 25px; text-decoration: none; color: #000;
    box-shadow: 0 0 10px rgba(0,0,0,.08); transition: .2s;
}
.dashboard-card:hover { transform: translateY(-3px); box-shadow: 0 0 15px rgba(0,0,0,.15); text-decoration: none; color: #000; }
.card-title { font-size: 20px; margin-bottom: 15px; color: #666; }
.card-value { font-size: 38px; font-weight: bold; color: #0d6efd; }

.shipment-section { margin-top: 30px; }
.shipment-title { font-size: 24px; font-weight: bold; }
.shipment-item {
    display: block; background: #fff; border-radius: 10px; border-left: 5px solid #0d6efd;
    padding: 15px 20px; margin-bottom: 10px; box-shadow: 0 0 10px rgba(0,0,0,.08);
    color: inherit; text-decoration: none; transition: .2s;
}
a.shipment-item:hover { transform: translateY(-2px); box-shadow: 0 0 15px rgba(0,0,0,.15); background: #f8f9fa; color: inherit; text-decoration: none; }
.shipment-invoice { font-size: 18px; font-weight: bold; }
.shipment-info { color: #666; margin-top: 5px; }
.shipment-date { color: #999; font-size: 13px; margin-top: 3px; }

/* ---------- Shipment page ---------- */
.shipment-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 15px; }
.shipment-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Busy overlay (updates) ---------- */
.busy-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,.85); z-index: 2000;
    display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold;
}
