/* Atelier-wide page polish */
body.app-page {
  background:
    radial-gradient(circle at 92% 8%, rgba(63,104,213,.07), transparent 24rem),
    radial-gradient(circle at 4% 88%, rgba(23,77,61,.07), transparent 28rem),
    var(--surface-soft);
}
.app-topbar {
  box-shadow: 0 1px 0 rgba(21,33,29,.03), 0 12px 28px rgba(21,33,29,.05);
}
.nav-actions a { transition: color .18s ease, background .18s ease; }
.nav-actions a:not(.nav-avatar) { border-radius: 8px 8px 0 0; }
.workspace-shell { position: relative; }
.workspace-heading, .creator-heading, .grading-heading { position: relative; }
.workspace-heading:after, .creator-heading:after, .grading-heading:after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 78px;
  height: 3px;
  background: var(--amber);
}
.metric-panel, .create-panel, .project-card, .creator-controls, .camera-panel, .grading-result, .creator-preview-head, .question-preview, .answer-sheet-preview {
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s ease;
}
.metric-panel:hover, .project-card:hover { border-color: #8c9b95; }
.metric-panel small, .project-card small { letter-spacing: .04em; }
.metric-main { position: relative; overflow: hidden; }
.metric-main:after {
  content: '✒️';
  position: absolute;
  left: -10px;
  bottom: -34px;
  color: rgba(255,255,255,.055);
  font: 700 118px/1 var(--font-latin);
}
.create-panel { box-shadow: 8px 8px 0 var(--emerald); }
.create-panel:hover { box-shadow: 12px 12px 0 var(--emerald); }
.project-card { position: relative; overflow: hidden; }
.project-card:before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 0;
  background: var(--amber);
  transition: height .22s var(--ease);
}
.project-card:hover:before { height: 100%; }
.project-open:hover { background: var(--surface); }
.control-section { background: linear-gradient(180deg, rgba(255,253,247,.8), rgba(255,253,247,0)); }
.control-heading > span, .creator-progress .active b {
  box-shadow: 0 0 0 5px rgba(23,77,61,.07);
}
.creator-controls input:not([type='checkbox']):not([type='radio']),
.creator-controls textarea,
.grading-controls input:not([type='file']) {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.creator-controls input:not([type='checkbox']):not([type='radio']):hover,
.creator-controls textarea:hover,
.grading-controls input:not([type='file']):hover { background: #fff; border-color: #9baca5; }
.creator-upload, .grading-upload {
  background:
    linear-gradient(135deg, rgba(255,255,255,.03), rgba(134,217,186,.10)),
    var(--emerald) !important;
}
.creator-upload:hover, .grading-upload:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(23,77,61,.22); }
.answer-mode span { transition: background .18s ease, border-color .18s ease, transform .18s var(--ease); }
.answer-mode input:checked + span { box-shadow: 0 5px 14px rgba(23,77,61,.10); transform: translateY(-1px); }
.creator-preview-head { border-radius: 10px; }
.creator-preview-head:before, .camera-head:before, .result-head:before {
  content: '';
  width: 3px;
  height: 26px;
  border-radius: 4px;
  background: var(--amber);
}
.creator-preview-head { justify-content: flex-start; }
.creator-preview-head .preview-actions { margin-inline-start: auto; }
.creator-preview-head:before { order: -1; }
.paper-stage { box-shadow: inset 0 0 80px rgba(21,33,29,.08); }
.creator-paper { border-radius: 4px; }
.answer-sheet-preview > header { background: linear-gradient(90deg, var(--surface-white), #ebe7dc); }
.grading-state { direction: rtl; }
.camera-frame { background: radial-gradient(circle at 50% 45%, #1f3d32, #09130f 68%); }
.camera-placeholder:after {
  content: '';
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: .65;
  animation: scan-line 3.2s ease-in-out infinite;
}
.scan-target i { position: absolute; width: 22px; height: 22px; border-style: solid; border-color: var(--amber); }
.scan-target i:nth-child(1) { top: -1px; right: -1px; border-width: 3px 3px 0 0; }
.scan-target i:nth-child(2) { top: -1px; left: -1px; border-width: 3px 0 0 3px; }
.scan-target i:nth-child(3) { right: -1px; bottom: -1px; border-width: 0 3px 3px 0; }
.scan-target i:nth-child(4) { bottom: -1px; left: -1px; border-width: 0 0 3px 3px; }
.camera-actions button, .preview-actions button { transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s ease; }
.camera-actions button:active, .preview-actions button:active { transform: translateY(1px); }
.result-empty { background: radial-gradient(circle, rgba(134,217,186,.10), transparent 45%); }
.result-head h2 { line-height: 1.35; }
@keyframes scan-line { 0%,100% { top: 16%; } 50% { top: 84%; } }

/* Login entry polish */
.login-brand .brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; }
.login-process span:last-child { border-left: 0; }
.google-button { align-items: center; justify-content: center; }
.google-button > div { width: 100% !important; }
.status { margin-top: 12px; font-size: 11px; }

student-number-grid i { height:24px; }
.student-number-bubbles { display:grid; grid-template-columns:repeat(var(--student-digits,10),1fr); direction:ltr; gap:2px; margin-top:5px; }
.student-digit { min-width:0; border:1px solid #15211d; text-align:center; }
.student-digit span { display:block; color:#6c7873; font:500 6px var(--font-mono); }
.student-digit i { display:inline-block; width:5px; height:5px; margin:1px; border:1px solid #15211d; border-radius:50%; }
.creator-controls select { width:100%; min-height:42px; margin-top:6px; border:1px solid #bdb9aa; border-radius:7px; background:#f8f5ec; padding:9px 11px; color:var(--ink); }

@media print {
  .app-topbar, .creator-controls, .creator-preview-head, .creator-question-preview, .tabs, .toast { display: none !important; }
  body, .workspace-shell, .creator-layout, .creator-preview, .paper-stage { width: 100%; margin: 0; padding: 0; background: #fff; }
  .creator-paper { width: 100%; min-width: 0; box-shadow: none; }
}
