:root {
  --mm-ink: #17211b;
  --mm-muted: #617067;
  --mm-surface: #ffffff;
  --mm-surface-soft: #f4f7f4;
  --mm-canvas: #eef3ef;
  --mm-border: #d7e0d9;
  --mm-brand: #087f5b;
  --mm-brand-dark: #056247;
  --mm-accent: #e8a62a;
  --mm-radius: 8px;
  --mm-shadow: 0 12px 30px rgba(23, 33, 27, 0.08);
}

html { min-width: 320px; }
body { display: flex; min-height: 100vh; flex-direction: column; margin: 0 !important; color: var(--mm-ink); background: linear-gradient(135deg, rgba(8, 127, 91, 0.05), transparent 34%), var(--mm-canvas); font-family: "DM Sans", sans-serif; font-size: 16px; }
body > .container, body > .container-fluid, .app-page { width: min(100% - 32px, 1180px); margin-inline: auto; padding: 32px 0 56px; }
body > .container .container { max-width: 100%; }
h1, h2, h3, h4, h5, h6 { color: var(--mm-ink); font-family: "Manrope", sans-serif; letter-spacing: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--mm-muted); font-size: 1rem; }
a { color: var(--mm-brand-dark); }
a:hover { color: var(--mm-brand); }

.app-header { position: sticky; top: 0; z-index: 1030; width: 100vw; margin-left: calc(50% - 50vw); border-bottom: 1px solid rgba(215, 224, 217, 0.9); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); }
.app-header .navbar { min-height: 68px; padding: 8px 0; }
.app-header .navbar-brand { display: flex; align-items: center; gap: 9px; color: var(--mm-ink); font-family: "Manrope", sans-serif; font-size: 1.15rem; font-weight: 800; }
.app-header .navbar-brand img { width: 42px; }
.app-header .nav-link { color: #405047; font-weight: 600; text-transform: none; }
.app-header .nav-link:hover { color: var(--mm-brand); }
.navbar-actions { display: flex; align-items: center; gap: 8px; }
.navbar-actions form { margin: 0; }

.btn { border-radius: 7px; padding: 10px 16px; font-family: "DM Sans", sans-serif; font-size: 0.92rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.btn-primary, button[type="submit"] { border-color: var(--mm-brand); background: var(--mm-brand); color: #fff; }
.btn-primary:hover, button[type="submit"]:hover { border-color: var(--mm-brand-dark); background: var(--mm-brand-dark); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--mm-ink); }
.btn-quiet:hover { background: var(--mm-surface-soft); }
.dropdown-menu { border: 1px solid var(--mm-border); border-radius: var(--mm-radius); box-shadow: var(--mm-shadow); }
.dropdown-item { padding: 9px 14px; }
.app-messages { padding-top: 16px; }
.alert { border-radius: var(--mm-radius); }

form:not(.navbar-actions form) { max-width: 100%; }
label { color: #35443b; font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { max-width: 100%; min-height: 44px; border: 1px solid #bdcbc1; border-radius: 7px; padding: 9px 11px; background: #fff; color: var(--mm-ink); }
textarea { min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--mm-brand); outline: 3px solid rgba(8, 127, 91, 0.14); }

table { width: 100%; margin: 18px 0 28px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--mm-border); border-radius: var(--mm-radius); background: var(--mm-surface); box-shadow: 0 6px 18px rgba(23, 33, 27, 0.04); overflow: hidden; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--mm-border); text-align: left; vertical-align: middle; }
th, tr:first-child td { background: #e8f0ea; color: #334239; font-weight: 800; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faf8; }
img, video, iframe, canvas, svg { max-width: 100%; }
pre { max-width: 100%; overflow: auto; border-radius: var(--mm-radius); }

.app-footer { width: 100vw; margin-top: auto; margin-left: calc(50% - 50vw); border-top: 1px solid var(--mm-border); background: #17211b; color: #dce6df; }
.app-footer-inner { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-family: "Manrope", sans-serif; font-weight: 800; }
.footer-links, .footer-social { display: flex; align-items: center; gap: 18px; }
.footer-links a { color: #dce6df; }
.footer-social span { color: #aebdb3; font-size: 0.9rem; }
.footer-social img { object-fit: contain; }

.search-workspace { display: grid; min-height: min(68vh, 620px); place-items: center; padding-block: 44px; }
.search-workspace-inner { width: min(100%, 760px); text-align: center; }
.search-workspace .brand-lockup { width: min(470px, 82vw); margin-bottom: 26px; }
.search-workspace form { position: relative; }
.search-workspace input { width: 100%; min-height: 58px !important; padding: 14px 52px 14px 18px !important; border-radius: var(--mm-radius) !important; box-shadow: var(--mm-shadow); }
.search-workspace .search-icon { position: absolute; top: 50%; right: 19px; transform: translateY(-50%); color: var(--mm-brand); font-size: 1.2rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading p { margin: 4px 0 0; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.token-dashboard .token-name-link, .token-dashboard .token-name-text { font-size: 1.1rem; }
.table-action { display: inline-flex; min-height: 36px; align-items: center; padding: 6px 10px; border-radius: 6px; color: var(--mm-brand-dark); font-weight: 700; }
.table-action:hover { background: #e4f1e9; }
.creation-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.creation-action { display: flex; min-height: 96px; flex-direction: column; justify-content: center; border: 1px solid var(--mm-border); border-radius: var(--mm-radius); padding: 16px; background: var(--mm-surface); color: var(--mm-ink); box-shadow: 0 5px 15px rgba(23, 33, 27, 0.04); }
.creation-action strong { display: block; margin-bottom: 3px; font-family: "Manrope", sans-serif; }
.creation-action span { color: var(--mm-muted); font-size: 0.9rem; }
.creation-action:hover { border-color: var(--mm-brand); transform: translateY(-2px); }
.form-panel { max-width: 860px; border: 1px solid var(--mm-border); border-radius: var(--mm-radius); padding: clamp(18px, 4vw, 32px); background: var(--mm-surface); box-shadow: var(--mm-shadow); }
.form-panel form > p { display: grid; gap: 6px; margin-bottom: 18px; }
.form-panel form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .form-panel form select, .form-panel form textarea { width: 100%; }

@media (max-width: 991.98px) {
  .app-header .navbar-collapse { padding: 14px 0 8px; }
  .navbar-actions { align-items: stretch; flex-direction: column; }
  .navbar-actions .btn, .navbar-actions form, .navbar-actions form .btn { width: 100%; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .creation-actions { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body > .container, body > .container-fluid, .app-page { width: min(100% - 20px, 1180px); padding-top: 22px; }
  .app-footer-inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .footer-links, .footer-social { flex-wrap: wrap; }
  th, td { padding: 11px 12px; }
  input, select, textarea, button { font-size: 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
}