:root{--nav:#111827;--nav2:#1f2937;--bg:#f3f4f6;--card:#fff;--line:#d9dee8;--text:#111827;--muted:#6b7280;--accent:#0f766e;--danger:#b91c1c;--warn:#b45309;--success:#047857}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}a{color:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:230px;min-width:230px;background:linear-gradient(180deg,var(--nav),var(--nav2));color:#fff;padding:18px 14px;position:fixed;top:0;bottom:0;overflow:auto}.sidebar-logo-wrap{width:100%;padding:14px 12px 10px;text-align:center}.sidebar-logo{display:block;max-width:170px;max-height:80px;object-fit:contain;margin:0 auto 8px}.brand{display:flex;gap:10px;align-items:center;margin-bottom:18px;padding:8px 8px 14px;border-bottom:1px solid rgba(148,163,184,.25)}.brand strong{overflow-wrap:anywhere}.brand span,.topbar span{display:block;color:#9ca3af;font-size:12px;margin-top:3px}.sidebar nav{display:grid;gap:7px}.sidebar a{display:flex;align-items:center;width:100%;min-height:40px;padding:10px 12px;margin:4px 0;box-sizing:border-box;border-radius:10px;text-decoration:none;color:#e5e7eb;line-height:1.2;font-size:14px;font-weight:500;transition:background .15s ease,transform .08s ease}.sidebar a:hover{background:rgba(255,255,255,.10);transform:translateX(2px)}.main{margin-left:230px;width:calc(100% - 230px)}.topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:3}.content{padding:24px}h1{font-size:26px;margin:0 0 18px}h2{font-size:18px;margin:0 0 14px}h3{font-size:15px;margin:14px 0 8px}.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px;margin-bottom:18px;box-shadow:0 6px 18px rgba(15,23,42,.05)}.grid{display:grid;gap:14px}.cards{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.form-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));align-items:end}.metric{font-size:34px;font-weight:800;margin:0;color:#111827}.bubble{display:inline-block;background:#ecfeff;border:1px solid #a5f3fc;color:#155e75;border-radius:999px;padding:8px 13px;font-weight:800;margin-bottom:12px}.muted{color:var(--muted);font-size:13px}.red-row td,.overdue{background:#fef2f2!important;color:#991b1b!important}input,select,textarea{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:10px 11px;font:inherit;background:#fff}textarea{min-height:92px}label{font-weight:600;font-size:13px}.field-block{padding:14px;border:1px solid var(--line);border-radius:12px;margin:12px 0;background:#fafafa}.field-block small{display:block;color:var(--muted);margin:3px 0 7px}.btn{display:inline-block;border:0;border-radius:9px;background:#111827;color:#fff;padding:10px 14px;text-decoration:none;font-weight:700;cursor:pointer;margin:4px 4px 4px 0}.btn.secondary{background:#e5e7eb;color:#111827}.btn.danger{background:var(--danger)}.btn.success{background:var(--success)}.btn.small{padding:6px 9px;font-size:12px}.btn.full{width:100%;margin-top:14px}.tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.tabs a{background:#fff;border:1px solid var(--line);padding:9px 12px;border-radius:999px;text-decoration:none;font-weight:700;color:#111827}.flash-wrap{margin-bottom:15px}.flash{padding:12px 14px;border-radius:10px;margin-bottom:8px;border:1px solid #fed7aa;background:#fff7ed;color:#9a3412}.flash.success{background:#ecfdf5;color:#065f46;border-color:#a7f3d0}.flash.danger{background:#fef2f2;color:#991b1b;border-color:#fecaca}.flash.warning{background:#fffbeb;color:#92400e;border-color:#fde68a}table{width:100%;border-collapse:collapse;margin-top:12px;background:#fff}th,td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;font-size:13px}th{background:#f8fafc;font-size:12px;text-transform:uppercase;letter-spacing:.03em}.pill{display:inline-block;padding:3px 8px;border-radius:999px;background:#e5e7eb;font-size:12px;font-weight:700}.pill.warn{background:#ffedd5;color:#9a3412}.pill.ok{background:#dcfce7;color:#166534}.perm-box{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:6px;border:1px solid var(--line);border-radius:10px;padding:10px;background:#f8fafc}.row-card{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:9px;align-items:center;border:1px solid var(--line);padding:12px;border-radius:12px;margin:10px 0;background:#fafafa}.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.inline-form input{max-width:360px}.search{max-width:430px;margin-bottom:14px}.req{color:var(--danger)}.login-body{background:#f3f4f6;display:grid;place-items:start center;min-height:100vh;padding-top:70px}.login-card{width:min(460px,92vw);background:#fff;border-radius:14px;padding:24px;box-shadow:0 10px 35px rgba(15,23,42,.12)}.login-card h1{margin-bottom:5px}.login-card p{color:var(--muted);margin-top:0}.settings-logo-preview{max-width:240px;max-height:90px;object-fit:contain;margin-top:8px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;padding:6px}.full-width{grid-column:1/-1}.signature-wrap{border:1px solid #d1d5db;border-radius:10px;background:#fff;padding:10px;max-width:560px}.signature-pad{width:100%;height:180px;border:1px dashed #9ca3af;border-radius:8px;background:#fff;touch-action:none;display:block}.signature-actions{margin-top:8px}.checkline{display:inline-flex;align-items:center;gap:6px;margin:5px 12px 5px 0;font-weight:500}.radio-group{padding:6px 0}.table-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}.planning-cell{min-width:220px}.planning-cell textarea{min-height:60px}.compact-table .btn.small{white-space:nowrap}@media(max-width:850px){.app-shell{display:block}.sidebar{position:relative;width:100%;bottom:auto}.main{margin-left:0;width:100%}.topbar{position:relative}.content{padding:14px}table{display:block;overflow-x:auto}.row-card,.form-grid{grid-template-columns:1fr}.tabs{overflow:auto}.sidebar nav{grid-template-columns:repeat(2,1fr)}}


/* =========================================================
   Davron two-factor authentication design
   ========================================================= */

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header h1 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
}

.auth-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #111827;
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
}

.auth-description {
    max-width: 370px;
    margin: 0 auto;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.auth-user {
    padding: 11px 13px;
    margin: 0 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #f8fafc;
    color: #4b5563;
    font-size: 13px;
    text-align: center;
}

.twofa-method-form {
    display: grid;
    gap: 11px;
}

.twofa-method-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.twofa-method-option:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.twofa-method-option:has(input:checked) {
    border-color: #111827;
    background: #f8fafc;
    box-shadow: 0 0 0 1px #111827;
}

.twofa-method-option input {
    width: auto;
    margin: 3px 0 0;
    accent-color: #111827;
}

.twofa-method-content {
    display: block;
    min-width: 0;
}

.twofa-method-title {
    display: block;
    margin-bottom: 3px;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
}

.twofa-method-detail {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.twofa-code-form label {
    display: block;
    margin-bottom: 7px;
}

.twofa-code-input {
    height: 55px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-align: center;
}

.twofa-code-input:focus {
    border-color: #111827;
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.twofa-code-input::placeholder {
    color: #cbd5e1;
}

.auth-primary-button {
    min-height: 45px;
    margin-top: 14px;
}

.auth-secondary-button {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 11px 14px;
    border-radius: 9px;
    background: #e5e7eb;
    color: #111827;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.auth-secondary-button:hover {
    background: #d1d5db;
}

.auth-secondary-link {
    display: block;
    margin-top: 15px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
}

.auth-secondary-link:hover {
    color: #111827;
    text-decoration: underline;
}

.auth-help-text {
    margin-top: 12px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.auth-notice {
    padding: 13px;
    margin-bottom: 15px;
    border: 1px solid #fed7aa;
    border-radius: 9px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.45;
}

.auth-notice-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 520px) {
    .login-body {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .login-card {
        width: min(430px, 92vw);
        padding: 20px;
    }

    .twofa-code-input {
        font-size: 23px;
        letter-spacing: 0.24em;
    }
}


/* Baseline simple 2FA method buttons */
.simple-signin-user {
    padding: 10px 14px;
    margin: 0 0 17px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #f8fafc;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

.simple-signin-user strong {
    color: #111827;
}

.simple-method-form {
    display: grid;
    gap: 11px;
}

.simple-method-button {
    min-height: 48px;
    margin: 0;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 800;
}

.whatsapp-default-button {
    background: #111827;
    color: #ffffff;
}

.whatsapp-default-button:hover {
    background: #1f2937;
}

.email-code-button {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
}

.email-code-button:hover {
    border-color: #9ca3af;
    background: #f8fafc;
}


/* =========================================================
   Baseline login matched to Landing Settings login
   ========================================================= */

.baseline-login-form label {
    display: block;
    margin: 0 0 7px;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.baseline-login-form input {
    width: 100%;
    height: 40px;
    margin: 0 0 13px;
    padding: 10px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    font: inherit;
}

.baseline-login-form input:focus {
    border-color: #111827;
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.baseline-login-form .auth-primary-button {
    min-height: 45px;
    margin-top: 14px;
}

.login-card .baseline-login-form + * {
    margin-top: 15px;
}


/* Asset Register summary cards */
.asset-page-heading {
    margin-bottom: 18px;
}

.asset-page-heading h1 {
    margin-bottom: 4px;
}

.asset-page-heading p {
    margin: 0;
}

.asset-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.asset-summary-card {
    min-height: 112px;
    padding: 18px;
    border: 1px solid #d7e0e9;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.asset-summary-card span {
    display: block;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.asset-summary-card strong {
    display: block;
    margin: 9px 0 5px;
    font-size: 1.65rem;
    line-height: 1.15;
    color: #172033;
}

.asset-summary-card small {
    color: #64748b;
}

@media (max-width: 1050px) {
    .asset-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .asset-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* Asset export actions */
.asset-page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.asset-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 700px) {
    .asset-page-heading {
        display: block;
    }

    .asset-export-actions {
        margin-top: 14px;
    }

    .asset-export-actions .btn {
        width: 100%;
    }
}


/* Flexible reminder scheduling */
.schedule-page-heading {
    margin-bottom: 18px;
}

.schedule-page-heading h1 {
    margin-bottom: 4px;
}

.schedule-page-heading p {
    margin: 0;
}

.schedule-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.schedule-weekday-section {
    padding: 14px;
    border: 1px solid #d7e0e9;
    border-radius: 8px;
    background: #f8fafc;
}

.schedule-weekday-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 14px;
}

.schedule-weekday {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 400;
}

.schedule-weekday input {
    width: auto;
    margin: 0;
}

.schedule-input-suffix {
    display: flex;
    align-items: center;
    gap: 9px;
}

.schedule-input-suffix input {
    flex: 1;
}

.schedule-input-suffix span {
    color: #64748b;
    white-space: nowrap;
}

.schedule-table {
    min-width: 1180px;
}

.schedule-recipient-text {
    max-width: 230px;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.schedule-error-text {
    max-width: 230px;
    margin-top: 7px;
    color: #b42318;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.schedule-edit-form {
    min-width: 620px;
    padding-top: 14px;
}

.schedule-empty-state {
    padding: 32px !important;
    color: #64748b;
    text-align: center;
}

[data-schedule-group][hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .schedule-weekday-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .schedule-edit-form {
        min-width: 460px;
    }
}

@media (max-width: 620px) {
    .schedule-weekday-grid {
        grid-template-columns: 1fr;
    }

    .schedule-edit-form {
        min-width: 300px;
    }
}

/* ATTENDANCE REGISTER START */

.attendance-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.attendance-heading h1 {
  margin-bottom: 0.25rem;
}

.attendance-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.attendance-navigation,
.attendance-filter-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.attendance-filter-form label {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  margin: 0;
}

.attendance-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  margin-bottom: 1rem;
}

.attendance-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.attendance-summary-card strong {
  font-size: 1.6rem;
}

.attendance-summary-present {
  background: #dcfce7;
  color: #166534;
}

.attendance-summary-missing {
  background: #fee2e2;
  color: #991b1b;
}

.attendance-summary-pending {
  background: #fef3c7;
  color: #92400e;
}

.attendance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.attendance-legend-item {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
}

.attendance-table-card {
  margin-bottom: 1rem;
  padding: 0;
}

.attendance-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.attendance-table {
  border-collapse: collapse;
  min-width: 1250px;
  width: 100%;
}

.attendance-table th,
.attendance-table td {
  text-align: center;
  vertical-align: top;
}

.attendance-table th {
  white-space: nowrap;
}

.attendance-user-column {
  min-width: 190px;
  position: sticky;
  left: 0;
  text-align: left !important;
  z-index: 2;
}

.attendance-table th.attendance-user-column {
  z-index: 3;
}

.attendance-table td.attendance-user-column {
  background: var(--card-bg, #ffffff);
}

.attendance-cell {
  border-radius: 0;
  min-width: 118px;
}

.attendance-cell strong,
.attendance-cell span {
  display: block;
}

.attendance-cell span {
  font-size: 0.76rem;
  margin-top: 0.2rem;
}

.attendance-status-present {
  background: #dcfce7;
  color: #166534;
}

.attendance-status-missing {
  background: #fee2e2;
  color: #991b1b;
}

.attendance-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.attendance-status-not_required,
.attendance-status-not_tracked,
.attendance-status-future {
  background: #f1f5f9;
  color: #64748b;
}

.attendance-today-heading {
  background: #e0f2fe;
}

.attendance-total-present {
  color: #166534;
  font-weight: 700;
}

.attendance-total-missing {
  color: #991b1b;
  font-weight: 700;
}

.attendance-empty {
  padding: 2rem;
  text-align: center;
}

.attendance-note {
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .attendance-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-summary-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

/* ATTENDANCE REGISTER END */

/* FACTORY RESET LAYOUT START */

.factory-reset-page {
  margin: 0 auto;
  max-width: 1250px;
}

.factory-reset-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.factory-reset-heading h1 {
  margin-bottom: 0.35rem;
}

.factory-reset-admin-badge {
  background: #111827;
  border-radius: 999px;
  color: #ffffff;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.85rem;
  text-transform: uppercase;
}

.factory-reset-warning {
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 14px;
  color: #9a3412;
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  padding: 1rem 1.1rem;
}

.factory-reset-warning-icon {
  align-items: center;
  background: #c2410c;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  flex: 0 0 30px;
  font-size: 1rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
}

.factory-reset-warning p {
  margin: 0.3rem 0 0;
}

.factory-reset-card-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.factory-reset-card-heading h2 {
  margin-bottom: 0.25rem;
}

.factory-reset-total {
  align-items: flex-end;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-width: 130px;
  padding: 0.7rem 0.9rem;
}

.factory-reset-total span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.factory-reset-total strong {
  font-size: 1.5rem;
  margin-top: 0.2rem;
}

.factory-reset-step {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.4rem 0.75rem;
}

.factory-reset-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.factory-reset-table,
.factory-reset-selection-table {
  margin-top: 0;
  min-width: 760px;
}

.factory-reset-table th,
.factory-reset-selection-table th {
  background: #f1f5f9;
}

.factory-reset-table td,
.factory-reset-selection-table td {
  vertical-align: middle;
}

.factory-reset-count-column {
  text-align: center !important;
  white-space: nowrap;
  width: 120px;
}

.factory-reset-count {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  display: inline-block;
  font-weight: 800;
  min-width: 42px;
  padding: 0.3rem 0.65rem;
  text-align: center;
}

.factory-reset-count-empty {
  background: #f1f5f9;
  color: #64748b;
}

.factory-reset-section-heading {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.factory-reset-section-heading h3,
.factory-reset-option-section h3,
.factory-reset-confirmation h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.factory-reset-select-column {
  text-align: center !important;
  width: 80px;
}

.factory-reset-checkbox {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.factory-reset-checkbox input[type="checkbox"] {
  height: 19px;
  margin: 0;
  width: 19px;
}

.factory-reset-section-label {
  cursor: pointer;
  font-size: 0.84rem;
}

.factory-reset-option-section,
.factory-reset-confirmation {
  border-top: 1px solid var(--line);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.factory-reset-file-option {
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  display: flex;
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
}

.factory-reset-file-option input[type="checkbox"] {
  flex: 0 0 auto;
  height: 19px;
  margin: 0.1rem 0 0;
  width: 19px;
}

.factory-reset-file-option span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.factory-reset-file-option small {
  color: #9a3412;
  font-weight: 400;
}

.factory-reset-confirm-grid {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(180px, 0.45fr) minmax(260px, 1fr);
  margin-top: 0.8rem;
}

.factory-reset-confirm-phrase {
  background: #111827;
  border-radius: 10px;
  color: #ffffff;
  font-family: Consolas, Monaco, monospace;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.75rem 1rem;
  text-align: center;
}

.factory-reset-action-bar {
  align-items: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding: 1rem;
}

.factory-reset-action-bar div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.factory-reset-action-bar strong {
  color: #991b1b;
}

.factory-reset-action-bar span {
  color: #7f1d1d;
  font-size: 0.8rem;
}

.factory-reset-submit {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.75rem 1rem;
}

@media (max-width: 760px) {
  .factory-reset-heading,
  .factory-reset-card-heading,
  .factory-reset-action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .factory-reset-admin-badge,
  .factory-reset-step {
    align-self: flex-start;
  }

  .factory-reset-total {
    align-items: flex-start;
  }

  .factory-reset-confirm-grid {
    grid-template-columns: 1fr;
  }

  .factory-reset-submit {
    width: 100%;
  }
}

/* FACTORY RESET LAYOUT END */

/* ACTION TODO LAYOUT START */

.action-todo-page {
  margin: 0 auto;
  max-width: 1450px;
}

.action-todo-heading,
.action-todo-card-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.action-todo-heading {
  margin-bottom: 18px;
}

.action-todo-heading h1,
.action-todo-card-heading h2 {
  margin-bottom: 4px;
}

.action-todo-manager-badge {
  background: #111827;
  border-radius: 999px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  text-transform: uppercase;
}

.action-todo-create-card {
  border-top: 4px solid var(--accent);
}

.action-todo-create-form {
  margin-top: 16px;
}

.action-todo-notification-options {
  align-self: end;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  grid-column: 1 / -1;
  padding: 8px 12px;
}

.action-todo-notification-options input {
  height: 18px;
  margin: 0;
  width: 18px;
}

.action-todo-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.action-todo-filter-actions .btn {
  margin-bottom: 0;
}

.action-todo-count {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  min-width: 38px;
  padding: 7px 11px;
  text-align: center;
}

.action-todo-count-completed {
  background: #dcfce7;
  color: #166534;
}

.action-todo-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.action-todo-table {
  margin-top: 14px;
  min-width: 1120px;
}

.action-todo-table th {
  background: #f1f5f9;
}

.action-todo-table td {
  vertical-align: middle;
}

.action-todo-message-cell {
  min-width: 280px;
  width: 32%;
}

.action-todo-message {
  display: block;
  line-height: 1.45;
  white-space: pre-wrap;
}

.action-todo-meta,
.action-todo-completed-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}

.action-todo-completed-meta {
  color: #166534;
  font-weight: 700;
}

.action-todo-allocation {
  background: #f1f5f9;
  border-radius: 8px;
  display: inline-block;
  font-weight: 700;
  padding: 6px 9px;
}

.action-todo-urgency {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  min-width: 68px;
  padding: 5px 9px;
  text-align: center;
}

.action-todo-urgency-low {
  background: #dcfce7;
  color: #166534;
}

.action-todo-urgency-medium {
  background: #ffedd5;
  color: #9a3412;
}

.action-todo-urgency-high {
  background: #fee2e2;
  color: #991b1b;
}

.action-todo-overdue td {
  background: #fff7ed;
}

.action-todo-overdue-text {
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  text-transform: uppercase;
}

.action-todo-comments-cell {
  min-width: 210px;
}

.action-todo-controls-cell {
  min-width: 150px;
}

.action-todo-details {
  margin: 5px 0;
}

.action-todo-details summary {
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.action-todo-comment-list {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.action-todo-comment {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 7px;
  padding: 8px;
}

.action-todo-comment div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.action-todo-comment span {
  color: var(--muted);
  font-size: 10px;
}

.action-todo-comment p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.action-todo-comment-form,
.action-todo-edit-form,
.action-todo-delete-form {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding: 10px;
}

.action-todo-comment-form textarea {
  min-height: 70px;
}

.action-todo-edit-form {
  min-width: 300px;
}

.action-todo-delete-form {
  background: #fef2f2;
  border-color: #fecaca;
}

.action-todo-delete summary {
  color: #991b1b;
}

.action-todo-control-form {
  margin-bottom: 6px;
}

.action-todo-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  margin-top: 14px;
  padding: 25px;
  text-align: center;
}

@media (max-width: 760px) {
  .action-todo-heading,
  .action-todo-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .action-todo-manager-badge {
    align-self: flex-start;
  }

  .action-todo-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .action-todo-filter-actions .btn {
    text-align: center;
    width: 100%;
  }
}

/* ACTION TODO LAYOUT END */

/* REPORT TEMPLATE EDITOR START */
.page-heading-row,
.template-editor-header,
.template-field-toolbar,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.template-editor-header {
  margin-top: 12px;
}

.template-editor-field {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
}

.template-field-toolbar {
  margin-bottom: 12px;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.report-template-actions {
  margin-bottom: 8px;
}

.danger-text {
  color: #b91c1c;
}

.alert.warning {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
}

@media (max-width: 760px) {
  .page-heading-row,
  .template-editor-header,
  .template-field-toolbar,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
/* REPORT TEMPLATE EDITOR END */

/* REPORT COMPLETION MEDIA START */
.report-image-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
}

.report-image-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  margin-bottom: 10px;
  border-radius: 8px;
  object-fit: contain;
}

.signature-wrap {
  width: 100%;
}

.signature-pad {
  display: block;
  width: 100%;
  height: 220px;
  background: #ffffff;
  border: 2px solid var(--border, #94a3b8);
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
}

.signature-pad:focus,
.signature-pad:hover {
  border-color: var(--primary, #2563eb);
}

.signature-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.signature-status {
  min-height: 20px;
}

@media (max-width: 760px) {
  .signature-pad {
    height: 180px;
  }

  .signature-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
/* REPORT COMPLETION MEDIA END */

/* GOOGLE MAP DIAGNOSTICS START */
.google-map-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
}

.google-map-status:empty {
  display: none;
}

.google-map-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.google-map-success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.google-map-canvas {
  width: 100%;
  min-height: 420px;
  margin-top: 12px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
  background: #e5e7eb;
}

@media (max-width: 760px) {
  .google-map-canvas {
    min-height: 320px;
  }
}
/* GOOGLE MAP DIAGNOSTICS END */

/* PROFESSIONAL REPORT TABLES START */

.report-page-heading {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
}

.report-page-label {
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary, #2563eb);
}

.report-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.report-summary-item {
  min-width: 120px;
  padding: 12px 16px;
  text-align: center;
  border: 1px solid var(--border, #d9e0e8);
  border-radius: 10px;
  background: var(--surface, #ffffff);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.report-summary-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text, #172033);
}

.report-summary-label {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #687386);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-table-card {
  padding: 0;
  overflow: hidden;
}

.report-table-card + .report-table-card {
  margin-top: 24px;
}

.report-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border, #d9e0e8);
}

.report-section-header h2 {
  margin: 0 0 4px;
}

.report-section-header p {
  margin: 0;
}

.report-table-tools {
  flex: 0 1 340px;
}

.report-search-wrap {
  display: block;
  margin: 0;
}

.report-search-input {
  width: 100%;
  min-width: 260px;
  margin: 0;
}

.report-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.professional-report-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.professional-report-table th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border, #d9e0e8);
  background: var(--surface-soft, #f6f8fb);
  color: var(--muted, #687386);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.professional-report-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border, #e2e7ee);
  vertical-align: middle;
}

.professional-report-table tbody tr {
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.professional-report-table tbody tr:hover {
  background: var(--surface-soft, #f8fafc);
}

.professional-report-table tbody tr:last-child td {
  border-bottom: 0;
}

.report-name-cell,
.report-user-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
}

.report-icon-box,
.report-user-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.report-icon-box {
  color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.report-user-avatar {
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary, #2563eb);
}

.report-primary-text,
.report-user-cell strong {
  display: block;
  color: var(--text, #172033);
}

.report-secondary-text,
.report-user-cell span,
.report-date-cell span {
  display: block;
  margin-top: 2px;
  color: var(--muted, #687386);
  font-size: 0.78rem;
}

.report-description-cell {
  min-width: 220px;
  max-width: 440px;
  color: var(--text, #344054);
  line-height: 1.45;
}

.report-type-badge,
.report-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-type-badge.general {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.report-type-badge.hr {
  color: #7e22ce;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
}

.report-field-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  font-weight: 800;
  background: var(--surface-soft, #f1f5f9);
  border: 1px solid var(--border, #d9e0e8);
}

.report-number-column {
  text-align: center !important;
}

.report-action-column {
  text-align: right !important;
  white-space: nowrap;
}

.report-complete-button,
.report-pdf-button {
  min-width: 112px;
  text-align: center;
}

.report-date-cell {
  min-width: 145px;
}

.report-date-cell strong {
  display: block;
  white-space: nowrap;
}

.report-reference-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  font-size: 0.82rem;
}

.report-status-badge.final {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.report-status-badge.draft {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.report-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.report-document-missing {
  color: var(--muted, #687386);
  font-size: 0.78rem;
  white-space: nowrap;
}

.report-empty-cell {
  padding: 40px 20px !important;
  text-align: center;
}

.report-empty-state {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted, #687386);
}

.report-empty-state strong {
  color: var(--text, #172033);
  font-size: 1rem;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) {
  .report-page-heading,
  .report-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .report-summary-strip {
    justify-content: flex-start;
  }

  .report-summary-item {
    flex: 1 1 110px;
  }

  .report-table-tools {
    flex-basis: auto;
  }

  .report-search-input {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .report-table-card {
    overflow: visible;
    background: transparent;
    box-shadow: none;
    border: 0;
  }

  .report-section-header {
    padding: 18px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #d9e0e8);
    border-radius: 12px;
    margin-bottom: 12px;
  }

  .report-table-scroll {
    overflow: visible;
  }

  .professional-report-table,
  .professional-report-table tbody,
  .professional-report-table tr,
  .professional-report-table td {
    display: block;
    width: 100%;
  }

  .professional-report-table thead {
    display: none;
  }

  .professional-report-table tbody {
    display: grid;
    gap: 12px;
  }

  .professional-report-table tbody tr {
    padding: 8px 16px;
    border: 1px solid var(--border, #d9e0e8);
    border-radius: 12px;
    background: var(--surface, #ffffff);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
  }

  .professional-report-table td {
    display: grid;
    grid-template-columns: minmax(95px, 0.34fr) minmax(0, 0.66fr);
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border, #e2e7ee);
    text-align: left !important;
    white-space: normal;
  }

  .professional-report-table td::before {
    content: attr(data-label);
    color: var(--muted, #687386);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .professional-report-table td:last-child {
    border-bottom: 0;
  }

  .professional-report-table .report-empty-cell {
    display: block;
  }

  .professional-report-table .report-empty-cell::before {
    content: none;
  }

  .report-name-cell,
  .report-user-cell,
  .report-description-cell,
  .report-date-cell,
  .report-reference-cell {
    min-width: 0;
    max-width: none;
  }

  .report-action-column .btn {
    width: 100%;
  }
}

/* PROFESSIONAL REPORT TABLES END */

/* REPORT RECIPIENT SELECTION START */

.report-email-section {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--border, #d9e0e8);
  border-radius: 12px;
  background: var(--surface-soft, #f8fafc);
}

.report-email-header {
  margin-bottom: 16px;
}

.report-email-header h2 {
  margin: 0 0 4px;
}

.report-email-header p {
  margin: 0;
}

.report-recipient-list {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.report-recipient-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border, #d9e0e8);
  border-radius: 9px;
  background: var(--surface, #ffffff);
  cursor: pointer;
}

.report-recipient-option:hover {
  border-color: var(--primary, #2563eb);
}

.report-recipient-option input {
  width: auto;
  margin-top: 3px;
}

.report-recipient-details {
  min-width: 0;
}

.report-recipient-details strong {
  display: block;
}

.report-recipient-details span {
  display: block;
  margin-top: 2px;
  color: var(--muted, #687386);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.report-no-email-option {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--border, #d9e0e8);
  border-radius: 8px;
  background: var(--surface, #ffffff);
}

.report-no-email-option input {
  width: auto;
}

/* REPORT RECIPIENT SELECTION END */

/* COMPACT REPORT RECIPIENT PICKER START */

.report-recipient-picker {
  margin-bottom: 16px;
}

.report-recipient-picker > label,
.report-manual-recipient > label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.report-recipient-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.report-recipient-picker-row select {
  min-width: 0;
  width: 100%;
}

.report-recipient-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin-top: 10px;
  align-items: center;
}

.report-recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--border, #d9e0e8);
  border-radius: 999px;
  background: var(--surface, #ffffff);
}

.report-recipient-chip-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.report-recipient-chip-details strong,
.report-recipient-chip-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-recipient-chip-details small {
  margin-top: 2px;
  color: var(--muted, #64748b);
}

.report-recipient-remove {
  display: inline-grid;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: #991b1b;
  background: #fee2e2;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.report-recipient-remove:hover {
  background: #fecaca;
}

.report-manual-recipient {
  margin-top: 4px;
}

.report-manual-recipient small {
  display: block;
  margin-top: 5px;
}

.report-email-disabled
.report-recipient-picker,
.report-email-disabled
.report-manual-recipient {
  opacity: 0.55;
}

@media (max-width: 640px) {
  .report-recipient-picker-row {
    grid-template-columns: 1fr;
  }

  .report-recipient-picker-row .btn {
    width: 100%;
  }

  .report-recipient-chip {
    width: 100%;
    border-radius: 10px;
  }

  .report-recipient-chip-details {
    flex: 1;
  }
}

/* COMPACT REPORT RECIPIENT PICKER END */

/* BOOK A ROOM CALENDAR */

.room-filter-card {
  margin-bottom: 1rem;
}

.room-filter-grid .form-grid {
  align-items: end;
}

.room-filter-submit {
  display: flex;
  align-items: end;
}

.room-admin-note p {
  margin-bottom: 0;
}

.room-calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.room-calendar-heading h2,
.room-calendar-heading p {
  margin-bottom: 0;
}

.room-month-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.room-calendar-scroll {
  overflow-x: auto;
}

.room-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(145px, 1fr));
  min-width: 1015px;
  border-top: 1px solid var(--border, #d9dee5);
  border-left: 1px solid var(--border, #d9dee5);
}

.room-calendar-weekday {
  padding: 0.65rem;
  text-align: center;
  font-weight: 700;
  background: rgba(127, 127, 127, 0.08);
  border-right: 1px solid var(--border, #d9dee5);
  border-bottom: 1px solid var(--border, #d9dee5);
}

.room-calendar-day {
  min-height: 145px;
  padding: 0.55rem;
  background: var(--card-bg, #fff);
  border-right: 1px solid var(--border, #d9dee5);
  border-bottom: 1px solid var(--border, #d9dee5);
}

.room-calendar-other-month {
  opacity: 0.55;
}

.room-calendar-past {
  background: rgba(127, 127, 127, 0.05);
}

.room-calendar-today {
  box-shadow: inset 0 0 0 2px currentColor;
}

.room-calendar-selected {
  box-shadow: inset 0 0 0 3px currentColor;
}

.room-calendar-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.room-calendar-day-heading > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  min-height: 1.9rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.room-past-label {
  font-size: 0.72rem;
  opacity: 0.65;
}

.room-calendar-events {
  display: grid;
  gap: 0.35rem;
}

.room-calendar-event {
  display: grid;
  gap: 0.1rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(69, 104, 220, 0.12);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.25;
}

.room-calendar-event strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-calendar-event span {
  opacity: 0.8;
}

.room-calendar-empty {
  font-size: 0.75rem;
  opacity: 0.45;
}

.room-booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.room-day-bookings {
  display: grid;
  gap: 0.75rem;
}

.room-booking-item {
  padding: 0.85rem;
  border: 1px solid var(--border, #d9dee5);
  border-radius: 0.55rem;
}

.room-booking-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.room-booking-item-heading > div {
  display: grid;
  gap: 0.2rem;
}

.room-booking-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.room-booking-details div {
  padding: 0.55rem;
  border-radius: 0.4rem;
  background: rgba(127, 127, 127, 0.07);
}

.room-booking-details dt {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.7;
}

.room-booking-details dd {
  margin: 0.15rem 0 0;
}

@media (max-width: 900px) {
  .room-calendar-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-booking-layout {
    grid-template-columns: 1fr;
  }
}

/* NOTIFICATION CENTRE */

.topbar-user-area {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.topbar-user-name {
  white-space: nowrap;
}

.topbar-divider {
  opacity: 0.6;
}

.notification-menu {
  position: relative;
}

.notification-menu > summary {
  list-style: none;
}

.notification-menu > summary::-webkit-details-marker {
  display: none;
}

.notification-bell {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  height: 2.25rem;
  justify-content: center;
  position: relative;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
  width: 2.25rem;
}

.notification-bell:hover,
.notification-menu[open] .notification-bell {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.48);
}

.notification-bell-icon {
  height: 1.25rem;
  width: 1.25rem;
}

.notification-badge {
  align-items: center;
  background: #dc2626;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  font-size: 0.62rem;
  font-weight: 800;
  height: 1.22rem;
  justify-content: center;
  line-height: 1;
  min-width: 1.22rem;
  padding: 0 0.2rem;
  position: absolute;
  right: -0.42rem;
  top: -0.42rem;
}

.notification-dropdown {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 0.8rem;
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.2);
  color: #1f2937;
  min-width: 22rem;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 0.65rem);
  width: min(26rem, calc(100vw - 2rem));
  z-index: 1000;
}

.notification-dropdown-header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 1rem;
}

.notification-dropdown-header > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.notification-text-button {
  background: none;
  border: 0;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  padding: 0;
}

.notification-text-button:hover {
  text-decoration: underline;
}

.notification-dropdown-list {
  max-height: 25rem;
  overflow-y: auto;
}

.notification-dropdown-item {
  align-items: flex-start;
  border-bottom: 1px solid #edf0f4;
  color: inherit;
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
}

.notification-dropdown-item:hover {
  background: #f8fafc;
}

.notification-dropdown-item.unread {
  background: #eff6ff;
}

.notification-dropdown-item.unread:hover {
  background: #e5f0ff;
}

.notification-dropdown-dot {
  background: #cbd5e1;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 0.5rem;
  margin-top: 0.45rem;
  width: 0.5rem;
}

.notification-dropdown-item.unread
.notification-dropdown-dot {
  background: #2563eb;
}

.notification-dropdown-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.notification-dropdown-copy strong {
  color: #111827;
  font-size: 0.9rem;
}

.notification-dropdown-copy > span {
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.35;
}

.notification-dropdown-copy small {
  color: #6b7280;
  font-size: 0.73rem;
}

.notification-dropdown-empty {
  color: #6b7280;
  padding: 1.5rem 1rem;
  text-align: center;
}

.notification-dropdown-footer {
  background: #f8fafc;
  color: #2563eb;
  display: block;
  font-weight: 700;
  padding: 0.8rem 1rem;
  text-align: center;
  text-decoration: none;
}

.notification-dropdown-footer:hover {
  background: #eef2f7;
}

.notification-page-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.notification-page-header h1 {
  margin-bottom: 0.25rem;
}

.notification-summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns:
    repeat(2, minmax(0, 13rem));
  margin-bottom: 1rem;
}

.notification-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.notification-summary-label {
  color: #6b7280;
  font-size: 0.85rem;
}

.notification-summary-value {
  font-size: 1.7rem;
}

.notification-filter-card {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  padding-top: 0.65rem;
}

.notification-filter-tabs {
  display: flex;
  gap: 0.4rem;
}

.notification-filter-tabs a {
  border-radius: 0.45rem;
  color: #4b5563;
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
}

.notification-filter-tabs a:hover {
  background: #f1f5f9;
}

.notification-filter-tabs a.active {
  background: #2563eb;
  color: #ffffff;
}

.notification-centre-list {
  display: grid;
  gap: 0.75rem;
}

.notification-centre-item {
  align-items: flex-start;
  border-left: 4px solid transparent;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 0;
}

.notification-centre-item.unread {
  background: #f5f9ff;
  border-left-color: #2563eb;
}

.notification-centre-icon {
  align-items: center;
  background: #e9eef6;
  border-radius: 999px;
  color: #334155;
  display: flex;
  font-size: 1rem;
  font-weight: 800;
  height: 2.35rem;
  justify-content: center;
  width: 2.35rem;
}

.notification-centre-item.unread
.notification-centre-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.notification-centre-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.notification-centre-title {
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.notification-centre-title:hover {
  color: #2563eb;
}

.notification-unread-label {
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.18rem 0.45rem;
  text-transform: uppercase;
}

.notification-centre-message {
  color: #4b5563;
  line-height: 1.45;
  margin: 0.45rem 0;
  white-space: pre-line;
}

.notification-centre-meta {
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  gap: 0.8rem;
}

.notification-centre-actions {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 7.5rem;
}

.notification-centre-actions form {
  margin: 0;
}

.notification-centre-actions .btn {
  box-sizing: border-box;
  text-align: center;
  width: 100%;
}

.notification-empty-state {
  padding: 3rem 1rem;
  text-align: center;
}

.notification-empty-bell {
  font-size: 2.5rem;
  margin-bottom: 0.6rem;
}

@media (max-width: 820px) {
  .topbar-user-name,
  .topbar-divider {
    display: none;
  }

  .notification-dropdown {
    position: fixed;
    right: 1rem;
    top: 4.25rem;
  }

  .notification-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .notification-centre-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notification-centre-actions {
    flex-direction: row;
    flex-wrap: wrap;
    grid-column: 1 / -1;
  }

  .notification-centre-actions .btn {
    width: auto;
  }
}

@media (max-width: 520px) {
  .notification-dropdown {
    left: 0.75rem;
    min-width: 0;
    right: 0.75rem;
    width: auto;
  }

  .notification-summary-grid {
    grid-template-columns: 1fr;
  }

  .notification-centre-item {
    grid-template-columns: 1fr;
  }

  .notification-centre-icon {
    display: none;
  }

  .notification-centre-actions {
    grid-column: auto;
  }
}

/* MANUAL_NOTIFICATION_MANAGEMENT_STYLES */

.manual-notification-page {
  display: grid;
  gap: 20px;
}

.manual-notification-heading,
.manual-notification-batch-heading,
.manual-notification-batch-title,
.manual-notification-mode-options,
.manual-notification-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manual-notification-heading,
.manual-notification-batch-heading {
  justify-content: space-between;
}

.manual-notification-heading h1,
.manual-notification-history-heading h2,
.manual-notification-batch h3 {
  margin-bottom: 4px;
}

.manual-notification-compose h2 {
  margin-top: 0;
}

.manual-notification-form {
  display: grid;
  gap: 20px;
}

.manual-notification-form-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 2fr)
    minmax(180px, 1fr);
  gap: 16px;
}

.manual-notification-wide {
  grid-column: 1 / -1;
}

.manual-notification-form-grid label,
.manual-notification-form-grid small,
.manual-notification-user span,
.manual-notification-user small,
.manual-notification-delivery div,
.manual-notification-delivery small {
  display: block;
}

.manual-notification-form-grid input,
.manual-notification-form-grid select,
.manual-notification-form-grid textarea {
  width: 100%;
}

.manual-notification-recipients {
  margin: 0;
  padding: 16px;
}

.manual-notification-mode-options {
  flex-wrap: wrap;
}

.manual-notification-mode-options label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manual-notification-user-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.manual-notification-user {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid;
  border-radius: 8px;
}

.manual-notification-user input {
  margin-top: 4px;
}

.manual-notification-history {
  display: grid;
  gap: 14px;
}

.manual-notification-batch-title {
  flex-wrap: wrap;
}

.manual-notification-batch-counts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 14px;
  text-align: center;
}

.manual-notification-batch-counts span,
.manual-notification-batch-counts strong {
  display: block;
}

.manual-notification-message {
  margin: 16px 0;
  white-space: pre-wrap;
}

.manual-notification-deliveries {
  margin-top: 16px;
}

.manual-notification-deliveries summary {
  cursor: pointer;
  font-weight: 600;
}

.manual-notification-delivery-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.manual-notification-delivery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid;
}

@media (max-width: 760px) {
  .manual-notification-heading,
  .manual-notification-batch-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-notification-form-grid {
    grid-template-columns: 1fr;
  }

  .manual-notification-wide {
    grid-column: auto;
  }

  .manual-notification-batch-counts {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* COMMON_LIST_FILTERS_FOUNDATION_STAGE_1A1 */
.common-list-filter-card {
  border-left: 4px solid var(--accent);
}

.common-list-filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.common-list-filter-heading h2 {
  margin-bottom: 4px;
}

.common-list-result-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.common-list-filter-form {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.common-list-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.common-list-filter-actions .btn {
  margin: 0;
}

@media (max-width: 850px) {
  .common-list-filter-heading {
    display: block;
  }

  .common-list-result-count {
    margin-top: 8px;
  }

  .common-list-filter-form {
    grid-template-columns: 1fr;
  }
}


/* STORES_MM_FOUNDATION_STAGE_F1 */
.mm-foundation-notice {
  border-left: 4px solid currentColor;
}

.mm-summary-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(180px, 1fr)
  );
  gap: 1rem;
  margin-bottom: 1rem;
}

.mm-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0;
}

.mm-table-window {
  max-width: 100%;
  overflow: auto;
  max-height: 32rem;
}


/* MM_IMPORT_STAGING_F2A */
.mm-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.mm-subnav a {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border, #d5d9df);
  border-radius: 0.4rem;
  text-decoration: none;
  background: var(--surface, #fff);
}

.mm-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.mm-filter-form,
.mm-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.8rem;
  margin-top: 1rem;
}

.mm-filter-form label,
.mm-upload-form label {
  display: grid;
  gap: 0.3rem;
}

.mm-filter-form input,
.mm-filter-form select,
.mm-upload-form input {
  min-height: 2.4rem;
}

.mm-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.mm-detail-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.mm-detail-grid > div {
  display: grid;
  gap: 0.25rem;
}

.mm-detail-grid code {
  overflow-wrap: anywhere;
}

.mm-error-box {
  overflow: auto;
  padding: 0.8rem;
  border: 1px solid #b00020;
  border-radius: 0.35rem;
  white-space: pre-wrap;
}

@media (max-width: 700px) {
  .mm-card-heading,
  .mm-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .mm-filter-form,
  .mm-upload-form {
    align-items: stretch;
    flex-direction: column;
  }
}


/* MM_MAPPING_REVIEW_F2B */
.mm-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.mm-action-group form {
  margin: 0;
}

.mm-status-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin: 0 0 1rem;
}

.mm-status-card {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
}

.mm-status-card span {
  font-size: 1.4rem;
  font-weight: 700;
}

.mm-status-valid {
  color: #087a32;
}

.mm-status-warning {
  color: #8a6000;
}

.mm-status-error {
  color: #b00020;
}

.mm-status-ignored {
  color: #59636e;
}

.mm-row-issues {
  min-width: 280px;
  white-space: normal;
}

.mm-issue-error,
.mm-issue-warning {
  margin-bottom: 0.45rem;
  padding: 0.4rem;
  border-radius: 0.3rem;
}

.mm-issue-error {
  border-left: 4px solid #b00020;
}

.mm-issue-warning {
  border-left: 4px solid #b37a00;
}


/* MM_RESOLUTION_FOUNDATION_F2C1 */
.mm-resolution-form {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.mm-resolution-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mm-resolution-reason {
  grid-column: 1 / -1;
}

.mm-resolution-valid {
  padding: 0.7rem;
  border-left: 4px solid currentColor;
  font-weight: 600;
}

.mm-resolution-invalid {
  padding: 0.7rem;
  border-left: 4px solid currentColor;
  font-weight: 600;
}

.mm-resolution-clear {
  margin-top: 1rem;
}

.mm-issue-info {
  margin-bottom: 0.45rem;
  padding: 0.4rem;
  border-left: 4px solid currentColor;
}

.mm-raw-data {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
}


/* MM_DUPLICATE_COMPARE_F2C2 */
.mm-duplicate-comparison th,
.mm-duplicate-comparison td {
  min-width: 190px;
  vertical-align: top;
}

.mm-duplicate-comparison th:first-child {
  min-width: 170px;
}

.mm-comparison-different th,
.mm-comparison-different td {
  font-weight: 600;
  border-top-width: 2px;
  border-bottom-width: 2px;
}

.mm-duplicate-card-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(420px, 1fr));
  gap: 1rem;
}

.mm-duplicate-row-card {
  min-width: 0;
}

.mm-duplicate-selected {
  outline: 3px solid currentColor;
  outline-offset: -3px;
}

.mm-duplicate-compare-action {
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .mm-duplicate-card-grid {
    grid-template-columns: 1fr;
  }
}


/* MM_NEXT_AVAILABLE_CODE_F2C3 */
.mm-next-code-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.mm-next-code-controls[hidden] {
  display: none;
}

.mm-next-code-controls small {
  max-width: 520px;
}


/* MM_OBVIOUS_DUPLICATES_F2C4 */
.mm-auto-duplicate-group {
  padding: 1rem 0;
  border-bottom: 1px solid currentColor;
}

.mm-auto-duplicate-group:last-child {
  border-bottom: 0;
}

.mm-confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1rem 0;
}

.mm-confirm-check input {
  margin-top: 0.25rem;
}


/* MM_STOCK_MASTER_SKU_QUALITY_F4C2C */

.mm-supplier-sku-cell {
  min-width: 190px;
  vertical-align: top;
}

.mm-supplier-sku-entry
+ .mm-supplier-sku-entry {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #d1d5db;
}

.mm-supplier-sku-entry small {
  display: block;
  margin-top: 2px;
  color: #64748b;
}

.mm-supplier-sku-code {
  display: block;
  overflow-wrap: anywhere;
}

.mm-supplier-sku-missing {
  display: inline-block;
  font-weight: 700;
  color: #92400e;
}

.mm-quality-badge {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.mm-quality-clean {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.mm-quality-review {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}

.mm-quality-blocked {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}


/* MM_STOCK_MASTER_ADVANCED_SEARCH_F4C3C */

.mm-stock-master-filter-form {
  display: block;
}

.mm-stock-master-filter-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(220px, 1fr)
    );
  gap: 14px;
  width: 100%;
}

.mm-stock-master-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.mm-stock-master-filter-grid input,
.mm-stock-master-filter-grid select {
  width: 100%;
  min-width: 0;
}

.mm-stock-master-filter-grid small {
  color: #64748b;
}

.mm-stock-master-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}


/* MM_COMBINED_STOCK_MASTER_F4D2A */

.mm-combined-stock-note {
  margin-bottom: 16px;
}

.mm-combined-stock-note > strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.mm-combined-stock-note p {
  margin-top: 6px;
  margin-bottom: 6px;
}

.mm-stock-location-cell,
.mm-bin-location-cell {
  white-space: nowrap;
}

.mm-stock-location-cell small {
  display: block;
}

.mm-bin-location-missing {
  font-style: italic;
  opacity: 0.7;
}

.mm-stock-number {
  text-align: right;
  white-space: nowrap;
}

.mm-stock-master-filter-grid {
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(210px, 1fr)
    );
}


/* ==========================================================
   MM_BOM_FOUNDATION_F5A1
   ========================================================== */

.mm-bom-filter-grid,
.mm-bom-form-grid,
.mm-bom-checkbox-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(220px, 1fr)
    );
  gap: 14px;
}

.mm-bom-filter-actions,
.mm-bom-form-actions,
.mm-bom-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mm-bom-filter-actions,
.mm-bom-form-actions {
  margin-top: 14px;
}

.mm-bom-row-actions form {
  margin: 0;
}

.mm-bom-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mm-bom-checkbox input {
  width: auto;
}

.mm-bom-status-active {
  white-space: nowrap;
}

.mm-bom-status-inactive {
  opacity: 0.7;
  white-space: nowrap;
}



/* ==========================================================
   MM_BOM_COMPONENT_BUILDER_F5A2
   ========================================================== */

.mm-bom-quantity-form {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 190px;
}

.mm-bom-quantity-form input {
  width: 95px;
}

.mm-bom-component-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.mm-bom-component-search label {
  flex: 1 1 360px;
}

.mm-bom-component-search input {
  width: 100%;
}

.mm-bom-search-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 16px 0 10px;
}

.mm-bom-search-summary small {
  opacity: 0.75;
}

.mm-bom-add-quantity {
  width: 100px;
}

.mm-bom-cost-missing {
  white-space: nowrap;
}

.mm-bom-already-added {
  white-space: nowrap;
}

.mm-bom-component-empty-search {
  margin-top: 14px;
  padding: 14px 0;
}



/* ==========================================================
   MM_BOM_EXCEL_IO_F5A3
   ========================================================== */

.mm-bom-import-note {
  margin: 18px 0;
}

.mm-bom-import-note table {
  width: 100%;
}

.mm-bom-import-note h3 {
  margin-bottom: 8px;
}



/* ==========================================================
   MM_STOCK_ORDER_CSS_F6A
   ========================================================== */

.mm-stock-order-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.mm-stock-order-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mm-stock-order-summary-card > span {
  font-size: 0.9rem;
  opacity: 0.75;
}

.mm-stock-order-summary-card > strong {
  font-size: 1.8rem;
}

.mm-stock-order-filter-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.mm-stock-order-filter-wide {
  grid-column: span 2;
}

.mm-stock-order-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mm-stock-order-selected-panel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.mm-stock-order-filtered-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 8px;
}

.mm-stock-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.mm-stock-order-actions small {
  flex-basis: 100%;
}

.mm-stock-order-table-wrap {
  overflow-x: auto;
}

.mm-stock-order-table {
  min-width: 1900px;
}

.mm-stock-order-table th,
.mm-stock-order-table td {
  vertical-align: top;
}

.mm-stock-order-select-cell {
  width: 42px;
  text-align: center;
}

.mm-stock-order-select-cell input {
  width: 18px;
  height: 18px;
}

.mm-stock-order-description {
  min-width: 260px;
  max-width: 420px;
}

.mm-stock-order-qty {
  width: 120px;
  min-width: 110px;
}

.mm-stock-order-priority {
  display: inline-block;
  min-width: 62px;
  font-weight: 700;
  text-align: right;
}

.mm-stock-order-status {
  white-space: nowrap;
  font-weight: 600;
}

.mm-stock-order-warning {
  white-space: nowrap;
}

.mm-stock-order-formula-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.mm-stock-order-formula-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 8px;
}

@media (max-width: 760px) {
  .mm-stock-order-filter-wide {
    grid-column: span 1;
  }

  .mm-stock-order-selected-panel {
    text-align: left;
  }
}


/* ==========================================================
   MM_RFQ_CSS_F6B
   ========================================================== */

.mm-rfq-history-table {
  min-width: 1200px;
}

.mm-rfq-history-table th,
.mm-rfq-history-table td {
  vertical-align: top;
}

#rfq-history {
  scroll-margin-top: 1rem;
}

#mm-stock-order-procurement-form {
  margin: 0;
}


/* ==========================================================
   MM_PURCHASE_ORDER_CSS_F6C
   ========================================================== */

.mm-purchase-order-history-table {
  min-width: 1550px;
}

.mm-purchase-order-history-table th,
.mm-purchase-order-history-table td {
  vertical-align: top;
}

#order-history {
  scroll-margin-top: 1rem;
}

.mm-rfq-history-table form {
  margin: 0;
}


/* ==========================================================
   MM_PURCHASE_ORDER_RECEIVING_CSS_F6D
   ========================================================== */

.mm-po-receive-table {
  min-width: 1650px;
}

.mm-po-receive-table th,
.mm-po-receive-table td {
  vertical-align: top;
}

.mm-po-receive-table input[type="number"] {
  min-width: 120px;
}

.mm-po-receive-table input[type="text"] {
  min-width: 140px;
}

.mm-po-receive-table select {
  min-width: 190px;
}

.mm-po-receive-description {
  min-width: 260px;
  max-width: 420px;
}

.mm-po-receive-notes {
  display: block;
  margin-top: 1rem;
}

.mm-po-receive-notes textarea {
  width: 100%;
  box-sizing: border-box;
}

.mm-po-receive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mm-po-receipt-history-table {
  min-width: 850px;
}


/* ==========================================================
   MM_STOCK_RECEIVING_CSS_F7A
   ========================================================== */

.mm-stock-receiving-top-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mm-stock-receiving-filter {
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(190px, 1fr)
    );
}

.mm-stock-receiving-item-table {
  min-width: 1150px;
}

.mm-direct-receipt-form,
.mm-add-stock-item-form,
.mm-add-barcode-form {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(220px, 1fr)
    );
  gap: 1rem;
}

.mm-direct-receipt-form label,
.mm-add-stock-item-form label,
.mm-add-barcode-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mm-direct-receipt-form .full-width,
.mm-add-stock-item-form .full-width {
  grid-column: 1 / -1;
}

.mm-form-section-heading {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-color, #ddd);
  padding-top: 0.75rem;
}

.mm-checkbox-label {
  flex-direction: row !important;
  align-items: center;
}

.mm-barcode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mm-barcode-chip {
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
}

.mm-outstanding-orders-table {
  min-width: 1250px;
}

.mm-completed-orders-table {
  min-width: 1000px;
}

.mm-stock-receipt-history-table {
  min-width: 1200px;
}

.mm-stock-receiving-order-table {
  min-width: 1900px;
}

.mm-stock-receiving-order-table th,
.mm-stock-receiving-order-table td {
  vertical-align: top;
}

.mm-delivery-note-field {
  display: block;
  max-width: 480px;
  margin-bottom: 1rem;
}

.mm-delivery-note-field input {
  width: 100%;
  box-sizing: border-box;
}

.mm-barcode-scanner-dialog {
  width: min(760px, 94vw);
  border: none;
  border-radius: 10px;
  padding: 1rem;
}

.mm-barcode-scanner-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.mm-barcode-scanner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#mm-barcode-video {
  display: block;
  width: 100%;
  max-height: 430px;
  background: #111;
  border-radius: 8px;
  margin: 1rem 0;
}

.mm-barcode-scanner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mm-barcode-scanner-actions input {
  flex: 1 1 260px;
}

.mm-receipt-detail-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(190px, 1fr)
    );
  gap: 1rem;
}

.mm-receipt-detail-table {
  min-width: 1450px;
}

#direct-receipt,
#outstanding-orders,
#completed-orders,
#receipt-history {
  scroll-margin-top: 1rem;
}


/* ==========================================================
   MM_STOCK_RECEIVING_COMPACT_LOOKUP_F7A1
   Compact Find Stock Item table
   ========================================================== */

#item-search {
  padding: 0.85rem 1rem;
}

#item-search h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}


/* Compact the search/filter area */

#item-search .mm-stock-receiving-filter {
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

#item-search .mm-stock-receiving-filter label {
  font-size: 0.82rem;
  gap: 0.2rem;
}

#item-search .mm-stock-receiving-filter input,
#item-search .mm-stock-receiving-filter select {
  min-height: 32px;
  padding: 0.3rem 0.45rem;
  font-size: 0.82rem;
}

#item-search .mm-filter-actions {
  gap: 0.4rem;
}


/* Keep the result area compact */

#item-search .table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(128, 128, 128, 0.22);
}


/* Reduce overall table width */

.mm-stock-receiving-item-table {
  min-width: 880px;
  width: 100%;
  font-size: 0.78rem;
  line-height: 1.15;
  margin: 0;
}


/* Compact headings */

.mm-stock-receiving-item-table th {
  padding: 0.36rem 0.45rem;
  font-size: 0.73rem;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}


/* Compact rows */

.mm-stock-receiving-item-table td {
  padding: 0.28rem 0.45rem;
  vertical-align: middle;
}


/* Davron Code */

.mm-stock-receiving-item-table th:nth-child(1),
.mm-stock-receiving-item-table td:nth-child(1) {
  width: 105px;
  white-space: nowrap;
}


/* Description */

.mm-stock-receiving-item-table th:nth-child(2),
.mm-stock-receiving-item-table td:nth-child(2) {
  width: 260px;
  max-width: 260px;
}

.mm-stock-receiving-item-table td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Supplier */

.mm-stock-receiving-item-table th:nth-child(3),
.mm-stock-receiving-item-table td:nth-child(3) {
  width: 145px;
  max-width: 145px;
}

.mm-stock-receiving-item-table td:nth-child(3) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Supplier SKU */

.mm-stock-receiving-item-table th:nth-child(4),
.mm-stock-receiving-item-table td:nth-child(4) {
  width: 115px;
  white-space: nowrap;
}


/* Barcode */

.mm-stock-receiving-item-table th:nth-child(5),
.mm-stock-receiving-item-table td:nth-child(5) {
  width: 120px;
  white-space: nowrap;
}


/* Current stock */

.mm-stock-receiving-item-table th:nth-child(6),
.mm-stock-receiving-item-table td:nth-child(6) {
  width: 75px;
  text-align: right;
  white-space: nowrap;
}


/* Unit */

.mm-stock-receiving-item-table th:nth-child(7),
.mm-stock-receiving-item-table td:nth-child(7) {
  width: 65px;
  white-space: nowrap;
}


/* Action */

.mm-stock-receiving-item-table th:nth-child(8),
.mm-stock-receiving-item-table td:nth-child(8) {
  width: 64px;
  text-align: center;
  white-space: nowrap;
}


/* Small Select button */

.mm-stock-receiving-item-table .button,
.mm-stock-receiving-item-table .btn {
  padding: 0.24rem 0.48rem;
  min-height: auto;
  font-size: 0.72rem;
  line-height: 1.15;
}


/* Slight row highlight makes dense table easier to read */

.mm-stock-receiving-item-table tbody tr:hover {
  background: rgba(128, 128, 128, 0.08);
}


/* ==========================================================
   MM_STOCK_DELIVERY_CSS_F8A
   ========================================================== */

.mm-delivery-filter-grid {
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(175px, 1fr)
    );
}

.mm-pre-delivery-table,
.mm-completed-delivery-table {
  min-width: 1350px;
  font-size: 0.82rem;
}

.mm-pre-delivery-table th,
.mm-pre-delivery-table td,
.mm-completed-delivery-table th,
.mm-completed-delivery-table td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
}

.mm-delivery-stage-note {
  display: inline-block;
  margin-left: 0.35rem;
  opacity: 0.7;
}

.mm-delivery-header-form {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(220px, 1fr)
    );
  gap: 1rem;
}

.mm-delivery-header-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mm-delivery-header-form .full-width {
  grid-column: 1 / -1;
}

.mm-delivery-bom-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
}

.mm-delivery-bom-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.mm-delivery-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mm-delivery-item-search-window {
  max-height: 380px;
  overflow: auto;
}

.mm-delivery-item-search-table {
  min-width: 1050px;
  font-size: 0.78rem;
}

.mm-delivery-item-search-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.mm-delivery-item-search-table th,
.mm-delivery-item-search-table td {
  padding: 0.3rem 0.45rem;
  vertical-align: middle;
}

.mm-delivery-add-item-inline {
  display: grid;
  grid-template-columns:
    minmax(170px, 1fr)
    90px
    140px
    auto;
  gap: 0.4rem;
  align-items: center;
}

.mm-delivery-lines-table {
  min-width: 1450px;
  font-size: 0.8rem;
}

.mm-delivery-lines-table th,
.mm-delivery-lines-table td {
  padding: 0.35rem 0.45rem;
  vertical-align: middle;
}

.mm-delivery-line-edit-form {
  display: grid;
  grid-template-columns:
    95px
    150px
    150px
    80px
    auto;
  gap: 0.4rem;
  align-items: center;
}

.mm-delivery-conditional {
  display: none;
}


/* ==========================================================
   MM_GENERATE_DELIVERY_CSS_F8B
   ========================================================== */

.mm-pre-delivery-table form,
.mm-completed-delivery-table form {
  margin: 0;
}

.mm-pre-delivery-table button,
.mm-completed-delivery-table button {
  white-space: nowrap;
}

.mm-delivery-final-status {
  font-weight: 600;
}


/* ==========================================================
   MM_STOCK_DELIVERY_USABILITY_CSS_F8C
   ========================================================== */

.mm-delivery-item-filter {
  grid-template-columns:
    minmax(320px, 1fr)
    auto;
  gap: 0.6rem;
}

.mm-f8c-item-search-window {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(128, 128, 128, 0.22);
}

.mm-f8c-item-search-table {
  width: 100%;
  min-width: 920px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.15;
}

.mm-f8c-item-search-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.35rem 0.45rem;
  white-space: nowrap;
}

.mm-f8c-item-search-table td {
  padding: 0.27rem 0.45rem;
  vertical-align: middle;
}

.mm-f8c-item-search-table .mm-f8c-description {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-f8c-add-item-form {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    82px
    145px
    auto;
  gap: 0.35rem;
  align-items: center;
}

.mm-f8c-add-item-form input,
.mm-f8c-add-item-form select {
  min-height: 30px;
  padding: 0.25rem 0.4rem;
  font-size: 0.76rem;
}

.mm-f8c-delivery-lines-table {
  min-width: 1550px;
  width: 100%;
  font-size: 0.78rem;
  line-height: 1.15;
}

.mm-f8c-delivery-lines-table th {
  padding: 0.36rem 0.42rem;
  white-space: nowrap;
}

.mm-f8c-delivery-lines-table td {
  padding: 0.3rem 0.42rem;
  vertical-align: middle;
}

.mm-f8c-delivery-lines-table .mm-f8c-description {
  width: 260px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-f8c-bom-source {
  width: 180px;
  max-width: 180px;
}

.mm-f8c-quantity-input {
  width: 90px;
}

.mm-f8c-bin-select {
  min-width: 180px;
}

.mm-f8c-destination-bin {
  width: 140px;
}

.mm-f8c-number {
  text-align: right;
  white-space: nowrap;
}

.mm-f8c-stock-error {
  background: rgba(220, 53, 69, 0.08);
}

.mm-f8c-stock-ready {
  background: rgba(40, 167, 69, 0.035);
}

.mm-f8c-ready-badge,
.mm-f8c-transfer-badge {
  display: inline-block;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(40, 167, 69, 0.5);
}

.mm-f8c-issue-badge,
.mm-f8c-issue-type-badge {
  display: inline-block;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(220, 53, 69, 0.5);
}

.mm-f8c-readiness-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mm-f8c-issue-list {
  margin: 0.75rem 0 1rem 1.2rem;
}

#mm-delivery-barcode-video {
  display: block;
  width: 100%;
  max-height: 430px;
  background: #111;
  border-radius: 8px;
  margin: 1rem 0;
}

.mm-pre-delivery-table,
.mm-completed-delivery-table {
  font-size: 0.78rem;
}

.mm-pre-delivery-table th,
.mm-pre-delivery-table td,
.mm-completed-delivery-table th,
.mm-completed-delivery-table td {
  padding: 0.32rem 0.42rem;
}

#individual-items,
#pre-delivery-items,
#generate-delivery,
#completed-deliveries {
  scroll-margin-top: 1rem;
}


/* ==========================================================
   MM_STOCK_DELIVERY_ACKNOWLEDGEMENT_CSS_F8D
   ========================================================== */

.mm-f8d-details-grid,
.mm-f8d-ack-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(220px, 1fr)
    );
  gap: 0.85rem 1rem;
}

.mm-f8d-details-grid label,
.mm-f8d-ack-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mm-f8d-full {
  grid-column: 1 / -1;
}

.mm-f8d-destination-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(128,128,128,0.22);
  border-radius: 6px;
}

.mm-f8d-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(210px, 1fr)
    );
  gap: 0.8rem;
}

.mm-f8d-summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem;
  border: 1px solid rgba(128,128,128,0.18);
  border-radius: 6px;
}

.mm-f8d-pre {
  white-space: pre-wrap;
}

.mm-f8d-signature-pad {
  display: block;
  width: 100%;
  max-width: 760px;
  height: 220px;
  margin-top: 0.6rem;
  background: #fff;
  border: 1px solid #999;
  border-radius: 6px;
  touch-action: none;
  cursor: crosshair;
}

.mm-f8d-signature-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.mm-f8d-existing-signature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
}

.mm-f8d-existing-signature img {
  max-width: 360px;
  max-height: 140px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(128,128,128,0.3);
  border-radius: 5px;
  padding: 0.4rem;
}

@media (max-width: 800px) {

  .mm-f8d-details-grid,
  .mm-f8d-ack-grid {
    grid-template-columns: 1fr;
  }

  .mm-f8d-full {
    grid-column: 1;
  }
}


/* ==========================================================
   MM_STOCK_DELIVERY_ACK_SECURITY_CSS_F8D1
   ========================================================== */

.mm-f8d1-readonly-warning {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 6px;
  font-weight: 500;
}

.mm-f8d1-replace-note {
  max-width: 760px;
  margin: 0.65rem 0;
}

.mm-f8d1-replace-confirm {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border: 1px solid rgba(220, 53, 69, 0.45);
  border-radius: 6px;
}

.mm-f8d1-replace-confirm label {
  max-width: 360px;
}


/* ==========================================================
   MM_STOCK_DELIVERY_HISTORY_CSS_F8E
   ========================================================== */

.mm-f8e-history-filter {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(185px, 1fr)
    );
  gap: 0.75rem;
}

.mm-f8e-history-filter label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mm-f8e-wide {
  grid-column: span 2;
}

.mm-f8e-history-table {
  width: 100%;
  min-width: 1650px;
  font-size: 0.77rem;
}

.mm-f8e-history-table th,
.mm-f8e-history-table td {
  padding: 0.34rem 0.42rem;
  vertical-align: middle;
}

.mm-f8e-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(210px, 1fr)
    );
  gap: 0.75rem;
}

.mm-f8e-summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem;
  border: 1px solid rgba(128,128,128,0.2);
  border-radius: 6px;
}

.mm-f8e-full {
  grid-column: 1 / -1;
}

.mm-f8e-line-table {
  width: 100%;
  min-width: 1100px;
  font-size: 0.8rem;
}

.mm-f8e-line-table th,
.mm-f8e-line-table td {
  padding: 0.38rem 0.48rem;
}

.mm-f8e-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.mm-f8e-completed-badge,
.mm-f8e-reversed-badge {
  display: inline-block;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.mm-f8e-completed-badge {
  border: 1px solid rgba(40,167,69,0.5);
}

.mm-f8e-reversed-badge {
  border: 1px solid rgba(220,53,69,0.5);
}

@media (max-width: 800px) {

  .mm-f8e-wide {
    grid-column: 1;
  }

}


/* ==========================================================
   F9B — STOCK MASTER INFORMATION PANEL
   ========================================================== */

.mm-stock-master-info {
  padding: 1.15rem 1.3rem;
}

.mm-stock-master-info-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.mm-stock-master-info-heading h2 {
  margin: 0.15rem 0 0;
}

.mm-stock-master-info-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

.mm-stock-master-info-lead {
  margin: 0 0 1rem;
  max-width: 78rem;
}

.mm-stock-master-info-grid {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(0, 1fr)
  );
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.mm-stock-master-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(127, 127, 127, 0.22);
  border-radius: 0.55rem;
}

.mm-stock-master-info-item > strong {
  font-size: 0.9rem;
}

.mm-stock-master-info-item > span {
  line-height: 1.45;
  opacity: 0.82;
}

.mm-stock-master-info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(127, 127, 127, 0.22);
}

.mm-stock-master-info-note > strong {
  flex: 0 0 auto;
}

.mm-stock-master-info-note > span {
  line-height: 1.45;
  opacity: 0.82;
}

@media (max-width: 900px) {

  .mm-stock-master-info-grid {
    grid-template-columns: 1fr;
  }

  .mm-stock-master-info-note {
    flex-direction: column;
    gap: 0.25rem;
  }

}


/* ==========================================================
   F10A — GOODS IN TRANSIT
   ========================================================== */

.mm-f10-summary-grid {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(0, 1fr)
  );
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.mm-f10-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mm-f10-summary-card > span {
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.7;
}

.mm-f10-summary-card > strong {
  font-size: 1.35rem;
}

.mm-f10-summary-card > small {
  opacity: 0.7;
}

.mm-f10-legacy-note {
  border-left: 4px solid rgba(127, 127, 127, 0.5);
}

.mm-f10-legacy-note p {
  margin: 0.35rem 0;
}

.mm-f10-git-table {
  min-width: 1450px;
}

.mm-f10-git-table select,
.mm-f10-git-table input[type="text"],
.mm-f10-git-table textarea {
  width: 100%;
  min-width: 130px;
}

.mm-f10-value {
  white-space: nowrap;
  text-align: right;
  font-weight: 700;
}

.mm-f10-attachment {
  margin-bottom: 0.45rem;
}

.mm-f10-attachment small {
  display: block;
  opacity: 0.65;
}

.mm-f10-upload {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

@media (max-width: 1000px) {

  .mm-f10-summary-grid {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );
  }

}

@media (max-width: 650px) {

  .mm-f10-summary-grid {
    grid-template-columns: 1fr;
  }

}


/* ==========================================================
   F10D1 — DELIVERY HISTORY / GIT JOURNEY
   ========================================================== */

.mm-f10d1-history-table {
  min-width: 2050px;
}

.mm-f10d1-timeline {
  min-width: 145px;
  white-space: nowrap;
}

.mm-f10d1-links,
.mm-f10d1-documents,
.mm-f10d1-document-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mm-f10d1-journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.mm-f10d1-document {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mm-f10d1-document small {
  opacity: 0.7;
}

.mm-f10d1-upload-form {
  display: grid;
  grid-template-columns:
    minmax(180px, 240px)
    minmax(260px, 1fr)
    auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}

.mm-f10d1-upload-form label {
  margin: 0;
}

.mm-f10d1-upload-form select,
.mm-f10d1-upload-form input[type="file"] {
  width: 100%;
}

@media (max-width: 850px) {

  .mm-f10d1-upload-form {
    grid-template-columns: 1fr;
  }

}


/* ==========================================================
   MM_BOM_COMPACT_SEARCH_V2
   Compact Search BOMs desktop / tablet / mobile layout
   ========================================================== */


/*
 * The generic .mm-filter-form is a flex container.
 * Force the BOM grid to occupy the full card width so its
 * columns can actually spread horizontally.
 */

.mm-filter-form > .mm-bom-filter-grid {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}


/*
 * Desktop:
 *
 * Search All | BOM Code | BOM Name | Component
 * Department | Active   | Cost Sale| Rows/Page
 */

.mm-bom-filter-grid {
  grid-template-columns:
    minmax(0, 1.55fr)
    minmax(0, 0.85fr)
    minmax(0, 1.15fr)
    minmax(0, 1.45fr);

  column-gap: 10px;
  row-gap: 8px;
}


.mm-bom-filter-grid > label {
  min-width: 0;
  margin: 0;
  gap: 4px;
  font-size: 0.88rem;
}


.mm-bom-filter-grid input,
.mm-bom-filter-grid select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding-top: 5px;
  padding-bottom: 5px;
}


/*
 * Keep action controls neat and aligned to the right rather
 * than occupying another large vertical section.
 */

.mm-filter-form > .mm-bom-filter-actions {
  flex: 1 1 100%;
  width: 100%;
  justify-content: flex-end;
  margin-top: 8px;
  gap: 6px;
}


.mm-bom-filter-actions button,
.mm-bom-filter-actions .button {
  min-height: 36px;
  margin: 0;
}


/*
 * Medium width: 2 x 4 arrangement.
 */

@media (max-width: 1150px) {

  .mm-bom-filter-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


/*
 * Mobile: retain a clean single-column layout.
 */

@media (max-width: 700px) {

  .mm-bom-filter-grid {
    grid-template-columns: 1fr;
  }


  .mm-filter-form > .mm-bom-filter-actions {
    justify-content: stretch;
  }


  .mm-bom-filter-actions button,
  .mm-bom-filter-actions .button {
    flex: 1 1 auto;
    text-align: center;
  }

}


/* REPORT_SUBSECTION_STYLES_V1 */
.report-subsection {
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  margin: 18px 0;
  background: #f8fafc;
}

.report-subsection-header {
  margin: -14px -14px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #bfdbfe;
  border-radius: 12px 12px 0 0;
  background: #eff6ff;
}

.report-subsection-header h2 {
  margin: 0;
}

.report-subsection-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.report-subsection > .field-block {
  background: #fff;
}

.multi-checkbox-group {
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.report-subsection-library-card {
  border-left: 4px solid #2563eb;
}

.report-subsection-create-details {
  margin: 12px 0 18px;
}

.report-subsection-library-form {
  margin-top: 14px;
}

.report-subsection-library-list {
  display: grid;
  gap: 10px;
}

.report-subsection-library-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.report-subsection-insert-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-subsection-insert-controls select {
  min-width: 240px;
  max-width: 360px;
}

.report-subsection-builder {
  border: 2px solid #93c5fd;
  border-radius: 14px;
  margin: 14px 0;
  padding: 14px;
  background: #eff6ff;
}

.report-subsection-builder-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.report-subsection-title-field {
  display: block;
  margin-bottom: 12px;
}

.report-subsection-builder-fields {
  display: grid;
  gap: 10px;
}

.report-subsection-builder-field {
  background: #fff;
  margin: 0;
}

.subsection-boundary-field {
  border: 2px solid #93c5fd;
  background: #eff6ff;
}

@media (max-width: 850px) {
  .report-subsection-library-item,
  .report-subsection-builder-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-subsection-insert-controls {
    align-items: stretch;
  }

  .report-subsection-insert-controls select {
    max-width: none;
    width: 100%;
  }
}
/* REPORT_SUBSECTION_STYLES_V1 END */


/* REPORT_SUBSECTION_SELECT_STYLES_V1 */
.subsection-select-config-panel {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
}

.subsection-select-config-panel > p {
  margin: 5px 0 10px;
}

.subsection-select-library-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 12px;
  margin: 8px 0 10px;
}

.subsection-select-choice-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subsection-select-choice-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}

.subsection-select-snapshot-note {
  margin-top: 10px !important;
}

.dynamic-report-subsection[hidden],
.dynamic-subsection-snapshot-row[hidden],
.dynamic-subsection-generated[hidden] {
  display: none !important;
}

.subsection-runtime-select {
  width: 100%;
}
/* REPORT_SUBSECTION_SELECT_STYLES_V1 END */
