/* CartoonMakerApp.com — Clean Modular Site Shell (Header, Footer, Accounts, Admin) */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #0b1020; color: #e2e8f0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh;
}
a { color: #818cf8; text-decoration: none; }
a:hover { text-decoration: underline; }

.cma-body-studio { display: flex; flex-direction: column; min-height: 100vh; }
.cma-studio-main { flex: 1 1 auto; display: flex; flex-direction: column; padding: 8px 12px 12px; }
.cma-studio-main .cm7-game-viewport { max-width: 1280px; width: 100%; margin: 0 auto; }

/* Modular Top Header */
.cma-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.cma-header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cma-brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: #f8fafc; font-size: 16px; font-weight: 600; text-decoration: none !important;
}
.cma-brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.cma-brand-text strong { color: #a5b4fc; }

.cma-nav { display: flex; align-items: center; gap: 6px; }
.cma-nav-link {
  color: #cbd5e1; font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; text-decoration: none !important;
  transition: background 0.15s, color 0.15s;
}
.cma-nav-link:hover, .cma-nav-link.is-active { background: rgba(99, 102, 241, 0.18); color: #fff; }
.cma-nav-admin { color: #fcd34d; }

/* Google Sign-In & User Dropdown */
.cma-auth-slot { display: flex; align-items: center; }
.cma-google-fallback-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #1e293b; border: none; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cma-user-menu { position: relative; }
.cma-user-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(30, 41, 59, 0.9); color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 999px;
  padding: 4px 12px 4px 5px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cma-user-avatar, .cma-user-avatar-fallback {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
}
.cma-user-avatar-fallback {
  background: #4f46e5; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.cma-role-badge {
  background: rgba(245, 158, 11, 0.2); color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4); border-radius: 6px;
  font-size: 10px; padding: 1px 5px; font-weight: 700;
}
.cma-user-dd {
  position: absolute; right: 0; top: calc(100% + 8px); width: 220px;
  background: #0f172a; border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  padding: 8px; z-index: 950;
}
.cma-user-dd-head { padding: 8px 10px; border-bottom: 1px solid rgba(148,163,184,0.14); margin-bottom: 6px; }
.cma-user-dd-head strong { display: block; font-size: 13px; color: #f8fafc; }
.cma-user-dd-head small { display: block; font-size: 11px; color: #94a3b8; word-break: break-all; }
.cma-dd-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: #e2e8f0; padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; text-decoration: none !important;
}
.cma-dd-item:hover { background: rgba(99, 102, 241, 0.18); }
.cma-dd-danger { color: #fca5a5; }

/* Modular Footer */
.cma-footer {
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.85);
}
.cma-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: #94a3b8;
}
.cma-footer-links { display: flex; gap: 16px; }
.cma-footer-links a { color: #cbd5e1; }

/* Inner Pages (My Projects, Admin, Legal) */
.cma-container { max-width: 1120px; margin: 24px auto 48px; padding: 0 16px; }
.cma-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.cma-page-head h1 { margin: 0 0 4px; font-size: 24px; color: #f8fafc; }
.cma-sub { margin: 0; color: #94a3b8; font-size: 14px; }
.cma-card {
  background: #111827; border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px; padding: 20px;
}
.cma-card h2 { margin: 0 0 10px; font-size: 17px; color: #f8fafc; }
.cma-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cma-pill {
  display: inline-block; background: rgba(99, 102, 241, 0.18); color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35); border-radius: 999px;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
}
.cma-empty { padding: 20px; text-align: center; color: #94a3b8; background: rgba(15,23,42,0.55); border-radius: 10px; }

.cma-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #1e293b; color: #f8fafc; border: 1px solid rgba(148,163,184,0.25);
  border-radius: 9px; padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none !important;
}
.cma-btn:hover { background: #334155; }
.cma-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cma-btn-sm { padding: 6px 10px; font-size: 12px; }
.cma-btn-primary { background: #4f46e5; border-color: #6366f1; }
.cma-btn-primary:hover { background: #4338ca; }
.cma-btn-green { background: #059669; border-color: #10b981; }
.cma-btn-green:hover { background: #047857; }
.cma-btn-warn { background: #b45309; border-color: #f59e0b; }
.cma-btn-warn:hover { background: #92400e; }
.cma-btn-danger { background: #991b1b; border-color: #ef4444; }
.cma-btn-danger:hover { background: #7f1d1d; }

.cma-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cma-proj-card {
  background: #0f172a; border: 1px solid rgba(148,163,184,0.16);
  border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.cma-proj-title { font-weight: 700; color: #f8fafc; font-size: 15px; }
.cma-proj-meta { font-size: 12px; color: #a5b4fc; }
.cma-proj-date { font-size: 11px; color: #94a3b8; margin-bottom: 6px; }
.cma-proj-actions { display: flex; gap: 8px; margin-top: auto; }

.cma-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.cma-stat-card { background: #111827; border: 1px solid rgba(148,163,184,0.16); border-radius: 12px; padding: 14px; }
.cma-stat-card span { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.cma-stat-card strong { font-size: 22px; color: #f8fafc; }

.cma-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.cma-btn-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cma-deploy-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cma-deploy-form input[type="file"] { background: #0f172a; border: 1px dashed rgba(148,163,184,0.35); border-radius: 10px; padding: 12px; color: #cbd5e1; }
.cma-status-box { margin-top: 12px; padding: 10px 12px; border-radius: 9px; font-size: 13px; }
.cma-status-box.is-ok { background: rgba(16,185,129,0.16); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.35); }
.cma-status-box.is-err { background: rgba(239,68,68,0.16); color: #fca5a5; border: 1px solid rgba(239,68,68,0.35); }

.cma-table-wrap { overflow-x: auto; }
.cma-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cma-table th, .cma-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid rgba(148,163,184,0.12); }
.cma-table th { color: #94a3b8; font-weight: 600; font-size: 12px; }
.cma-td-actions { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 640px) {
  .cma-header-inner { padding: 8px 10px; }
  .cma-brand-text { font-size: 14px; }
  .cma-nav-link { padding: 5px 8px; font-size: 13px; }
}


/* ===== v1.2 Upgraded Header, Footer, Message Center, Profile & Admin Inbox ===== */
.cma-header {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88));
  border-bottom: 1px solid rgba(99, 102, 241, 0.24);
  box-shadow: 0 6px 24px rgba(2, 6, 23, 0.45);
}
.cma-brand-stack { display: flex; flex-direction: column; line-height: 1.15; }
.cma-brand-tag { font-size: 10px; color: #94a3b8; font-weight: 500; letter-spacing: 0.02em; }
.cma-brand-logo-sm { width: 26px; height: 26px; border-radius: 7px; }
.cma-nav-link { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.cma-notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #ef4444; color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1;
}

/* Modern 3-Column Footer */
.cma-footer {
  background: linear-gradient(180deg, #0f172a, #070b16);
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}
.cma-footer-grid {
  max-width: 1280px; margin: 0 auto; padding: 28px 16px 20px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px;
}
.cma-footer-brand { display: inline-flex; align-items: center; gap: 8px; color: #f8fafc; font-size: 16px; margin-bottom: 8px; }
.cma-footer-desc { margin: 0 0 12px; font-size: 13px; color: #94a3b8; line-height: 1.5; max-width: 420px; }
.cma-footer-col h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: #c7d2fe; }
.cma-footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.cma-footer-list a { color: #cbd5e1; }
.cma-footer-list a:hover { color: #fff; }
.cma-footer-note { margin: 12px 0 0; font-size: 12px; color: #64748b; }
.cma-footer-bottom {
  max-width: 1280px; margin: 0 auto; padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 12px; color: #64748b;
}
.cma-btn-support { background: linear-gradient(135deg, #4f46e5, #7c3aed); border-color: rgba(165, 180, 252, 0.4); }

/* Message Center Below Game */
.cma-msg-section { max-width: 1280px; width: 100%; margin: 16px auto 32px; padding: 0 12px; }
.cma-msg-wrap {
  background: #111827; border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 16px; padding: 20px;
}
.cma-msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.cma-msg-head h2 { margin: 0 0 4px; font-size: 18px; color: #f8fafc; }
.cma-msg-form { display: flex; flex-direction: column; gap: 10px; }
.cma-msg-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cma-cat-pill { display: inline-flex; align-items: center; gap: 6px; background: #0f172a; border: 1px solid rgba(148,163,184,0.25); padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; color: #cbd5e1; }
.cma-cat-pill input { accent-color: #6366f1; }
.cma-msg-form textarea, .cma-reply-form textarea {
  width: 100%; background: #0f172a; color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28); border-radius: 10px;
  padding: 11px 12px; font-family: inherit; font-size: 14px; resize: vertical;
}
.cma-msg-form textarea:focus, .cma-reply-form textarea:focus { outline: none; border-color: #6366f1; }
.cma-msg-bar { display: flex; justify-content: space-between; align-items: center; }
.cma-char-count { font-size: 12px; color: #94a3b8; }

.cma-msg-history-wrap { margin-top: 20px; border-top: 1px solid rgba(148,163,184,0.14); padding-top: 16px; }
.cma-msg-history-wrap h3 { margin: 0 0 12px; font-size: 15px; color: #e2e8f0; }
.cma-msg-list, .cma-admin-msg-list { display: flex; flex-direction: column; gap: 10px; }
.cma-msg-card { background: #0f172a; border: 1px solid rgba(148,163,184,0.16); border-radius: 12px; padding: 14px; }
.cma-msg-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.cma-msg-date { font-size: 11px; color: #94a3b8; }
.cma-msg-body { margin: 0; font-size: 14px; color: #f1f5f9; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.cma-msg-reply { margin-top: 10px; padding: 10px 12px; background: rgba(16, 185, 129, 0.12); border-left: 3px solid #10b981; border-radius: 8px; }
.cma-msg-reply strong { display: block; font-size: 12px; color: #6ee7b7; margin-bottom: 4px; }
.cma-msg-reply p { margin: 0; font-size: 13px; color: #e2e8f0; white-space: pre-wrap; }
.cma-msg-pending { margin-top: 8px; font-size: 12px; color: #94a3b8; }
.cma-pill-bug { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.cma-pill-general { background: rgba(14, 165, 233, 0.18); color: #7dd3fc; border-color: rgba(14, 165, 233, 0.35); }

/* Profile & Support Us */
.cma-prof-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cma-prof-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid #6366f1; }
.cma-form-stack { display: flex; flex-direction: column; gap: 12px; }
.cma-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #cbd5e1; }
.cma-field input {
  background: #0f172a; color: #f8fafc; border: 1px solid rgba(148,163,184,0.28);
  border-radius: 9px; padding: 10px 12px; font-size: 14px;
}
.cma-share-link-box { display: flex; gap: 8px; margin: 14px 0; }
.cma-share-link-box input { flex: 1; background: #0f172a; color: #a5b4fc; border: 1px solid rgba(148,163,184,0.25); border-radius: 9px; padding: 8px 10px; font-size: 13px; }
.cma-share-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Admin Message Inbox */
.cma-admin-msg-item { background: #0f172a; border: 1px solid rgba(148,163,184,0.16); border-radius: 12px; overflow: hidden; }
.cma-admin-msg-item.is-unread { border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.06); }
.cma-admin-msg-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; list-style: none; font-size: 13px;
}
.cma-admin-msg-summary::-webkit-details-marker { display: none; }
.cma-msg-dot { width: 9px; height: 9px; border-radius: 50%; background: #475569; flex-shrink: 0; }
.cma-admin-msg-item.is-unread .cma-msg-dot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.cma-msg-preview { color: #94a3b8; flex: 1; min-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cma-admin-msg-pane { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid rgba(148,163,184,0.12); padding-top: 12px; }
.cma-reply-form { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 768px) {
  .cma-footer-grid { grid-template-columns: 1fr; }
  .cma-brand-tag { display: none; }
}


/* ===== v1.3 SEO Homepage Styling ===== */
.cma-home { display: flex; flex-direction: column; }
.cma-hero {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.28), transparent 62%),
              linear-gradient(180deg, #0f172a 0%, #0b1020 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  padding: 54px 16px 46px;
}
.cma-hero-inner { max-width: 960px; margin: 0 auto; text-align: center; }
.cma-hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.cma-hero-badge {
  background: rgba(99, 102, 241, 0.16); color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.35); border-radius: 999px;
  font-size: 12px; font-weight: 600; padding: 5px 12px;
}
.cma-hero h1 {
  margin: 0 0 14px; font-size: clamp(28px, 4.6vw, 44px); line-height: 1.18;
  color: #f8fafc; letter-spacing: -0.02em;
}
.cma-hero h1 span {
  background: linear-gradient(90deg, #a5b4fc, #f472b6, #fbbf24);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cma-hero-sub {
  margin: 0 auto 24px; max-width: 740px; font-size: 16px; line-height: 1.65; color: #cbd5e1;
}
.cma-hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 28px; }
.cma-btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 11px; }
.cma-hero-highlights {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px;
  max-width: 820px; margin: 0 auto;
}
.cma-hl-item {
  background: rgba(15, 23, 42, 0.78); border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px; padding: 12px;
}
.cma-hl-item strong { display: block; font-size: 15px; color: #f8fafc; margin-bottom: 2px; }
.cma-hl-item span { font-size: 12px; color: #94a3b8; }

.cma-section { padding: 26px 0; }
.cma-sec-head { margin-bottom: 18px; }
.cma-sec-head h2 { margin: 0 0 6px; font-size: 24px; color: #f8fafc; }

.cma-spotlight-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(129, 140, 248, 0.3); border-radius: 16px; padding: 24px;
}
.cma-spotlight-card h2 { margin: 10px 0 0; font-size: 22px; color: #f8fafc; }
.cma-mjo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px;
}
.cma-mjo-pt {
  background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px; padding: 14px;
}
.cma-mjo-pt strong { display: block; font-size: 14px; color: #a5b4fc; margin-bottom: 5px; }
.cma-mjo-pt span { font-size: 13px; color: #cbd5e1; line-height: 1.5; }

.cma-feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.cma-feat-card, .cma-who-card {
  background: #111827; border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px; padding: 18px;
}
.cma-feat-card h3, .cma-who-card h3 { margin: 0 0 6px; font-size: 16px; color: #f8fafc; }
.cma-feat-card p, .cma-who-card p { margin: 0; font-size: 13.5px; color: #94a3b8; line-height: 1.55; }
.cma-who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

.cma-community-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(79, 70, 229, 0.16));
  border: 1px solid rgba(52, 211, 153, 0.3); border-radius: 16px; padding: 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.cma-community-banner h2 { margin: 8px 0 6px; font-size: 21px; color: #f8fafc; }
.cma-community-banner p { max-width: 640px; line-height: 1.55; }
.cma-community-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.cma-faq-list { display: flex; flex-direction: column; gap: 10px; }
.cma-faq-item {
  background: #111827; border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px; padding: 14px 16px;
}
.cma-faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 15px; color: #f8fafc; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.cma-faq-item summary::-webkit-details-marker { display: none; }
.cma-faq-item summary::after { content: '+'; color: #818cf8; font-size: 18px; font-weight: 700; }
.cma-faq-item[open] summary::after { content: '−'; }
.cma-faq-item p { margin: 10px 0 0; font-size: 14px; color: #cbd5e1; line-height: 1.6; }


/* ===== v1.4 Tabbed Admin Panel & Analytics Chart ===== */
.cma-admin-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  background: #111827; border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px; padding: 8px; margin-bottom: 20px;
}
.cma-admin-tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; color: #cbd5e1; border: 1px solid transparent;
  border-radius: 10px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cma-admin-tab:hover { background: rgba(99, 102, 241, 0.14); color: #fff; }
.cma-admin-tab.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff;
  border-color: rgba(165, 180, 252, 0.45);
}
.cma-tab-count {
  background: rgba(15, 23, 42, 0.45); color: #e2e8f0;
  border-radius: 999px; font-size: 11px; padding: 1px 7px;
}
.cma-stat-sub { display: block; margin-top: 4px; font-size: 11.5px; color: #94a3b8; }
.cma-search-inp {
  background: #0f172a; color: #f8fafc; border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px; padding: 7px 12px; font-size: 13px; min-width: 220px;
}
.cma-bar-chart {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  height: 150px; padding-top: 18px;
}
.cma-bar-col {
  flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px;
}
.cma-bar-val { font-size: 11px; color: #c7d2fe; font-weight: 600; }
.cma-bar-fill {
  width: 100%; max-width: 36px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #818cf8, #4f46e5);
  min-height: 8px;
}
.cma-bar-lbl { font-size: 11px; color: #94a3b8; }


/* ===== v1.5 Custom Header Logo & Settings Preview ===== */
.cma-custom-logo { height: 34px; width: auto; max-width: 140px; object-fit: contain; border-radius: 8px; display: block; }
.cma-logo-preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.cma-logo-preview-box {
  width: 72px; height: 72px; border-radius: 14px;
  background: #0f172a; border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 11px; color: #94a3b8; text-align: center; padding: 6px; flex-shrink: 0;
}
.cma-logo-preview-box img { width: 100%; height: 100%; object-fit: contain; }
.cma-field textarea {
  background: #0f172a; color: #f8fafc; border: 1px solid rgba(148,163,184,0.28);
  border-radius: 9px; padding: 10px 12px; font-family: inherit; font-size: 13.5px; resize: vertical;
}


/* ===== v1.6 Mobile-First Polish & Zero Horizontal Wobble ===== */
html, body { max-width: 100%; overflow-x: clip; }
main, section, .cma-home, .cma-container { max-width: 100%; }
.cma-card, .cma-feat-card, .cma-who-card, .cma-mjo-pt, .cma-hl-item, .cma-stat-card, .cma-proj-card { min-width: 0; }
.cma-feat-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cma-who-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.cma-admin-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cma-proj-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.cma-mjo-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* Mobile Hamburger Button & Slide Drawer */
.cma-mob-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(30, 41, 59, 0.9); color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25); cursor: pointer; flex-shrink: 0;
}
.cma-mob-drawer {
  background: #0f172a; border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 4px;
}
.cma-mob-drawer[hidden] { display: none !important; }
.cma-mob-link {
  display: block; padding: 11px 12px; border-radius: 10px;
  color: #e2e8f0; font-size: 14.5px; font-weight: 600; text-decoration: none !important;
}
.cma-mob-link:hover, .cma-mob-link.is-active { background: rgba(99, 102, 241, 0.2); color: #fff; }

/* Polished Hero & Icon Cards */
.cma-hero-pill {
  display: inline-block; background: rgba(99, 102, 241, 0.18); color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.38); border-radius: 999px;
  font-size: 12px; font-weight: 600; padding: 6px 14px; margin-bottom: 16px;
}
.cma-btn-glow { box-shadow: 0 10px 28px rgba(79, 70, 229, 0.42); }
.cma-btn-outline { background: rgba(15, 23, 42, 0.7); border-color: rgba(148, 163, 184, 0.32); }
.cma-hl-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; }
.cma-hl-ico {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(99, 102, 241, 0.18); color: #a5b4fc;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 2px;
}
.cma-lead { margin-top: 8px; max-width: 760px; line-height: 1.6; }
.cma-mjo-pt { display: flex; align-items: flex-start; gap: 12px; }
.cma-card-ico {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.cma-mjo-pt .cma-card-ico { margin-bottom: 0; }
.cma-ico-indigo { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; }
.cma-ico-emerald { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.cma-ico-amber { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.cma-ico-pink { background: rgba(236, 72, 153, 0.18); color: #f9a8d4; }

@media (max-width: 820px) {
  .cma-nav { display: none; }
  .cma-mob-menu-btn { display: inline-flex; }
  .cma-auth-slot { gap: 8px; }
  .cma-header-inner { padding: 8px 12px; gap: 8px; }
  .cma-user-name, .cma-role-badge { display: none; }
  .cma-user-btn { padding: 3px; }
}

@media (max-width: 640px) {
  .cma-hero { padding: 30px 14px 28px; }
  .cma-hero h1 { font-size: 27px; line-height: 1.2; }
  .cma-hero-sub { font-size: 14.5px; line-height: 1.55; margin-bottom: 20px; }
  .cma-hero-cta { flex-direction: column; gap: 10px; margin-bottom: 22px; }
  .cma-hero-cta .cma-btn { width: 100%; }
  .cma-hero-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cma-section { padding: 16px 0; }
  .cma-container { margin: 14px auto 24px; padding: 0 14px; }
  .cma-sec-head h2, .cma-spotlight-card h2, .cma-community-banner h2 { font-size: 20px; }
  .cma-spotlight-card, .cma-community-banner { padding: 18px 14px; }
  .cma-community-actions { width: 100%; flex-direction: column; }
  .cma-community-actions .cma-btn { width: 100%; }
  .cma-feat-grid, .cma-who-grid, .cma-mjo-grid { grid-template-columns: 1fr; gap: 10px; }
  .cma-search-inp { min-width: 0; width: 100%; }
  .cma-share-link-box { flex-direction: column; }
}


/* ===== v1.7 Clean Mobile 2-Column Footer Polish ===== */
@media (max-width: 768px) {
  .cma-footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 18px 14px !important;
    padding: 22px 16px 16px !important;
  }
  .cma-footer-col:first-child {
    grid-column: 1 / -1;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }
  .cma-footer-desc { font-size: 12.5px; margin-bottom: 12px; }
  .cma-footer-col h4 { font-size: 11.5px; margin-bottom: 8px; }
  .cma-footer-list { gap: 6px; font-size: 12.5px; }
  .cma-footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 12px 16px 16px;
  }
}

.cma-custom-logo-sm { height: 28px; width: auto; max-width: 110px; border-radius: 7px; }


/* ===== v1.9 Live Active Build Banner & Badge ===== */
.cma-live-banner {
  display: flex; align-items: center; gap: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
  font-size: 13.5px; color: #ecfdf5;
}
.cma-live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #10b981;
  box-shadow: 0 0 10px #10b981; flex-shrink: 0;
}
.cma-live-meta { color: #a7f3d0; font-size: 13px; }
.cma-live-meta code { background: rgba(6, 78, 59, 0.6); padding: 2px 6px; border-radius: 5px; color: #fff; }
.cma-pill-live { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.5); margin-left: 4px; }
