:root {
  --ifm-color-primary: #2e8555;
  --ifm-navbar-height: 60px;
  --ifm-sidebar-width: 300px;
  --ifm-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ifm-bg: #ffffff;
  --ifm-bg-alt: #f6f7f8;
  --ifm-border: #e3e3e3;
  --ifm-text: #1c1e21;
  --ifm-text-muted: #525860;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ifm-font-family);
  color: var(--ifm-text);
  background: var(--ifm-bg);
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--ifm-color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
  height: var(--ifm-navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--ifm-border);
  position: sticky;
  top: 0;
  background: var(--ifm-bg);
  z-index: 10;
}
.navbar-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; }
.navbar-brand img { height: 28px; }
.navbar-links { display: flex; gap: 1.25rem; align-items: center; }
.navbar-links a { color: var(--ifm-text); font-weight: 500; }
.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  background: var(--ifm-color-primary);
  color: #fff !important;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:hover { opacity: 0.9; }
.btn-outline {
  background: transparent;
  color: var(--ifm-color-primary) !important;
  border: 1px solid var(--ifm-color-primary);
}
.btn-danger { background: #d1373f; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

.layout { display: flex; min-height: calc(100vh - var(--ifm-navbar-height)); }

.sidebar {
  width: var(--ifm-sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--ifm-border);
  padding: 1.5rem 1rem;
  overflow-y: auto;
}
.sidebar h4 {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ifm-text-muted);
  margin: 1.25rem 0 0.4rem 0.6rem;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  color: var(--ifm-text);
  font-size: 0.92rem;
}
.sidebar li a:hover { background: var(--ifm-bg-alt); text-decoration: none; }
.sidebar li a.active {
  background: rgba(46,133,85,0.1);
  color: var(--ifm-color-primary);
  font-weight: 600;
}

.content {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 860px;
}
.content h1 { font-size: 2.2rem; margin-top: 0; }
.content img { max-width: 100%; }
.content table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.content table td, .content table th { border: 1px solid var(--ifm-border); padding: 0.5rem 0.75rem; }
.content pre { background: var(--ifm-bg-alt); padding: 1rem; border-radius: 8px; overflow-x: auto; }
.content code { background: var(--ifm-bg-alt); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }
.content pre code { background: none; padding: 0; }
.content blockquote { border-left: 3px solid var(--ifm-color-primary); margin-left: 0; padding-left: 1rem; color: var(--ifm-text-muted); }

.hero {
  text-align: center;
  padding: 5rem 1.5rem;
  background: linear-gradient(180deg, rgba(46,133,85,0.06), transparent);
}
.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.hero p { font-size: 1.25rem; color: var(--ifm-text-muted); max-width: 600px; margin: 0 auto 2rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 1.25rem; margin: 3rem 0; }
.plan-card { border: 1px solid var(--ifm-border); border-radius: 12px; padding: 1.75rem; text-align: center; }
.plan-card.featured { border-color: var(--ifm-color-primary); box-shadow: 0 4px 20px rgba(46,133,85,0.15); }
.plan-card h3 { margin: 0 0 0.25rem; }
.plan-price { font-size: 2rem; font-weight: 700; margin: 0.75rem 0; }
.plan-price span { font-size: 0.9rem; font-weight: 400; color: var(--ifm-text-muted); }
.plan-card ul { list-style: none; padding: 0; margin: 1.25rem 0; text-align: left; }
.plan-card li { padding: 0.35rem 0; color: var(--ifm-text-muted); }
.plan-card li:before { content: "✓ "; color: var(--ifm-color-primary); font-weight: 700; }

.form-page { max-width: 420px; margin: 4rem auto; padding: 0 1.5rem; }
.form-page h1 { font-size: 1.6rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--ifm-border);
  border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.92rem; }
.alert-error { background: #fdecea; color: #a4262c; }
.alert-success { background: #e6f4ea; color: #1e7e34; }

.admin-shell { display: flex; min-height: calc(100vh - var(--ifm-navbar-height)); }
.admin-nav { width: 220px; border-right: 1px solid var(--ifm-border); padding: 1.5rem 1rem; flex-shrink: 0; }
.admin-nav a { display: block; padding: 0.5rem 0.6rem; border-radius: 6px; color: var(--ifm-text); margin-bottom: 0.15rem; }
.admin-nav a:hover, .admin-nav a.active { background: var(--ifm-bg-alt); text-decoration: none; }
.admin-main { flex: 1; padding: 2rem 2.5rem; max-width: 1000px; }

.card { border: 1px solid var(--ifm-border); border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box { border: 1px solid var(--ifm-border); border-radius: 10px; padding: 1.1rem 1.3rem; }
.stat-box .num { font-size: 1.6rem; font-weight: 700; }
.stat-box .label { color: var(--ifm-text-muted); font-size: 0.85rem; }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--ifm-border); font-size: 0.92rem; }
table.data-table th { color: var(--ifm-text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: #e6f4ea; color: #1e7e34; }
.badge-red { background: #fdecea; color: #a4262c; }
.badge-gray { background: #eee; color: #555; }

.progress { height: 8px; background: var(--ifm-bg-alt); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: var(--ifm-color-primary); }

.editor-toolbar { display: flex; gap: 0.4rem; padding: 0.5rem; border: 1px solid var(--ifm-border); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--ifm-bg-alt); flex-wrap: wrap; }
.editor-toolbar button { border: 1px solid var(--ifm-border); background: #fff; border-radius: 6px; padding: 0.3rem 0.55rem; cursor: pointer; font-size: 0.85rem; }
.editor-body { border: 1px solid var(--ifm-border); border-radius: 0 0 8px 8px; min-height: 400px; padding: 1rem; }
.editor-body:focus { outline: none; }
