#maelle-cms-root,
#maelle-cms-login {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.maelle-cms-bar {
  position: fixed;
  z-index: 2147483000;
  top: 0;
  right: 0;
  left: 0;
  min-height: 52px;
  padding: 0 18px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.maelle-cms-brand,
.maelle-cms-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.maelle-cms-brand > span {
  border-radius: 999px;
  padding: 5px 10px;
  background: #10b981;
  color: #06271c;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#maelle-cms-status {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
}

#maelle-cms-status[data-type="success"] { color: #86efac; }
#maelle-cms-status[data-type="error"] { color: #fca5a5; }

.maelle-cms-actions button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.maelle-cms-actions button:hover { background: rgba(255, 255, 255, 0.16); }
.maelle-cms-actions button:disabled { cursor: wait; opacity: 0.6; }
.maelle-cms-actions .is-primary { border-color: #2563eb; background: #2563eb; }
.maelle-cms-actions .is-primary:hover { background: #1d4ed8; }
.maelle-cms-actions .is-close { border-color: transparent; color: #cbd5e1; }

body.maelle-cms-active { padding-top: 52px !important; }

body.maelle-cms-editing .maelle-cms-editable {
  outline: 2px dashed rgba(16, 185, 129, 0.58) !important;
  outline-offset: 2px;
  cursor: text !important;
}

body.maelle-cms-editing .maelle-cms-editable:hover,
body.maelle-cms-editing .maelle-cms-editable:focus {
  outline-style: solid !important;
  outline-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
}

#maelle-cms-login {
  position: fixed;
  z-index: 2147483640;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(7px);
}

.maelle-cms-login-card {
  position: relative;
  width: min(100%, 390px);
  border-radius: 16px;
  padding: 30px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.maelle-cms-login-card h2 { margin: 4px 0 8px; color: #0f172a; font-size: 24px; }
.maelle-cms-login-card > p:not(.maelle-cms-kicker) { margin: 0 0 20px; color: #64748b; font-size: 14px; }
.maelle-cms-kicker { margin: 0; color: #059669; font-size: 11px; font-weight: 900; letter-spacing: 0.12em; }
.maelle-cms-login-card label { display: block; margin: 12px 0 5px; color: #334155; font-size: 13px; font-weight: 700; }

.maelle-cms-login-card input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  color: #0f172a;
  background: #ffffff;
  font: inherit;
}

.maelle-cms-login-card input:focus { border-color: #10b981; outline: 3px solid rgba(16, 185, 129, 0.18); }
.maelle-cms-login-button { width: 100%; margin-top: 18px; border: 0; border-radius: 8px; padding: 11px; background: #059669; color: #fff; font-weight: 800; cursor: pointer; }
.maelle-cms-login-button:disabled { cursor: wait; opacity: 0.65; }
.maelle-cms-error { margin: 10px 0 0 !important; color: #dc2626 !important; font-size: 13px !important; }
.maelle-cms-modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: #64748b; font-size: 26px; cursor: pointer; }

@media (max-width: 760px) {
  body.maelle-cms-active { padding-top: 98px !important; }
  .maelle-cms-bar { min-height: 98px; align-items: flex-start; flex-direction: column; overflow-x: auto; padding: 10px 12px; }
  .maelle-cms-actions { width: max-content; }
  .maelle-cms-login-card { padding: 26px 22px; }
}
