html {
  font-size: 14px;
  min-height: 100%;
}

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

body {
  min-height: 100vh;
  color: #171b24;
  background: #f4f6fa;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(181, 31, 39, 0.18);
}

.eyebrow {
  margin-bottom: 0.5rem;
  color: #b51f27;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-body {
  background: linear-gradient(135deg, #f7f8fb 0%, #eef2f7 100%);
}

.login-shell {
  min-height: 100vh;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #b51f27;
  color: #fff;
  font-weight: 900;
}

.brand-name {
  display: block;
  color: inherit;
  font-size: 1.15rem;
  font-weight: 800;
}

.brand-subtitle {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
}

.login-card {
  width: min(100%, 480px);
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid rgba(25, 30, 42, 0.07);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(13, 17, 27, 0.14);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  margin-bottom: 1.5rem;
  color: #111621;
}

.login-logo span {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 14px;
  background: #b51f27;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
}

.login-logo strong {
  color: #111621;
  font-size: 1.25rem;
  font-weight: 850;
}

.login-heading {
  margin-bottom: 2rem;
}

.login-heading h1 {
  margin-bottom: 0.55rem;
  color: #111621;
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 850;
}

.login-heading p:last-child {
  margin-bottom: 0;
  color: #667085;
}

.form-label {
  color: #252b37;
  font-weight: 700;
}

.form-control {
  border-color: #d9dee8;
  border-radius: 8px;
}

.form-control:focus {
  border-color: #b51f27;
}

.form-check-input:checked {
  border-color: #b51f27;
  background-color: #b51f27;
}

.forgot-link {
  color: #8f1720;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.btn-login {
  border: 0;
  border-radius: 8px;
  background: #111621;
  color: #fff;
  font-weight: 800;
}

.btn-login:hover,
.btn-login:focus {
  background: #b51f27;
  color: #fff;
}

.portal-body {
  background: #f3f5f9;
}

.portal-shell {
  min-height: 100vh;
}

.portal-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: 280px;
  flex-direction: column;
  padding: 1.35rem;
  background: #0d111a;
  color: #fff;
}

.portal-brand {
  width: 100%;
}

.portal-menu {
  display: grid;
  gap: 0.5rem;
  margin-top: 2rem;
}

.portal-menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  text-decoration: none;
}

.portal-menu-link:hover,
.portal-menu-link.active {
  background: rgba(181, 31, 39, 0.18);
  color: #fff;
}

.menu-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(197, 151, 62, 0.18);
  color: #e8c56f;
  font-size: 0.8rem;
  font-weight: 900;
}

.portal-mobile-sidebar {
  width: 280px;
  background: #0d111a;
  color: #fff;
}

.portal-mobile-sidebar .offcanvas-body,
.portal-mobile-sidebar .offcanvas-header {
  padding: 1.25rem;
}

.portal-main {
  min-height: 100vh;
}

.portal-main {
    min-height: 100vh;
    width: 100%;
    margin-left: 0;
}

/*@media (min-width: 992px) {
  .portal-main {
    margin-left: 280px;
  }
}*/

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid #e5e8f0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-kicker {
  color: #8a94a6;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar-title {
  color: #171b24;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 850;
}

.icon-btn {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #dde2ec;
  border-radius: 8px;
  background: #fff;
}

.icon-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 999px;
  background: #171b24;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #dde2ec;
  border-radius: 8px;
  background: #fff;
  color: #252b37;
  font-weight: 750;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
}

.dropdown-header {
  display: grid;
  gap: 0.15rem;
}

.dropdown-header span {
  max-width: 240px;
  overflow: hidden;
  color: #667085;
  font-size: 0.82rem;
  text-overflow: ellipsis;
}

.portal-content {
  padding: clamp(1rem, 3vw, 2rem);
}

.dashboard-page {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-header h2 {
  margin-bottom: 0.45rem;
  color: #171b24;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 850;
}

.dashboard-header p:last-child,
.table-card-header p {
  color: #667085;
}

.dashboard-filter-card,
.dashboard-table-card,
.metric-card {
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(20, 26, 38, 0.06);
}

.dashboard-filter-card {
  padding: 1.25rem;
}

.dashboard-select,
.dashboard-date {
  width: 100%;
  border-color: #d9dee8;
  border-radius: 8px;
}

.dashboard-select {
  font-weight: 700;
}

.metric-card {
  display: grid;
  gap: 0.65rem;
  min-height: 132px;
  padding: 1.35rem;
}

.metric-label {
  color: #667085;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-value {
  color: #111621;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 850;
  line-height: 1.1;
}

.dashboard-table-card {
  overflow: hidden;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid #e7ebf2;
}

.table-card-header h3 {
  margin-bottom: 0.3rem;
  color: #171b24;
  font-size: 1.15rem;
  font-weight: 850;
}

.dashboard-table thead th {
  border-bottom: 1px solid #e7ebf2;
  background: #f8fafc;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-table tbody th,
.dashboard-table tbody td {
  padding: 1rem 1.25rem;
  color: #252b37;
}

.dashboard-table tbody th {
  font-weight: 800;
}

.dashboard-table tbody tr:last-child th,
.dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.welcome-panel {
  display: flex;
  align-items: center;
  min-height: 260px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(20, 26, 38, 0.06);
}

.welcome-panel h2 {
  margin-bottom: 0.75rem;
  color: #171b24;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 850;
}

.welcome-panel p:last-child {
  margin-bottom: 0;
  color: #667085;
}

@media (max-width: 991.98px) {
  .login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  .portal-topbar {
    align-items: flex-start;
  }

  .table-card-header {
    padding: 1rem;
  }

  .user-menu {
    padding: 0.35rem;
  }

  .login-card {
    box-shadow: 0 18px 45px rgba(13, 17, 27, 0.1);
  }
}


/*change password css*/
.change-password-modal {
    border-radius: 14px;
    border: none;
    padding: 24px 32px 32px;
}

.change-password-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #777;
    margin-bottom: 24px;
}

.change-password-close {
    position: absolute;
    right: 18px;
    top: 18px;
    box-shadow: none;
}

.change-password-input {
    height: 58px;
    border-radius: 9px;
    font-size: 18px;
    padding: 12px 18px;
}

    .change-password-input:focus {
        border-color: #6c757d;
        box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.25);
    }

.change-password-submit {
    height: 58px;
    border-radius: 9px;
    background: #212529;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

    .change-password-submit:hover {
        background: #000;
        color: #fff;
    }

.topbar-brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-logo {
    width: 50px;
    height: auto;
    object-fit: contain;
}

.topbar-portal-text {
    font-size: 16px;
    font-weight: 800;
    color: #8a94a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* =========================================================
   TOP BAR - COMPANY + USER AREA
   ========================================================= */

.topbar-user-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    min-width: 0;
}

.topbar-company {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    max-width: 280px;
}

.topbar-company-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: #8a94a6;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.topbar-company-name {
    display: block;
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #1d2636;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-company-name {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    color: #687386;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Medium screens */
@media (max-width: 991.98px) {

    .topbar-user-area {
        gap: 12px;
    }

    .topbar-company {
        max-width: 180px;
    }

    .topbar-company-name {
        font-size: 14px;
    }
}


/* Small/mobile screens */
@media (max-width: 767.98px) {

    .topbar-user-area {
        gap: 8px;
    }

    .topbar-company {
        max-width: 120px;
    }

    .topbar-company-label {
        display: none;
    }

    .topbar-company-name {
        font-size: 13px;
    }
}


/* Very small mobile screens */
@media (max-width: 575.98px) {

    .topbar-company {
        display: none;
    }
}