/* FMS admin styling — shares tokens with fms.css */
.adm { background: #f4f1ea; }
.adm-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
@media (max-width: 900px) { .adm-shell { grid-template-columns: 1fr; } }

.adm-side { background: var(--accent); color: #e9e2d2; padding: 1.75rem 1.25rem; display: flex; flex-direction: column; }
.adm-logo { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-light); margin-bottom: 1.5rem; }
.adm-logo span { letter-spacing: .1em; }
.adm-nav a, .adm-form-nav a { display: block; padding: .55rem .75rem; color: rgba(255,255,255,.72); text-decoration: none; border-radius: 4px; font-size: .85rem; }
.adm-nav a:hover, .adm-form-nav a:hover { background: rgba(255,255,255,.07); }
.adm-nav a.on, .adm-form-nav a.on { background: rgba(255,255,255,.12); color: var(--gold-light); }
.adm-form-nav { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); }
.adm-form-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-light); margin-bottom: .5rem; padding: 0 .75rem; }
.adm-user { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: rgba(255,255,255,.75); }
.adm-user .role { font-size: .62rem; text-transform: uppercase; letter-spacing: .16em; color: rgba(212,175,130,.7); margin-top: .2rem; }
.adm-user a { display: inline-block; margin-top: .6rem; color: var(--gold-light); }

.adm-main { padding: 2rem; }
@media (min-width: 900px) { .adm-main { padding: 2.5rem 3rem; } }

.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.adm-eyebrow { font-size: .62rem; text-transform: uppercase; letter-spacing: .28em; color: var(--gold); }
.adm-title { font-family: var(--font-display); font-size: 2.4rem; color: var(--accent); margin: .1rem 0 0; }

.adm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.adm-card { background: #fff; padding: 1.25rem; border-radius: 6px; border: 1px solid #ece5d8; }
.adm-card .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.adm-card .v { font-size: 2rem; color: var(--accent); margin-top: .4rem; font-weight: 400; }

.adm-panel { background: #fff; border: 1px solid #ece5d8; border-radius: 6px; padding: 1.5rem; margin-bottom: 1.5rem; }
.adm-panel h2 { font-family: var(--font-display); color: var(--accent); font-size: 1.4rem; margin: 0 0 1rem; }

table.adm-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .88rem; }
.adm-table th { text-align: left; background: #faf6ee; padding: .7rem .85rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.adm-table td { padding: .7rem .85rem; border-top: 1px solid #f0e7d9; }
.adm-table tr:hover td { background: #fcfaf5; }

.adm-btn { display: inline-block; padding: .6rem 1.1rem; background: var(--accent); color: var(--gold-pale); border: none; border-radius: 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; text-decoration: none; cursor: pointer; }
.adm-btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.adm-btn.danger { background: var(--danger); color: #fff; }
.adm-btn.sm { padding: .4rem .8rem; font-size: .64rem; }

.adm-badge { display: inline-block; padding: .18rem .55rem; border-radius: 20px; font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.badge-draft { background:#eee; color:#666; } .badge-published { background:#e3f5ea; color:#1e7e46; }
.badge-paused { background:#fdf1dc; color:#a5730f; } .badge-closed { background:#fdecea; color:#c0392b; }
.badge-new { background:#e7f0fb; color:#2360a5; } .badge-in_review { background:#fdf1dc; color:#a5730f; }
.badge-approved,.badge-completed { background:#e3f5ea; color:#1e7e46; } .badge-rejected,.badge-spam { background:#fdecea; color:#c0392b; }

.adm-form label { display:block; font-size:.68rem; text-transform:uppercase; letter-spacing:.12em; color:var(--muted); margin:1rem 0 .35rem; }
.adm-form input[type=text], .adm-form input[type=email], .adm-form input[type=url], .adm-form input[type=color], .adm-form select, .adm-form textarea {
    width:100%; padding:.65rem .8rem; border:1px solid var(--line); border-radius:4px; font-family:var(--font-body); font-size:.9rem; background:#fdfcf9;
}
.adm-form textarea { min-height: 90px; resize: vertical; }
.adm-row { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
@media (max-width:640px){ .adm-row { grid-template-columns:1fr; } }

.adm-auth { max-width: 400px; margin: 6vh auto; background:#fff; padding:2.5rem; border-radius:8px; border:1px solid #ece5d8; }
.adm-auth h1 { font-family:var(--font-display); color:var(--accent); font-size:2rem; margin:0 0 1.5rem; }
.adm-flash { padding:.75rem 1rem; border-radius:4px; font-size:.85rem; margin-bottom:1rem; }
.adm-flash.err { background:#fdecea; color:var(--danger); } .adm-flash.ok { background:#eafaf1; color:#1e7e46; }
.adm-field-row { display:flex; justify-content:space-between; align-items:center; padding:.7rem .85rem; border:1px solid #f0e7d9; border-radius:4px; margin-bottom:.5rem; background:#fff; }
.adm-field-row .meta { font-size:.7rem; color:var(--muted); }

/* ---------- Form builder ---------- */
.bld-section { border:1px solid #ece5d8; border-radius:6px; margin:1rem 0; background:#fcfaf5; }
.bld-section-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:.75rem 1rem; border-bottom:1px solid #ece5d8; }
.bld-section-title { flex:1; }
.bld-section-title input { width:100%; font-family:var(--font-display); font-size:1.1rem; color:var(--accent); border:1px solid transparent; background:transparent; padding:.3rem .4rem; border-radius:4px; }
.bld-section-title input:hover, .bld-section-title input:focus { border-color:var(--line); background:#fff; }
.bld-fields { padding:.75rem 1rem; min-height:48px; }
.bld-empty { text-align:center; padding:1rem; border:1px dashed var(--line); border-radius:4px; margin:0; }
.bld-field { border:1px solid #f0e7d9; border-radius:4px; margin-bottom:.5rem; background:#fff; }
.bld-field.bld-drag { opacity:.4; }
.bld-field-row { display:flex; align-items:center; gap:.6rem; padding:.6rem .75rem; }
.bld-grip { cursor:grab; color:var(--muted); letter-spacing:-2px; user-select:none; }
.bld-field-main { flex:1; }
.bld-field-main .meta { font-size:.68rem; color:var(--muted); }
.bld-edit { padding:0 .75rem 1rem 2rem; border-top:1px dashed #f0e7d9; margin-top:.25rem; }
.bld-cond { border:1px solid var(--line); border-radius:4px; padding:.5rem .75rem 1rem; margin-top:1rem; }
.bld-cond legend { font-size:.7rem; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); padding:0 .4rem; }
