/* ================================================
   iStore Care – Custom Styles
   Brand Primary: #657967 (Sage Green)
================================================ */

/* ---------- Primary Color Overrides ---------- */
.bg-primary                { background-color: #657967 !important; }
.text-primary              { color: #657967 !important; }
.border-primary            { border-color: #657967 !important; }

.btn-primary {
    background-color: #657967 !important;
    border-color: #4d5e4f !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #4d5e4f !important;
    border-color: #3d4e3f !important;
    box-shadow: 0 0 0 0.2rem rgba(101,121,103,0.4) !important;
}
.btn-outline-primary {
    color: #657967 !important;
    border-color: #657967 !important;
}
.btn-outline-primary:hover {
    background-color: #657967 !important;
    color: #fff !important;
}

/* ---------- Sidebar ---------- */
.main-sidebar,
.sidebar-dark-primary {
    background-color: #2d3e30 !important;
}
.brand-link {
    background-color: #1e2d21 !important;
    border-bottom: 1px solid #3d5240 !important;
}
.brand-link:hover { background-color: #192519 !important; }

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-dark-primary .nav-sidebar > .nav-item.menu-is-opening > .nav-link {
    background-color: #657967 !important;
    color: #fff !important;
}
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background-color: rgba(101,121,103,0.3) !important;
    color: #fff !important;
}
.sidebar-dark-primary .nav-header { color: #8a9e8c !important; }
.user-panel .info a            { color: #c2d1c4 !important; }
.user-panel .info small        { color: #8a9e8c !important; }
.user-panel                    { border-bottom: 1px solid #3d5240 !important; }

/* ---------- Navbar ---------- */
.main-header.navbar-white { border-bottom: 1px solid #dee2e6; }

/* ---------- Login Page ---------- */
.login-page {
    background: linear-gradient(135deg, #1e2d21 0%, #4d6b50 55%, #8a9e8c 100%);
}
.login-card-body { border-top: 3px solid #657967 !important; }

/* ---------- Stat Cards ---------- */
.small-box.bg-primary { background-color: #657967 !important; }
.small-box h3         { font-size: 2.2rem; font-weight: 700; }

/* ---------- Cards ---------- */
.card-primary.card-outline { border-top: 3px solid #657967 !important; }
.card-header.bg-primary    { background-color: #657967 !important; color: #fff !important; }
.card-header .card-title   { font-size: 0.95rem; font-weight: 600; }

/* ---------- Welcome Banner ---------- */
.welcome-banner {
    background: linear-gradient(135deg, #2d3e30 0%, #657967 100%);
    color: #fff;
    border-radius: 10px;
    padding: 22px 28px;
    margin-bottom: 20px;
}
.welcome-banner h4  { margin-bottom: 4px; font-weight: 700; font-size: 1.15rem; }
.welcome-banner p   { margin-bottom: 0; opacity: 0.8; font-size: 0.88rem; }

/* ---------- Table ---------- */
.table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #657967;
    border-top: none;
    white-space: nowrap;
}
.table td          { vertical-align: middle; font-size: 0.875rem; }
.table-hover tbody tr:hover { background-color: #f0f4f0 !important; }

/* ---------- Status Badges ---------- */
.status-badge {
    font-size: 0.74rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}
.badge-received      { background-color: #6c757d; color: #fff; }
.badge-inspection    { background-color: #17a2b8; color: #fff; }
.badge-waiting-parts { background-color: #fd7e14; color: #fff; }
.badge-in-repair     { background-color: #e67e22; color: #fff; }
.badge-repaired      { background-color: #28a745; color: #fff; }
.badge-ready         { background-color: #657967; color: #fff; }
.badge-delivered     { background-color: #155724; color: #fff; }
.badge-cannot-repair { background-color: #dc3545; color: #fff; }
.badge-rejected      { background-color: #6f42c1; color: #fff; }
.badge-warranty      { background-color: #20c997; color: #fff; }
.badge-device-dead   { background-color: #212529; color: #fff; }
.badge-dead-risk     { background-color: #dc3545; color: #fff; font-size: 0.68rem; padding: 2px 7px; border-radius: 10px; font-weight: 700; }
.badge-warranty-job  { background-color: #0d6efd; color: #fff; font-size: 0.68rem; padding: 2px 7px; border-radius: 10px; font-weight: 700; }

/* ---------- Image Upload Boxes ---------- */
.img-upload-box {
    height: 130px;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 6px;
}
.img-upload-box:hover             { border-color: #657967; background: #f0f4f0; }
.img-upload-box.has-image         { border-color: #657967; border-style: solid; background: #fff; }
.img-upload-box img               { max-width: 100%; max-height: 128px; object-fit: contain; }

/* ---------- Form Helpers ---------- */
.form-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #657967;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 18px;
    margin-top: 4px;
}
.required-star { color: #dc3545; }

/* ---------- Status Timeline (in modal) ---------- */
.status-timeline          { position: relative; padding-left: 30px; }
.status-timeline::before  {
    content: '';
    position: absolute;
    left: 10px; top: 6px; bottom: 0;
    width: 2px;
    background: #dee2e6;
}
.timeline-item             { position: relative; margin-bottom: 18px; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}
.timeline-item.done::before    { background: #657967; box-shadow: 0 0 0 2px #657967; }
.timeline-item.current::before { background: #f39c12; box-shadow: 0 0 0 2px #f39c12; }
.timeline-label  { font-size: 0.875rem; font-weight: 600; color: #343a40; }
.timeline-date   { font-size: 0.75rem; color: #6c757d; }
.timeline-note   { font-size: 0.78rem; color: #6c757d; font-style: italic; }

/* ---------- Inward Slip ---------- */
.slip-page {
    max-width: 210mm;
    margin: 0 auto;
    background: #fff;
    padding: 20mm 18mm;
    font-family: 'Arial', sans-serif;
}
.slip-header          { border-bottom: 3px solid #657967; padding-bottom: 14px; margin-bottom: 18px; }
.slip-header h2       { color: #657967; font-size: 1.3rem; font-weight: 800; margin: 0; letter-spacing: 0.02em; }
.slip-header small    { font-size: 0.78rem; color: #6c757d; }
.job-badge {
    background: #657967;
    color: #fff;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-block;
}
.slip-section         { border: 1px solid #dee2e6; border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.slip-section-title   {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #657967;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 6px;
}
.slip-label  { font-size: 0.7rem; color: #6c757d; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }
.slip-value  { font-size: 0.88rem; color: #212529; font-weight: 500; border-bottom: 1px dotted #ced4da; padding-bottom: 2px; min-height: 22px; }
.slip-terms  {
    font-size: 0.72rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 4px;
    border-left: 3px solid #657967;
    margin-bottom: 14px;
}
.slip-terms li { margin-bottom: 3px; }
.signature-box {
    border-top: 1.5px solid #333;
    padding-top: 4px;
    margin-top: 44px;
    text-align: center;
    font-size: 0.72rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---------- Print ---------- */
@media print {
    .no-print            { display: none !important; }
    body                 { background: #fff !important; padding: 0 !important; margin: 0 !important; }
    .slip-page           { max-width: 100%; padding: 8mm 12mm; box-shadow: none !important; }
    .slip-page *         { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
