:root {
  --mmi-navy: #271f67;
  --mmi-teal: #1a8fa0;
  --mmi-cyan: #3eb7c3;
  --mmi-gold: #d8b137;
  --mmi-bg: #eef4fb;
  --mmi-line: #ced9e7;
  --mmi-text: #18202b;
}

.mmi-portal {
  direction: rtl;
  text-align: right;
  max-width: 1200px;
  margin: 26px auto;
  color: var(--mmi-text);
  background:
    radial-gradient(circle at 12% 20%, rgba(216, 177, 55, 0.12), transparent 40%),
    radial-gradient(circle at 86% 0%, rgba(62, 183, 195, 0.16), transparent 38%),
    linear-gradient(145deg, #f6f9fe 0%, #ffffff 48%, #f4fbff 100%);
  border: 1px solid var(--mmi-line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 44px rgba(30, 50, 84, 0.12);
  font-family: "Tajawal", "Cairo", "Noto Kufi Arabic", sans-serif;
}

.mmi-portal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--mmi-line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.mmi-topbar-user {
  font-weight: 700;
  color: var(--mmi-navy);
}

.mmi-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mmi-bell-btn {
  border: 1px solid #ced9e8;
  border-radius: 8px;
  background: #fff;
  padding: 6px 10px;
  cursor: pointer;
}

.mmi-bell-dropdown {
  display: none;
  border: 1px solid #d4dfec;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  margin-bottom: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.mmi-bell-dropdown.is-open {
  display: block;
}

.mmi-bell-item {
  border-bottom: 1px solid #edf3fa;
  padding: 8px 4px;
}

.mmi-bell-item:last-child {
  border-bottom: 0;
}

.mmi-bell-item p {
  margin: 4px 0;
}

.mmi-brand {
  background: linear-gradient(120deg, var(--mmi-navy), #1f3f53);
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.mmi-brand-title {
  font-size: 23px;
  font-weight: 800;
}

.mmi-brand-subtitle {
  color: #f2da8c;
  margin-top: 3px;
}

.mmi-brand-logos {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.mmi-brand-logos img {
  height: 56px;
  width: auto;
  background: #fff;
  border-radius: 9px;
  padding: 4px;
}

.mmi-login-card,
.mmi-panel {
  background: #fff;
  border: 1px solid var(--mmi-line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}

.mmi-login-card h3,
.mmi-panel h4 {
  margin-top: 0;
  color: #264760;
}

.mmi-login-card form {
  display: grid;
  gap: 12px;
}

.mmi-login-card .login-username,
.mmi-login-card .login-password,
.mmi-login-card .login-remember,
.mmi-login-card .login-submit {
  margin: 0;
}

.mmi-login-card label {
  display: block;
  margin-bottom: 6px;
  color: #244860;
  font-weight: 700;
}

.mmi-login-card input[type="text"],
.mmi-login-card input[type="password"],
.mmi-login-card input[type="email"] {
  width: 100%;
  height: 44px;
  border: 1px solid #c4d4e6;
  border-radius: 8px;
  padding: 8px 10px;
  box-sizing: border-box;
}

.mmi-login-card input[type="submit"] {
  min-width: 140px;
  height: 42px;
  border-radius: 8px;
  border: 0;
  background: #1a8fa0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.mmi-login-card .login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mmi-top-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mmi-stat {
  background: #fff;
  border: 1px solid var(--mmi-line);
  border-right: 4px solid var(--mmi-gold);
  border-radius: 10px;
  padding: 10px 12px;
}

.mmi-stat span {
  display: block;
  color: #536d84;
  font-size: 13px;
}

.mmi-stat strong {
  font-size: 20px;
  color: var(--mmi-navy);
}

.mmi-panel table {
  width: 100%;
  border-collapse: collapse;
}

.mmi-panel th,
.mmi-panel td {
  border: 1px solid #e1e8f1;
  padding: 10px;
  vertical-align: top;
  font-size: 13px;
}

.mmi-panel th {
  background: #edf3fa;
  color: #2e4e67;
}

.mmi-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #ecf3ff;
  color: #365675;
}

.mmi-status-pill.status-approved {
  background: #e4f9eb;
  color: #1f7b4f;
}

.mmi-status-pill.status-rejected {
  background: #fde7e7;
  color: #a42b2b;
}

.mmi-status-pill.status-needs_revision {
  background: #fff5db;
  color: #886300;
}

.mmi-status-pill.status-submitted,
.mmi-status-pill.status-under_review {
  background: #e8f5ff;
  color: #0b5f8a;
}

.mmi-form-panel {
  margin-top: 16px;
}

.mmi-initiative-form {
  display: grid;
  gap: 12px;
}

.mmi-section {
  border: 1px dashed #b8cadf;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.mmi-section h5 {
  margin: 0 0 10px;
  color: #2a4a61;
  font-size: 17px;
}

.mmi-section label {
  display: block;
  margin: 8px 0 5px;
  font-weight: 700;
  color: #2b3f53;
}

.mmi-section input,
.mmi-section textarea,
.mmi-section select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bfd0e2;
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

.mmi-section textarea {
  min-height: 96px;
  resize: vertical;
}

.mmi-section input:focus,
.mmi-section textarea:focus,
.mmi-section select:focus {
  outline: none;
  border-color: var(--mmi-teal);
  box-shadow: 0 0 0 3px rgba(26, 143, 160, 0.15);
}

.mmi-repeater-table {
  overflow-x: auto;
  border: 1px solid #d5e1ee;
  border-radius: 10px;
}

.mmi-repeater-table table {
  margin: 0;
}

.mmi-repeater-table table input,
.mmi-repeater-table table select {
  min-width: 140px;
}

.mmi-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.mmi-submit-box {
  border: 1px solid #c8d9eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  padding: 14px;
  box-shadow: 0 8px 20px rgba(26, 66, 92, 0.06);
}

.mmi-submit-box label {
  margin-top: 0;
  font-size: 16px;
}

.mmi-submit-box textarea {
  min-height: 110px;
}

.mmi-submit-box .mmi-actions .button {
  min-width: 145px;
  height: 40px;
  border-radius: 10px;
  font-weight: 700;
}

.mmi-submit-ajax-notice {
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 10px;
  background: #e8f7ed;
  color: #1f6c43;
  border-right: 4px solid #2fa567;
  font-weight: 700;
}

.mmi-submit-ajax-notice.is-error {
  background: #ffeaea;
  color: #8b1d1d;
  border-right-color: #cf2d2d;
}

.mmi-form-locked {
  opacity: 0.9;
}

.mmi-form-locked input,
.mmi-form-locked textarea,
.mmi-form-locked select {
  background: #f3f6fa !important;
  cursor: not-allowed;
}

.mmi-site-home {
  direction: rtl;
  text-align: right;
  max-width: 980px;
  margin: 40px auto;
  border: 1px solid #d4dfeb;
  border-radius: 16px;
  padding: 30px;
  background:
    radial-gradient(circle at 10% 10%, rgba(216,177,55,0.14), transparent 35%),
    radial-gradient(circle at 90% 0%, rgba(62,183,195,0.14), transparent 35%),
    #fff;
}

.mmi-home-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.mmi-home-brand img {
  height: 60px;
  background: #fff;
  border: 1px solid #e5edf5;
  border-radius: 10px;
  padding: 4px;
}

.mmi-home-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.mmi-inline-alert {
  background: #fff6dc;
  color: #6d5511;
  border-right: 4px solid var(--mmi-gold);
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}

.mmi-inline-alert.is-success {
  background: #e9f9ef;
  color: #1e6e47;
  border-right-color: #34a96f;
}

.mmi-notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mmi-notification-list li {
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #f8fcff;
  padding: 9px;
}

.mmi-notification-list p {
  margin: 4px 0;
}

@media (max-width: 920px) {
  .mmi-brand-title {
    font-size: 20px;
  }

  .mmi-actions {
    flex-direction: column;
  }

  .mmi-panel table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
