/* =========================================================================
   Olimpia Roadmap — mesma paleta e tipografia da wiki (wiki/assets/wiki.css)
   ========================================================================= */
:root {
	--bg: #0c0806;
	--surface: #16100b;
	--surface-2: #1e1610;
	--surface-3: #281d14;
	--gold: #d4af37;
	--gold-dark: #b8860b;
	--gold-soft: rgba(212, 175, 55, .18);
	--accent: #e8663c;
	--wine: #8b0000;
	--text: #f0ece8;
	--strong: #fff;
	--muted: #9a8d82;
	--dim: #6b6058;
	--border: rgba(212, 175, 55, .16);
	--border-2: rgba(212, 175, 55, .34);
	--radius: 14px;
	--sidebar-w: 276px;
	--st-lancado: #4cc38a;
	--st-andamento: #d4af37;
	--st-planejado: #6ea8ff;
	--st-ideia: #9a8d82;
	--font-title: 'Cinzel', 'Times New Roman', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
html[data-lang="pt"] .lang-en, html[data-lang="en"] .lang-pt { display: none !important; }

body {
	margin: 0;
	background:
		radial-gradient(1200px 600px at 70% -10%, rgba(139, 0, 0, .22), transparent 60%),
		radial-gradient(900px 500px at 100% 40%, rgba(212, 175, 55, .06), transparent 60%),
		var(--bg);
	background-attachment: fixed;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; }

/* ---------------------------------------------------------------- sidebar */
.rm-sidebar {
	position: fixed; top: 0; left: 0; bottom: 0;
	width: var(--sidebar-w);
	background: linear-gradient(180deg, #120c08 0%, #0a0705 100%);
	border-right: 1px solid var(--border-2);
	display: flex; flex-direction: column;
	padding: 22px 18px;
	overflow-y: auto;
	z-index: 60;
}
.rm-brand { display: block; text-align: center; margin-bottom: 6px; }
.rm-brand img { max-width: 170px; height: auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
.rm-side-title {
	font-family: var(--font-title); font-weight: 700; letter-spacing: .28em;
	text-align: center; color: var(--gold); font-size: 13px;
	padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
}
.rm-side-nav { display: flex; flex-direction: column; gap: 4px; }
.rm-side-nav a {
	display: block; padding: 9px 12px; border-radius: 10px;
	color: var(--text); border: 1px solid transparent; transition: .15s;
}
.rm-side-nav a:hover { background: var(--surface-2); border-color: var(--border); color: var(--strong); }
.rm-side-nav a.is-draft { opacity: .55; border-style: dashed; border-color: var(--border); }
.rm-side-period { display: block; font-size: 10.5px; letter-spacing: .14em; color: var(--gold); font-weight: 600; }
.rm-side-name { display: block; font-size: 14px; font-weight: 500; }

.rm-legend { margin-top: 22px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.rm-legend-title { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.rm-legend-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 2px 0; }

.rm-side-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.rm-langs { display: flex; gap: 8px; }
.rm-langs button {
	background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
	padding: 6px 9px; cursor: pointer; line-height: 0; opacity: .6; transition: .15s;
}
.rm-langs button.active, .rm-langs button:hover { opacity: 1; border-color: var(--gold); }
.flag { display: inline-block; width: 22px; height: 15px; border-radius: 2px; background-size: cover; }
.flag-br { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'><rect width='28' height='20' fill='%23009b3a'/><path d='M14 2.4 25.6 10 14 17.6 2.4 10z' fill='%23fedf00'/><circle cx='14' cy='10' r='4.2' fill='%23002776'/></svg>"); }
.flag-us { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'><rect width='28' height='20' fill='%23b22234'/><g fill='%23fff'><rect y='2.3' width='28' height='2.3'/><rect y='6.9' width='28' height='2.3'/><rect y='11.5' width='28' height='2.3'/><rect y='16.1' width='28' height='2.3'/></g><rect width='12' height='10.8' fill='%233c3b6e'/></svg>"); }
.rm-side-links { display: flex; gap: 14px; font-size: 13px; }
.rm-admin-link { font-size: 11px; color: var(--dim); letter-spacing: .1em; }
.rm-logout button {
	background: none; border: 1px solid var(--border-2); color: var(--muted);
	border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 12.5px;
}
.rm-logout button:hover { color: var(--strong); border-color: var(--gold); }

.rm-menu-btn {
	display: none; position: fixed; top: 12px; left: 12px; z-index: 70;
	width: 42px; height: 42px; border-radius: 10px;
	background: var(--surface-2); color: var(--gold); border: 1px solid var(--border-2);
	font-size: 20px; cursor: pointer;
}

/* ---------------------------------------------------------------- main */
.rm-main { margin-left: var(--sidebar-w); padding: 48px 56px 64px; max-width: calc(var(--sidebar-w) + 1180px); }

.rm-hero {
	background: linear-gradient(135deg, rgba(139,0,0,.28), rgba(22,16,11,.9) 55%);
	border: 1px solid var(--border-2); border-radius: 18px;
	padding: 38px 40px; margin-bottom: 34px;
	box-shadow: 0 10px 40px rgba(0,0,0,.55);
}
.rm-eyebrow { font-size: 12px; letter-spacing: .32em; color: var(--gold); font-weight: 600; }
.rm-hero h1 { font-family: var(--font-title); font-size: 38px; line-height: 1.2; margin: 8px 0 12px; color: var(--strong); }
.rm-hero h1 em { font-style: normal; color: var(--gold); }
.rm-lead { color: var(--muted); max-width: 760px; margin: 0 0 22px; font-size: 15.5px; }
.rm-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.rm-stat {
	min-width: 150px; padding: 12px 16px; border-radius: 12px;
	background: rgba(0,0,0,.28); border: 1px solid var(--border);
	border-left: 3px solid var(--c, var(--gold));
}
.rm-stat strong { display: block; font-family: var(--font-title); font-size: 26px; color: var(--strong); line-height: 1.1; }
.rm-stat span { font-size: 12.5px; color: var(--muted); }
.rm-updated { margin-top: 16px; font-size: 12.5px; color: var(--dim); }

/* status → cor */
.st-lancado { --c: var(--st-lancado); }
.st-andamento { --c: var(--st-andamento); }
.st-planejado { --c: var(--st-planejado); }
.st-ideia { --c: var(--st-ideia); }
.rm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; display: inline-block; }
.rm-dot.st-andamento { animation: rmPulse 1.8s ease-in-out infinite; }
@keyframes rmPulse { 50% { box-shadow: 0 0 2px var(--c); opacity: .6; } }

/* ---------------------------------------------------------------- timeline */
.rm-timeline { position: relative; padding-left: 34px; }
.rm-timeline::before {
	content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
	background: linear-gradient(180deg, var(--gold), rgba(212,175,55,.08));
}
.rm-phase { position: relative; margin-bottom: 40px; }
.rm-phase-marker {
	position: absolute; left: -34px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--bg); border: 2px solid var(--gold); display: grid; place-items: center;
}
.rm-phase-marker span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.rm-period {
	display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .18em;
	color: var(--gold); background: var(--gold-soft); border: 1px solid var(--border-2);
	padding: 3px 10px; border-radius: 999px;
}
.rm-phase h2 { font-family: var(--font-title); font-size: 26px; margin: 8px 0 4px; color: var(--strong); }
.rm-phase-desc { color: var(--muted); margin: 0 0 6px; max-width: 760px; }
.rm-phase.is-draft > .rm-phase-head { opacity: .7; }

.rm-cards {
	display: grid; gap: 16px; margin-top: 16px;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.rm-card {
	position: relative; padding: 18px 20px; border-radius: var(--radius);
	background: linear-gradient(180deg, var(--surface-2), var(--surface));
	border: 1px solid var(--border); border-top: 3px solid var(--c, var(--gold));
	transition: transform .15s, border-color .15s;
}
.rm-card:hover { transform: translateY(-2px); border-color: var(--border-2); border-top-color: var(--c); }
.rm-card.is-draft { border-style: dashed; opacity: .78; }
.rm-card h3 { margin: 10px 0 6px; font-size: 17px; color: var(--strong); line-height: 1.35; }
.rm-card p { margin: 0; color: #cfc6bd; font-size: 14.2px; }
.rm-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rm-chip {
	display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
	color: var(--c); background: rgba(0,0,0,.3); border: 1px solid var(--border);
	padding: 3px 10px; border-radius: 999px;
}
.rm-tag { font-size: 11.5px; color: var(--muted); border: 1px solid var(--border); padding: 2px 9px; border-radius: 999px; }
.rm-draft-badge {
	font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .06em; vertical-align: middle;
	color: #ffb89c; border: 1px dashed #ffb89c; padding: 1px 8px; border-radius: 999px;
}
.rm-progress { position: relative; margin-top: 14px; height: 18px; border-radius: 999px; background: rgba(0,0,0,.4); border: 1px solid var(--border); overflow: hidden; }
.rm-progress div { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--c)); }
.rm-progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--strong); text-shadow: 0 1px 2px #000; }
.rm-empty { color: var(--dim); font-style: italic; padding: 8px 2px; }

.rm-footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- admin */
.rm-adminbar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between;
	margin: -14px 0 30px; padding: 12px 16px; border-radius: 12px;
	background: rgba(212,175,55,.08); border: 1px dashed var(--border-2); font-size: 13.5px;
}
.rm-muted { color: var(--muted); }
.rm-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rm-tools button {
	background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
	border-radius: 7px; padding: 3px 10px; font-size: 12.5px; cursor: pointer;
}
.rm-tools button:hover { border-color: var(--gold); color: var(--strong); }
.rm-tools button.danger:hover { border-color: #e05555; color: #ff8a8a; }

.rm-btn {
	display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
	border-radius: 9px; padding: 8px 16px; font-weight: 600; font-size: 14px; border: 1px solid var(--border-2);
}
.rm-btn.gold { background: linear-gradient(180deg, #e2c050, var(--gold-dark)); color: #1a1006; border-color: #e2c050; }
.rm-btn.gold:hover { filter: brightness(1.08); color: #1a1006; }
.rm-btn.ghost { background: transparent; color: var(--text); }

.rm-alert { background: rgba(139,0,0,.25); border: 1px solid rgba(224,85,85,.5); color: #ffc9c9; padding: 10px 14px; border-radius: 10px; margin: 12px 0; }

.rm-login {
	max-width: 440px; margin: 60px auto; padding: 32px; border-radius: 18px;
	background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 10px 40px rgba(0,0,0,.55);
}
.rm-login h1 { font-family: var(--font-title); margin: 0 0 6px; color: var(--strong); font-size: 26px; }

.rm-login label, .rm-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.rm-login input, .rm-form-grid input, .rm-form-grid select, .rm-form-grid textarea {
	background: #0f0a07; color: var(--text); border: 1px solid var(--border-2); border-radius: 9px;
	padding: 9px 11px; font: inherit; font-size: 14px; width: 100%;
}
.rm-login input:focus, .rm-form-grid input:focus, .rm-form-grid select:focus, .rm-form-grid textarea:focus { outline: none; border-color: var(--gold); }
.rm-form-grid textarea { resize: vertical; }
.rm-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.rm-modal {
	width: min(760px, 94vw); max-height: 92vh; overflow-y: auto; padding: 26px 28px;
	background: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.rm-modal::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(2px); }
.rm-modal h3 { font-family: var(--font-title); margin: 0 0 4px; color: var(--strong); }
.rm-form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.rm-form-grid .full { grid-column: 1 / -1; }
.rm-form-grid label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); margin-top: 16px; }
.rm-form-grid label.check input { width: auto; }
.rm-modal-err { color: #ff8a8a; font-size: 13.5px; min-height: 18px; margin-top: 10px; }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 960px) {
	.rm-sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.8); }
	body.menu-open .rm-sidebar { transform: none; }
	.rm-menu-btn { display: block; }
	.rm-main { margin-left: 0; padding: 70px 18px 48px; }
	.rm-hero { padding: 26px 22px; }
	.rm-hero h1 { font-size: 28px; }
	.rm-phase h2 { font-size: 22px; }
	.rm-timeline { padding-left: 26px; }
	.rm-timeline::before { left: 6px; }
	.rm-phase-marker { left: -27px; width: 16px; height: 16px; }
	.rm-stat { min-width: calc(50% - 6px); }
	.rm-form-grid { grid-template-columns: 1fr; }
}
