html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* =========================================================
   THIET BI DETAILS - QR / BARCODE COMPACT
   ========================================================= */

.thiet-bi-code-card {
    padding: 8px 10px;
    min-height: auto;
}

    .thiet-bi-code-card .qr-image {
        width: 220px;
        height: 220px;
        object-fit: contain;
    }

    .thiet-bi-code-card .barcode-image {
        max-width: 170px;
        height: 34px;
        object-fit: contain;
    }

    .thiet-bi-code-card .code-title {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .thiet-bi-code-card .code-line {
        font-size: 12px;
        line-height: 1.25;
    }

    .thiet-bi-code-card .code-actions {
        margin-top: 4px;
    }

@media (max-width: 991.98px) {
    .thiet-bi-code-card .qr-image {
        width: 72px;
        height: 72px;
    }

    .thiet-bi-code-card .barcode-image {
        max-width: 150px;
        height: 30px;
    }
}

/* Trang chủ công khai, đăng nhập và dashboard tổng hợp */
.home-hero{min-height:420px;background:linear-gradient(105deg,rgba(6,55,115,.96),rgba(13,110,253,.78)),url('/images/medical-equipment-login.png') center/cover;color:#fff;display:flex;align-items:center}.home-hero-content{max-width:760px;padding:64px}.home-eyebrow{font-size:.8rem;font-weight:700;letter-spacing:.14em}.home-hero h1{font-size:clamp(2.1rem,4vw,3.7rem);font-weight:750;line-height:1.08;margin:18px 0}.home-hero p{font-size:1.15rem;line-height:1.7;opacity:.9;margin-bottom:28px}.process-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.process-card{position:relative;border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:24px;box-shadow:0 8px 25px rgba(15,23,42,.05);transition:.2s}.process-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(15,23,42,.11);border-color:#93c5fd}.process-card>span{position:absolute;right:18px;top:14px;color:#cbd5e1;font-size:1.45rem;font-weight:800}.process-card>i{font-size:1.75rem;color:#0d6efd}.process-card h3{font-size:1rem;margin:18px 0 8px}.process-card p{font-size:.9rem;color:#64748b;margin:0}.home-summary{display:grid;grid-template-columns:repeat(3,1fr);background:#eef6ff;padding:28px;gap:24px}.home-summary>div{display:grid;grid-template-columns:44px 1fr;column-gap:12px}.home-summary i{grid-row:1/3;font-size:1.8rem;color:#0d6efd}.home-summary h3{font-size:1rem;margin:0 0 5px}.home-summary p{color:#64748b;margin:0;font-size:.9rem}
.login-shell{min-height:calc(100vh - 165px);display:grid;grid-template-columns:minmax(0,1.35fr) minmax(410px,.65fr);margin:-12px;border-radius:0 0 18px 18px;overflow:hidden;background:#fff}.login-visual{min-height:640px;background:linear-gradient(0deg,rgba(3,37,77,.62),rgba(3,37,77,.05)),url('/images/medical-equipment-login.png') center/cover;display:flex;align-items:flex-end;padding:54px;color:#fff}.login-visual-caption{max-width:640px}.login-visual-caption span{font-weight:750;letter-spacing:.12em}.login-visual-caption h1{font-size:2.45rem;font-weight:750;margin:12px 0}.login-visual-caption p{font-size:1.1rem;opacity:.9}.login-panel{display:flex;align-items:center;justify-content:center;padding:48px}.login-form-wrap{width:100%;max-width:430px}.login-mark{width:58px;height:58px;border-radius:16px;background:#eaf3ff;color:#0d6efd;display:grid;place-items:center;font-size:1.75rem;margin-bottom:22px}.login-form-wrap h2{font-size:2rem;font-weight:750}.login-form-wrap .input-group-text{background:#f8fafc;color:#64748b}
.dashboard-main-header{background:linear-gradient(120deg,#063773,#0d6efd);color:#fff;border-radius:16px;padding:28px 32px;display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.dashboard-main-header span{font-size:.78rem;font-weight:700;letter-spacing:.14em}.dashboard-main-header h2{margin:6px 0}.dashboard-main-header p{margin:0;opacity:.8}.dashboard-total{text-align:right;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.2);border-radius:14px;padding:13px 22px}.dashboard-total small{display:block}.dashboard-total strong{font-size:2rem}.dashboard-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}.dashboard-module{--module:#0d6efd;display:grid;grid-template-columns:56px 1fr;gap:16px;padding:22px;border-radius:15px;border:1px solid #e2e8f0;background:#fff;text-decoration:none;color:#172033;box-shadow:0 6px 20px rgba(15,23,42,.05);transition:.2s}.dashboard-module:hover{color:#172033;transform:translateY(-3px);box-shadow:0 12px 26px rgba(15,23,42,.12);border-color:var(--module)}.module-icon{width:56px;height:56px;border-radius:15px;background:color-mix(in srgb,var(--module) 12%,white);color:var(--module);display:grid;place-items:center;font-size:1.5rem}.dashboard-module span,.dashboard-module small{display:block}.dashboard-module span{font-weight:650}.dashboard-module strong{font-size:1.8rem;color:var(--module)}.dashboard-module small{color:#64748b;margin-top:6px}.module-bar{height:6px;background:#edf2f7;border-radius:5px;overflow:hidden}.module-bar b{display:block;height:100%;min-width:3px;background:var(--module);border-radius:5px}.module-danger{--module:#dc3545}.module-blue{--module:#0d6efd}.module-cyan{--module:#0891b2}.module-orange{--module:#ea580c}.module-purple{--module:#7c3aed}.module-gray{--module:#475569}.module-green{--module:#198754}.dashboard-note .card-body{display:flex;gap:14px;align-items:center}.dashboard-note i{color:#0d6efd;font-size:1.5rem}
@media(max-width:1100px){.process-grid{grid-template-columns:repeat(2,1fr)}.dashboard-module-grid{grid-template-columns:repeat(2,1fr)}.login-shell{grid-template-columns:1fr 430px}}@media(max-width:767px){.home-hero-content{padding:38px 24px}.process-grid,.home-summary,.dashboard-module-grid{grid-template-columns:1fr}.login-shell{display:block;margin:-12px}.login-visual{min-height:240px;padding:24px}.login-visual-caption h1{font-size:1.7rem}.login-panel{padding:32px 22px}.dashboard-main-header{align-items:flex-start;gap:16px}.dashboard-total{padding:10px 14px}}

/* Giữ toàn bộ trang Home trong một khung nhìn desktop. */
@media (min-width: 992px) and (min-height: 700px) {
  html:has(.home-page), body:has(.home-page) { height: 100%; overflow: hidden; }
  body:has(.home-page) { display: flex; flex-direction: column; margin-bottom: 0; }
  body:has(.home-page) > header { flex: 0 0 auto; }
  body:has(.home-page) .erp-main { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 10px 0; }
  body:has(.home-page) .erp-main > .container-fluid { height: 100%; }
  .home-page { height: 100%; display: grid; grid-template-rows: minmax(225px, 35%) minmax(0, 1fr) auto; gap: 9px; overflow: hidden; }
  .home-page .home-hero { min-height: 0; height: 100%; }
  .home-page .home-hero-content { max-width: 690px; padding: 26px 46px; }
  .home-page .home-eyebrow { font-size: .72rem; }
  .home-page .home-hero h1 { font-size: clamp(2rem, 3vw, 3rem); margin: 10px 0; }
  .home-page .home-hero p { font-size: .95rem; line-height: 1.45; margin-bottom: 16px; }
  .home-process { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .home-process-heading { margin-bottom: 7px; }
  .home-process-heading span { font-size: .68rem; }
  .home-process-heading h2 { font-size: 1.35rem; margin: 1px 0; }
  .home-process-heading p { font-size: .76rem; margin: 0; }
  .home-page .process-grid { min-height: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-page .process-card { min-height: 0; padding: 10px 15px; border-radius: 11px; }
  .home-page .process-card > i { font-size: 1.18rem; }
  .home-page .process-card > span { top: 7px; right: 11px; font-size: .95rem; }
  .home-page .process-card h3 { font-size: .84rem; margin: 5px 0 2px; }
  .home-page .process-card p { font-size: .7rem; line-height: 1.25; }
  .home-page .home-summary { padding: 8px 15px; gap: 10px; }
  .home-page .home-summary > div { grid-template-columns: 28px 1fr; column-gap: 7px; }
  .home-page .home-summary i { font-size: 1.15rem; }
  .home-page .home-summary h3 { font-size: .78rem; margin: 0; }
  .home-page .home-summary p { font-size: .68rem; line-height: 1.2; }
}
