/*
 * MHC AppCenter redesign baseline
 * Clean replacement for the portal UI. No old layout layer.
 */
:root {
  --ac-bg: #edf1f3;
  --ac-bg-2: #dfe6e9;
  --ac-surface: #f8fafb;
  --ac-panel: #ffffff;
  --ac-panel-2: #f3f6f7;
  --ac-ink: #171d21;
  --ac-text: #2d363b;
  --ac-muted: #66757c;
  --ac-line: #d8e1e5;
  --ac-line-strong: #c1ccd2;
  --ac-sidebar: #11181c;
  --ac-sidebar-2: #1a2428;
  --ac-sidebar-3: #243036;
  --ac-brand: #b80f43;
  --ac-brand-dark: #7d0a30;
  --ac-accent: #4d6972;
  --ac-success: #446f57;
  --ac-warning: #9b7036;
  --ac-danger: #a8343f;
  --ac-focus: rgba(184, 15, 67, .2);
  --ac-shadow: 0 22px 55px rgba(17, 27, 33, .14);
  --ac-shadow-soft: 0 12px 28px rgba(17, 27, 33, .09);
  --ac-radius: 8px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ac-bg); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ac-text);
  font-family: Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(184, 15, 67, .06) 0%, transparent 30%),
    linear-gradient(180deg, #f9fbfc 0%, var(--ac-bg) 52%, var(--ac-bg-2) 100%);
}
body, button, input, select, textarea { letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--ac-focus);
  outline-offset: 2px;
}

.ac-shell {
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
}

.ac-mobile-header { display: none; }
.menu_icon {
  appearance: none;
  border: 0;
  background: transparent;
}

#left.ac-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  height: 100vh;
  padding: 22px 18px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 36%),
    linear-gradient(145deg, var(--ac-sidebar-3) 0%, var(--ac-sidebar) 68%);
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 18px 0 52px rgba(13, 20, 24, .22);
}
#left.ac-sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(184, 15, 67, .72), transparent);
}
#left_before { display: none; }

.ac-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 10px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#left .logo { margin: 0; }
#left .ac-sidebar-brand .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 8px;
  background: rgba(255,255,255,.96);
  border-radius: var(--ac-radius);
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}
#left .ac-sidebar-brand .logo img { width: 100%; max-height: 100%; }
.ac-brand-text { display: grid; gap: 2px; min-width: 0; }
.ac-brand-text strong { color: #fff; font-size: 18px; font-weight: 900; line-height: 1; }
.ac-brand-text span { color: #aebbc0; font-size: 12px; font-weight: 900; text-transform: uppercase; }

#left .flex-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 118px);
  padding: 18px 0 0;
}
.ac-profile {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--ac-radius);
}
.ac-profile a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #d8e0e3;
}
.ac-profile-main i { flex: 0 0 auto; color: var(--ac-brand); font-size: 26px; }
.ac-profile-main span {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ac-profile-logout { color: #aebbc0; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.ac-profile a:hover, .ac-profile a.active { color: #fff; }

.ac-navigation {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 0 70px;
  overflow: auto;
}
.ac-navigation ul { margin: 0; padding: 0; list-style: none; }
.ac-navigation .level1 { display: grid; gap: 8px; }
.ac-navigation .level1 > li { border-radius: var(--ac-radius); }
.ac-navigation .level1 > li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  color: #d8e0e3;
  font-size: 14px;
  font-weight: 900;
  border-radius: var(--ac-radius);
}
.ac-navigation .level1 > li > a i { width: 22px; color: #93a2a8; text-align: center; }
.ac-navigation .level1 > li.active > a,
.ac-navigation .level1 > li:hover > a {
  color: #fff;
  background: rgba(255,255,255,.075);
}
.ac-navigation .level1 > li.active > a { box-shadow: inset 3px 0 0 var(--ac-brand); }
.ac-navigation .level1 > li.active > a i,
.ac-navigation .level1 > li:hover > a i { color: #fff; }
.ac-navigation .level2 {
  display: grid;
  gap: 3px;
  margin: 7px 0 8px 34px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.11);
}
.ac-navigation .level2.hidden { display: grid; }
.ac-navigation .level2 li { min-width: 0; color: #8f9da3; font-size: 13px; }
.ac-navigation .level2 li.title {
  margin: 8px 0 5px;
  color: #75858c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.ac-navigation .level2 li a {
  display: block;
  padding: 8px 10px;
  color: #aebbc0;
  border-radius: 6px;
}
.ac-navigation .level2 li.active a,
.ac-navigation .level2 li a:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
}
.ac-sidebar-date {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px;
  color: #aebbc0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--ac-radius);
}

#main.ac-main {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}
.ac-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 18px clamp(24px, 3vw, 46px);
  background: rgba(248,250,251,.9);
  border-bottom: 1px solid rgba(196,208,214,.82);
  backdrop-filter: blur(18px);
}
.ac-title-block { display: grid; gap: 4px; min-width: 0; }
.ac-context-label {
  margin: 0;
  color: var(--ac-brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.page-title h1 { margin: 0; color: var(--ac-ink); font-size: clamp(22px, 2vw, 30px); font-weight: 900; line-height: 1.12; }
.page-name { display: block; margin-top: 3px; color: var(--ac-muted); font-size: 13px; font-weight: 700; }
.page-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 10px 13px;
  color: var(--ac-text);
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  box-shadow: 0 8px 18px rgba(19,29,35,.06);
}
.page-user i { color: var(--ac-brand); font-size: 20px; }
.content {
  height: calc(100vh - 86px);
  padding: clamp(22px, 3vw, 42px);
  overflow: auto;
}

.ac-dashboard-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  width: 100%;
  max-width: 1380px;
  min-height: 230px;
  margin: 0 0 26px;
  padding: clamp(26px, 3vw, 42px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(244,248,249,.9)),
    linear-gradient(90deg, rgba(184,15,67,.1), transparent 54%);
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  box-shadow: var(--ac-shadow-soft);
}
.ac-dashboard-hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: linear-gradient(180deg, var(--ac-brand), var(--ac-accent));
}
.ac-hero-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 8px; color: var(--ac-brand); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.ac-dashboard-hero h2 {
  max-width: 820px;
  margin: 0 0 14px;
  color: var(--ac-ink);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 900;
  line-height: 1;
}
.ac-dashboard-hero p { max-width: 720px; margin: 0; color: var(--ac-muted); font-size: 16px; }
.hero-status {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 156px;
  min-height: 118px;
  color: #fff;
  background: linear-gradient(150deg, var(--ac-sidebar-3), var(--ac-sidebar));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--ac-radius);
  box-shadow: var(--ac-shadow-soft);
}
.hero-status span { font-size: 38px; font-weight: 900; line-height: 1; }
.hero-status small { color: #c8d2d6; font-size: 12px; font-weight: 900; text-transform: uppercase; }

.ac-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 1380px;
  margin: 0 0 16px;
}
.ac-section-heading h3 { margin: 0 0 3px; color: var(--ac-ink); font-size: 21px; font-weight: 900; }
.ac-section-heading p { margin: 0; color: var(--ac-muted); font-size: 13px; }
.ac-live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--ac-success);
  border-radius: 6px;
}
.ac-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1380px;
}
.tool-card-form { display: flex; width: 100%; height: 100%; }
.app-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 156px;
  padding: 24px;
  overflow: hidden;
  color: var(--ac-ink);
  text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,247,248,.96));
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  box-shadow: var(--ac-shadow-soft);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.app-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--ac-brand), var(--ac-accent));
}
.app-card:hover:not(.disabled) { transform: translateY(-3px); border-color: rgba(184,15,67,.38); box-shadow: var(--ac-shadow); }
.app-card-icon, .app-card-body, .app-card i { position: relative; z-index: 1; }
.app-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(145deg, var(--ac-sidebar-3), var(--ac-sidebar));
  border-radius: var(--ac-radius);
  box-shadow: 0 14px 26px rgba(18,24,28,.18);
}
.app-card-body { display: grid; gap: 6px; min-width: 0; }
.app-card-title { color: var(--ac-ink); font-size: 21px; font-weight: 900; line-height: 1.15; }
.app-card-subtitle { color: var(--ac-muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.app-card i { margin-left: auto; color: var(--ac-brand); transition: transform .18s ease; }
.app-card:hover:not(.disabled) i { transform: translateX(4px); }
.app-card.disabled { cursor: not-allowed; opacity: .55; filter: grayscale(.25); }
.app-card.disabled .app-card-icon { background: #7a868a; box-shadow: none; }

.container {
  padding: 20px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  box-shadow: var(--ac-shadow-soft);
}
.table { width: 100%; margin: 0; color: var(--ac-text); border-collapse: collapse; }
.table thead th {
  padding: 13px 16px;
  color: #4f5e64;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--ac-panel-2);
  border-bottom: 1px solid var(--ac-line);
}
.table tbody td, .table tbody th { padding: 13px 16px; border-bottom: 1px solid var(--ac-line); }
.table tbody tr:hover td, .table tbody tr:hover th { background: #fbfcfd; }
.form-control, .form-select, input.text, textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  color: var(--ac-text);
  background: #fff;
  border: 1px solid var(--ac-line-strong);
  border-radius: 7px;
}
.form-control:focus, .form-select:focus, input.text:focus, textarea:focus {
  border-color: var(--ac-brand);
  box-shadow: 0 0 0 .2rem var(--ac-focus);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  color: #fff;
  font-weight: 900;
  background: var(--ac-accent);
  border: 1px solid transparent;
  border-radius: 7px;
}
.btn:hover { color: #fff; transform: translateY(-1px); }
.btn-submit, .btn-danger { background: var(--ac-brand); border-color: var(--ac-brand); }
.btn-submit:hover, .btn-danger:hover { background: var(--ac-brand-dark); border-color: var(--ac-brand-dark); }
.btn-success { background: var(--ac-success); border-color: var(--ac-success); }
.btn-default { background: #66757c; border-color: #66757c; }
.alert { border-radius: var(--ac-radius); }
#loading { display: none; }
#loading.visible {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(248,250,251,.82);
  backdrop-filter: blur(6px);
}

.ac-login.login {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(184,15,67,.08), transparent 42%),
    linear-gradient(135deg, #f8fafb 0%, #e6ecef 46%, #11181c 46%, #182226 100%);
}
.ac-login .login-panel {
  display: flex;
  align-items: center;
  min-height: 100vh;
  background: rgba(248,250,251,.97);
  border-right: 1px solid rgba(196,208,214,.85);
  box-shadow: 16px 0 46px rgba(14,20,24,.16);
}
.login-form { width: min(440px, 100%); margin: 0 auto; padding: 44px 42px; }
.login-form .logo { width: 150px; margin: 0 0 46px; }
.login-kicker { margin: 0 0 6px; color: var(--ac-brand); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.login-form h1 { margin: 0 0 24px; color: var(--ac-ink); font-size: 32px; font-weight: 900; }
.login-intro { margin: -12px 0 28px; color: var(--ac-muted); font-size: 14px; line-height: 1.5; }
.login-form .input-group { display: block; margin-bottom: 18px; }
.login-form label { display: block; margin-bottom: 7px; color: var(--ac-muted); font-size: 13px; font-weight: 900; }
.login-form .btn-submit { width: 100%; min-height: 48px; }
div.login-img {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  background: url('../img/login.jpg') no-repeat center / cover;
}
div.login-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17,24,28,.88), rgba(17,24,28,.36)),
    linear-gradient(135deg, rgba(184,15,67,.34), transparent 46%);
}
.login-hero { position: relative; max-width: 780px; margin-left: 8vw; color: #fff; }
.login-hero p { margin: 0 0 8px; font-size: 17px; font-weight: 900; }
.login-hero h1 { max-width: 780px; margin: 0 0 14px; font-size: clamp(46px, 6vw, 82px); font-weight: 900; line-height: 1.02; }
.login-hero span { display: block; max-width: 560px; color: #d5dde1; font-size: 18px; }

@media only screen and (min-width: 1440px) {
  .ac-shell { grid-template-columns: 336px minmax(0, 1fr); }
  .content { padding-left: 52px; padding-right: 52px; }
}
@media only screen and (max-width: 1200px) {
  .ac-app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media only screen and (max-width: 1024px) {
  .ac-shell { grid-template-columns: 286px minmax(0, 1fr); }
  #left.ac-sidebar { padding-left: 14px; padding-right: 14px; }
  .ac-dashboard-hero { align-items: flex-start; flex-direction: column; }
}
@media only screen and (max-width: 767px) {
  body { font-size: 16px; }
  .ac-shell { display: block; height: auto; min-height: 100vh; }
  .ac-mobile-header {
    position: sticky;
    top: 0;
    z-index: 260;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 18px;
    background: rgba(17,24,28,.98);
    box-shadow: 0 8px 24px rgba(18,24,28,.18);
  }
  .ac-mobile-header .logo { width: 118px; margin: 0; }
  .menu_icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    z-index: 280;
  }
  .menu_icon .inner, .menu_icon::before, .menu_icon::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
  }
  .menu_icon .inner { top: 20px; }
  .menu_icon::before { top: 13px; }
  .menu_icon::after { bottom: 13px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .menu_icon .inner { opacity: 0; }
  body.nav-open .menu_icon::before { top: 20px; transform: rotate(45deg); }
  body.nav-open .menu_icon::after { bottom: 20px; transform: rotate(-45deg); }
  #left.ac-sidebar {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 220;
    width: min(88vw, 340px);
    height: 100vh;
    padding: 18px 16px;
    overflow: auto;
  }
  body.nav-open #left.ac-sidebar { display: flex; }
  #left_before {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7,10,12,.62);
    z-index: -1;
  }
  #left .flex-box { height: auto; min-height: calc(100vh - 106px); }
  #main.ac-main { height: auto; min-height: calc(100vh - 64px); overflow: visible; }
  .ac-topbar { align-items: flex-start; flex-direction: column; min-height: 0; padding: 18px; }
  .page-user { width: 100%; }
  .content { height: auto; min-height: 0; padding: 18px; overflow: visible; }
  .ac-dashboard-hero { min-height: 0; padding: 24px 22px; }
  .ac-dashboard-hero h2 { font-size: 32px; }
  .hero-status { width: 100%; min-height: auto; padding: 18px; display: flex; justify-content: space-between; }
  .ac-section-heading { align-items: flex-start; flex-direction: column; }
  .ac-app-grid { grid-template-columns: 1fr; gap: 14px; }
  .app-card { min-height: 126px; padding: 18px; }
  .app-card-title { font-size: 18px; }
  .ac-login.login { background: #edf1f3; }
  .row.login { flex-direction: column-reverse; }
  .ac-login .login-panel { min-height: auto; }
  .login-form { width: 100%; padding: 34px 26px 42px; }
  .login-form .logo { width: 135px; margin-bottom: 34px; }
  div.login-img { min-height: 270px; }
  .login-hero { margin: 34px 26px; }
  .login-hero h1 { font-size: 38px; }
  .login-hero span { font-size: 16px; }
}
