/* ==========================================================================
   Studio Notan — Standalone Worksheet Viewer & Document Interface Styles
   Matches the modern light aesthetic of https://notantest.prettygrand.com/
   ========================================================================== */

:root {
  --color-canvas: #f4f4f5;
  --color-surface-primary: #ffffff;
  --color-surface-secondary: #fafafa;
  --color-neutral-100: #fafafa;
  --color-neutral-200: #f4f4f5;
  --color-neutral-300: #e4e4e7;
  --color-neutral-400: #d4d4d8;
  --color-neutral-500: #a1a1aa;
  --color-neutral-600: #71717a;
  --color-neutral-700: #3f3f46;
  --color-neutral-900: #18181b;
  --color-accent: #6366f1;
  --color-accent-hover: #4f46e5;
  --shadow-sheet: 0 1px 3px rgba(16, 24, 40, 0.08), 0 12px 32px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-canvas);
  color: var(--color-neutral-900);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Floating / Sticky Viewer Action Bar (56px matching title-bar) */
.viewer-bar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-neutral-300);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.viewer-bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-neutral-900);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.viewer-bar__brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f4f4f5;
  color: #18181b;
  flex-shrink: 0;
}

.viewer-bar__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-bar__tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--color-neutral-600);
  background: #f4f4f5;
  padding: 2px 8px;
  border: 1px solid var(--color-neutral-300);
  border-radius: 6px;
}

.viewer-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.viewer-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}

.viewer-bar__btn--primary {
  background-color: var(--color-neutral-900);
  color: #ffffff;
  font-weight: 600;
}

.viewer-bar__btn--primary:hover {
  background-color: var(--color-neutral-700);
}

.viewer-bar__btn--secondary {
  background-color: #ffffff;
  color: var(--color-neutral-900);
  border-color: var(--color-neutral-300);
}

.viewer-bar__btn--secondary:hover {
  background-color: #fafafa;
  border-color: var(--color-neutral-400);
}

.viewer-bar__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Page Frame for Screen View */
.viewer-stage {
  flex: 1;
  padding: 40px 16px 80px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: auto;
}

/* 8.5in x 11in Physical Sheet on Screen */
.sheet {
  width: 8.5in;
  min-height: 11in;
  background-color: #ffffff;
  color: #111111;
  padding: 0.5in;
  border: 1px solid var(--color-neutral-300);
  border-radius: 6px;
  box-shadow: var(--shadow-sheet);
  position: relative;
  margin: 0 auto;
}

/* Hide web UI when printing */
@media print {
  body {
    background-color: transparent !important;
    color: #000000 !important;
  }

  .viewer-bar {
    display: none !important;
  }

  .viewer-stage {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    overflow: visible !important;
  }

  .sheet {
    width: 100% !important;
    min-height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
}
