﻿:root{
  --bg:#0b0d12;
  --panel:#121624;
  --panel2:#0f1320;
  --text:#e8ecf4;
  --muted:#a8b0c2;
  --border:#2a3247;
  --accent:#7c5cff;
  --accent2:#22c55e;
  --danger:#ef4444;
  --shadow: 0 12px 40px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1200px 800px at 20% 10%, rgba(124,92,255,.25), transparent 50%),
              radial-gradient(1000px 700px at 85% 30%, rgba(34,197,94,.12), transparent 55%),
              var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a{color:inherit}

.gm-wrap{
  max-width:1180px;
  margin:0 auto;
  padding:28px 18px 80px;
}

.gm-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:18px;
}

.gm-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.gm-title h1{
  margin:0;
  font-size:20px;
  letter-spacing:.2px;
}
.gm-title p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
  max-width:720px;
}

.gm-badge{
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  font-size:12px;
  color:var(--muted);
}
.gm-badge.ok{border-color: rgba(34,197,94,.5); color:#bff0cc}
.gm-badge.bad{border-color: rgba(239,68,68,.5); color:#ffd0d0}

.gm-grid{
  display:grid;
  grid-template-columns: 420px 1fr;
  gap:16px;
}

@media (max-width: 980px){
  .gm-grid{grid-template-columns:1fr}
}

.gm-card{
  background: rgba(18,22,36,.75);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow:hidden;
}

.gm-card-h{
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  background: rgba(255,255,255,.02);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.gm-card-h h2{
  margin:0;
  font-size:14px;
  letter-spacing:.2px;
}
.gm-card-h .sub{
  margin:0;
  color:var(--muted);
  font-size:12px;
}

.gm-card-b{
  padding:16px;
}

.gm-drop{
  border: 1.5px dashed rgba(124,92,255,.65);
  background: rgba(124,92,255,.06);
  border-radius: 14px;
  padding:16px;
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color: var(--muted);
  outline:none;
}
.gm-drop strong{color: var(--text)}
.gm-drop.is-dragover{background: rgba(124,92,255,.12); border-color: rgba(124,92,255,.95)}
.gm-drop:focus{box-shadow: 0 0 0 3px rgba(124,92,255,.25)}

.gm-row{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.gm-row + .gm-row{margin-top:10px}

.gm-input, .gm-textarea{
  width:100%;
  background: rgba(0,0,0,.18);
  border:1px solid var(--border);
  border-radius: 12px;
  padding:10px 11px;
  color: var(--text);
  outline:none;
}
.gm-input:focus, .gm-textarea:focus{box-shadow: 0 0 0 3px rgba(124,92,255,.2)}
.gm-textarea{min-height:160px; resize:vertical; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; color:#dbe3ff}

.gm-help{font-size:12px; color: var(--muted); line-height:1.35}
.gm-help code{color:#dbe3ff}

.gm-btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding:10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:600;
  font-size:13px;
}
.gm-btn:hover{background: rgba(255,255,255,.06)}
.gm-btn:disabled{opacity:.55; cursor:not-allowed}
.gm-btn-primary{border-color: rgba(124,92,255,.6); background: rgba(124,92,255,.18)}
.gm-btn-primary:hover{background: rgba(124,92,255,.24)}
.gm-btn-success{border-color: rgba(34,197,94,.55); background: rgba(34,197,94,.14)}
.gm-btn-danger{border-color: rgba(239,68,68,.55); background: rgba(239,68,68,.12)}

.gm-samples{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.gm-sample-row{
  display:grid;
  grid-template-columns: 1fr auto auto;
  gap:10px;
  align-items:center;
  padding:10px 10px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.12);
  border-radius: 12px;
}
.gm-sample-name{font-size:12.5px; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.gm-sample-meta{font-size:12px; color: var(--muted)}

.gm-status{
  margin-top:10px;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.14);
  color: var(--text);
  font-size:12.5px;
}
.gm-status .muted{color:var(--muted)}

.gm-pages-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.gm-pages{
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:center;
}

.gm-page{
  width: 8.5in;
  min-height: 11in;
  background: #ffffff;
  color:#0a0a0a;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  position:relative;
  overflow:hidden;
}

.gm-page-content{
  width:100%;
  min-height:11in;
}

.gm-line{
  white-space:pre-wrap;
}

.gm-page-footer{
  position:absolute;
  right:10px;
  bottom:8px;
  font-size:11px;
  color: rgba(0,0,0,.55);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
}

.gm-overflow{
  border:1px solid rgba(239,68,68,.45);
  background: rgba(239,68,68,.08);
  color:#ffd0d0;
  padding:10px 12px;
  border-radius: 12px;
  font-size:12px;
}

/* Print */
@media print{
  body{background:#fff}
  .gm-topbar, .gm-card:first-child, .gm-card .gm-card-h, .gm-overflow, .gm-actions { display:none !important; }
  .gm-wrap{max-width:none; padding:0}
  .gm-grid{grid-template-columns:1fr}
  .gm-card{border:none; box-shadow:none; background:none}
  .gm-page{box-shadow:none; border-radius:0; page-break-after: always;}
}

/* A11y helper */
.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* Backend panel */
.status { margin-top: .75rem; font-size: .95rem; }
.status--ok { opacity: 1; }
.status--warn { opacity: 1; }
.status--muted { opacity: .8; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.label { font-weight: 600; }
.hint, .muted { opacity: .8; }
