/* Constance Dev Styles - UI Redesign v1.0 */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;700&family=Lora:wght@400;500&display=swap');

/* CSS Variables - New Warm Palette */
:root {
  /* Typography */
  --font-sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-size-base: 14px;

  /* Colors - Primary */
  --rose-55: #9b7b8a;
  --rose-hover: #8a6a79;

  /* Colors - Neutral */
  --grey-18: #2e2b32;
  --grey-42: #6b6670;
  --grey-60: #9a959e;
  --grey-93: #f0edea;
  --grey-95: #f5f3f0;
  --grey-97: #faf9f7;
  --white: #ffffff;

  /* Colors - Status */
  --status-green: #7a9b7a;
  --status-green-bg: #f0f5f0;
  --status-amber: #c4a55a;
  --status-amber-bg: #faf6ec;
  --status-grey: #6b6670;
  --status-grey-bg: #f8f6fa;
  --status-red: #c48b85;
  --status-red-bg: #faf5f4;

  /* Colors - Semantic */
  --background: var(--grey-97);
  --foreground: var(--grey-18);
  --muted: var(--grey-60);
  --muted-foreground: var(--grey-42);
  --border: #e8e4e0;
  --border-light: var(--grey-93);
  --card: var(--white);
  --primary: var(--rose-55);
  --primary-hover: var(--rose-hover);
  --primary-foreground: var(--white);

  /* Borders */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0px 1px 2px 0px rgba(46, 43, 50, 0.05);
  --shadow: 0px 4px 12px 0px rgba(46, 43, 50, 0.08);
  --shadow-lg: 0px 8px 24px 0px rgba(46, 43, 50, 0.12);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.3;
}

.font-serif {
  font-family: var(--font-serif);
}

/* =============================================
   LAYOUT
   ============================================= */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.header {
  background-color: var(--card);
  border-bottom: 1px solid var(--border-light);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-brand svg {
  height: 20px;
  width: auto;
}

.header-brand-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.header-icon-btn:hover {
  color: var(--foreground);
}

.header-text-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.15s ease;
  text-decoration: none;
}

.header-text-btn:hover {
  color: var(--foreground);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background-color: var(--grey-95);
}

.btn-lg {
  font-size: 16px;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
}

.btn-icon {
  padding: 10px;
}

/* =============================================
   STATUS BADGES
   ============================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-polished {
  background-color: var(--status-green-bg);
  color: var(--status-green);
}

.badge-review {
  background-color: var(--status-amber-bg);
  color: var(--status-amber);
}

.badge-processing {
  background-color: var(--status-grey-bg);
  color: var(--status-grey);
}

/* =============================================
   REVIEW PAGE LAYOUT
   ============================================= */

.review-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 56px); /* viewport minus header */
}

/* Filmstrip (Left Panel) */
.filmstrip {
  width: 136px;
  background-color: var(--card);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: relative;
}

.filmstrip-slides {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  padding-bottom: 80px; /* Space for sticky footer */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filmstrip-slide {
  position: relative;
  width: 111px;
  height: 62px;
  flex-shrink: 0;
  background-color: var(--grey-95);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filmstrip-slide:hover {
  border-color: var(--grey-60);
}

.filmstrip-slide.active {
  background-color: #f8f6fa;
  border-color: var(--primary);
}

.filmstrip-slide-number {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.filmstrip-slide.active .filmstrip-slide-number {
  color: var(--primary);
}

.filmstrip-slide-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background-color: var(--status-amber);
  border-radius: 3px;
  z-index: 2;
}

.filmstrip-thumb-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-sm);
}

.filmstrip-thumb-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 540px;
  transform: scale(0.115);
  transform-origin: top left;
  border: none;
  pointer-events: none;
}

.filmstrip-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 17px 12px;
  background-color: var(--card);
  border-top: 1px solid var(--border-light);
}

.filmstrip-download-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.filmstrip-download-btn svg {
  flex-shrink: 0;
}

/* Main Content Area */
.review-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Review Header */
.review-header {
  background-color: var(--card);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-header-info h1 {
  font-size: 18px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 2px;
}

.review-header-meta {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* Slide Preview Area */
.slide-preview-container {
  flex: 1;
  padding: 24px 40px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 0;
}

.slide-preview {
  background-color: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  /* Fit to available height, derive width from aspect ratio */
  width: auto;
  height: calc(100vh - 200px); /* Leave room for header */
  max-height: calc(100vh - 200px);
  aspect-ratio: 16 / 9;
}

.slide-preview-content {
  background: linear-gradient(150.7deg, #faf5f3 0%, #f8f6fa 100%);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Issue highlight overlay - Select box style */
.issue-highlight {
  position: absolute;
  border: 1.5px solid var(--primary);
  background-color: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.issue-highlight.visible {
  opacity: 1;
}

/* Corner handles */
.issue-highlight .handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--white);
  border: 1.5px solid var(--primary);
  border-radius: 50%;
}

.issue-highlight .handle-tl {
  top: -4px;
  left: -4px;
}

.issue-highlight .handle-tr {
  top: -4px;
  right: -4px;
}

.issue-highlight .handle-bl {
  bottom: -4px;
  left: -4px;
}

.issue-highlight .handle-br {
  bottom: -4px;
  right: -4px;
}

.slide-preview-placeholder {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--foreground);
}

.slide-preview-label {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: var(--card);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* =============================================
   ISSUE CARD STACK
   ============================================= */

.issue-stack {
  position: fixed;
  bottom: 40px;
  right: 24px;
  width: 400px;
  height: 160px; /* Enough for card + stack offset */
}

.issue-card {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 140px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 21px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Stacked cards behind - offset up and left */
.issue-card[data-card="3"] {
  transform: translate(-8px, -8px);
  z-index: 1;
  opacity: 0.6;
}

.issue-card[data-card="2"] {
  transform: translate(-4px, -4px);
  z-index: 2;
  opacity: 0.8;
}

.issue-card.active,
.issue-card[data-card="1"] {
  transform: translate(0, 0);
  z-index: 3;
  opacity: 1;
}

.issue-card-header {
  margin-bottom: 16px;
}

.issue-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.issue-card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
}

.issue-card-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.issue-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.issue-nav-btn:hover {
  background-color: var(--grey-95);
  color: var(--foreground);
}

.issue-card-count {
  font-size: 12px;
  color: var(--muted-foreground);
  min-width: 36px;
  text-align: center;
}

.issue-card-meta {
  font-size: 12px;
  color: var(--muted-foreground);
}

.issue-card-actions {
  display: flex;
  gap: 8px;
}

.issue-card-actions .btn {
  flex: 1;
  height: 43px;
}

/* Batch fix variant - 3 buttons */
.issue-card.has-batch .issue-card-actions .btn {
  padding: 10px 12px;
  font-size: 13px;
}

.btn-apply-all {
  background-color: var(--grey-18);
  color: var(--white);
}

.btn-apply-all:hover {
  background-color: #1a181d;
}

.btn-accept {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-accept:hover {
  background-color: var(--primary-hover);
}

.btn-keep {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-keep:hover {
  background-color: var(--grey-95);
}

/* =============================================
   QA MODAL
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(46, 43, 50, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
}

/* Prevent body scroll when modal is open (only when visible) */
body:has(.modal-overlay:not([style*="display: none"])) {
  overflow: hidden;
}

.modal {
  background-color: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 539px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-progress {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.modal-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-progress-text {
  font-size: 14px;
  color: var(--foreground);
}

.modal-progress-percent {
  font-size: 14px;
  color: var(--muted-foreground);
}

.modal-progress-bar {
  height: 8px;
  background-color: var(--grey-95);
  border-radius: 4px;
  overflow: hidden;
}

.modal-progress-fill {
  height: 100%;
  background-color: var(--status-green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.modal-body {
  padding: 24px;
  overflow-y: scroll;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(90vh - 180px); /* Leave room for header and footer */
  overscroll-behavior: contain;
}

.modal-heading {
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 24px;
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 20px;
}

.qa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.qa-item-text {
  flex: 1;
  font-size: 16px;
  color: var(--foreground);
}

.qa-item-actions {
  display: flex;
  gap: 8px;
}

.qa-action-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: all 0.15s ease;
}

.qa-action-btn:hover {
  background-color: var(--grey-95);
  color: var(--foreground);
}

.qa-action-btn.accept {
  color: var(--status-green);
}

.qa-action-btn.accept:hover {
  background-color: var(--status-green-bg);
}

.qa-action-btn.reject {
  color: var(--status-red);
}

.qa-action-btn.reject:hover {
  background-color: var(--status-red-bg);
}

.qa-action-btn.preview {
  color: var(--primary);
}

.qa-action-btn.preview:hover {
  background-color: rgba(155, 123, 138, 0.1);
}

/* Active/toggled states */
.qa-action-btn.accept.active {
  background-color: var(--status-green);
  color: var(--white);
}

.qa-action-btn.accept.active:hover {
  background-color: var(--status-green);
}

.qa-action-btn.reject.active {
  background-color: var(--status-amber);
  color: var(--white);
}

.qa-action-btn.reject.active:hover {
  background-color: var(--status-amber);
}

.qa-action-btn.preview.active {
  background-color: var(--primary);
  color: var(--white);
}

.qa-action-btn.preview.active:hover {
  background-color: var(--primary);
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.modal-footer .btn {
  flex: 1;
  height: 39px;
  border-radius: 0;
}

.modal-footer .btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.modal-footer .btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* =============================================
   FLASH MESSAGES
   ============================================= */

.flash-container {
  padding: 16px 24px;
}

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
}

.flash-success {
  background-color: var(--status-green-bg);
  color: var(--status-green);
  border: 1px solid var(--status-green);
}

.flash-error {
  background-color: var(--status-red-bg);
  color: var(--status-red);
  border: 1px solid var(--status-red);
}

.flash-warning {
  background-color: var(--status-amber-bg);
  color: var(--status-amber);
  border: 1px solid var(--status-amber);
}

/* =============================================
   UTILITIES
   ============================================= */

.text-muted {
  color: var(--muted-foreground);
}

.text-sm {
  font-size: 12px;
}

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

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-page {
  min-height: 100vh;
  background-color: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 32px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand-text {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--foreground);
}

.login-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 36px 33px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}

.form-input {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--foreground);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  height: 50px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder {
  color: rgba(46, 43, 50, 0.5);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(155, 123, 138, 0.1);
}

.login-btn {
  width: 100%;
  height: 48px;
  font-size: 16px;
  border-radius: var(--radius-lg);
  margin-top: 4px;
}

.login-forgot-link {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-forgot-link:hover {
  color: var(--primary-hover);
}

.login-signup-text {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.login-signup-link {
  font-weight: 700;
  color: var(--primary-hover);
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-signup-link:hover {
  color: var(--primary);
}

/* =============================================
   DASHBOARD PAGE
   ============================================= */

.dashboard-main {
  flex: 1;
  padding: 40px 24px;
}

.dashboard-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Upload Zone */
.upload-zone {
  background-color: var(--card);
  border: 1.5px dashed #e8ccc4;
  border-radius: var(--radius);
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.upload-zone:hover {
  border-color: var(--primary);
  background-color: rgba(155, 123, 138, 0.02);
}

.upload-zone svg {
  color: var(--muted);
}

.upload-zone-text {
  text-align: center;
}

.upload-zone-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 4px;
}

.upload-zone-desc {
  font-size: 14px;
  color: var(--muted-foreground);
}

.upload-zone-requirements {
  font-size: 12px;
  color: var(--muted-foreground);
  opacity: 0.7;
  margin-top: 8px;
}

/* Dashboard Sections */
.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header-row .section-heading {
  margin-bottom: 0;
}

.section-heading {
  font-size: 20px;
  font-weight: 500;
  color: var(--foreground);
}

/* Deck Cards Grid */
.deck-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.deck-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.deck-card-preview {
  background-color: var(--grey-95);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.deck-card-placeholder {
  font-size: 14px;
  color: var(--muted);
}

.deck-card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deck-card-iframe-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  container-type: inline-size;
}

.deck-card-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 540px;
  transform-origin: top left;
  /* Scale based on container width: 100cqi = container width, divide by 960 */
  transform: scale(calc(100cqi / 960px));
  border: none;
  pointer-events: none;
}

.deck-card-preview .badge {
  position: absolute;
  top: 12px;
  right: 12px;
}

.deck-card-delete-form {
  position: absolute;
  top: 8px;
  left: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
  pointer-events: auto;
}

.deck-card:hover .deck-card-delete-form {
  opacity: 1;
}

.deck-card-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.deck-card-delete-btn:hover {
  background-color: var(--status-red);
}

.deck-card-body {
  flex: 1;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.deck-card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.15s ease;
  display: block;
}

.deck-card-title:hover {
  color: var(--primary);
}

.deck-name-link {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.15s ease;
}

.deck-name-link:hover {
  color: var(--primary);
}

.deck-card-footer {
  display: flex;
}

.deck-card-date {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  padding: 12px;
  border-right: 1px solid var(--border-light);
}

.deck-card-review-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  padding: 12px;
  transition: background-color 0.15s ease;
}

.deck-card-review-link:hover {
  background-color: rgba(155, 123, 138, 0.05);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  height: 37px;
}

.btn-danger-outline {
  color: #dc2626;
  border-color: #dc2626;
}

.btn-danger-outline:hover {
  background-color: #dc2626;
  color: white;
}

/* Deck Table */
.deck-table-container {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.deck-table {
  width: 100%;
  border-collapse: collapse;
}

.deck-table thead {
  background-color: var(--grey-95);
}

.deck-table th {
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.deck-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.deck-table th.sortable > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.deck-table th.sortable:hover {
  color: var(--foreground);
}

.deck-table th.sortable .sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  opacity: 0.4;
  font-size: 11px;
  line-height: 1;
}

.deck-table th.sortable .sort-icon::after {
  content: '↕';
}

.deck-table th.sortable.sort-asc .sort-icon {
  opacity: 1;
}

.deck-table th.sortable.sort-asc .sort-icon::after {
  content: '↑';
}

.deck-table th.sortable.sort-desc .sort-icon {
  opacity: 1;
}

.deck-table th.sortable.sort-desc .sort-icon::after {
  content: '↓';
}

.deck-table td {
  font-size: 14px;
  color: var(--foreground);
  padding: 19px 20px;
  border-bottom: 1px solid var(--border-light);
}

.deck-table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.table-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.table-action-btn:hover {
  background-color: rgba(155, 123, 138, 0.1);
}

.table-action-btn-danger {
  color: var(--status-red);
}

.table-action-btn-danger:hover {
  background-color: rgba(196, 139, 133, 0.1);
}

/* Dashboard Footer */
.dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.footer-copyright {
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 14px;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--foreground);
}

.footer-link-primary {
  font-weight: 500;
  color: var(--primary);
}

.footer-link-primary:hover {
  color: var(--primary-hover);
}

/* =============================================
   SLIDE PREVIEW IFRAME
   ============================================= */

.slide-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  object-fit: contain;
  object-position: top left;
}

.slide-preview-placeholder {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* =============================================
   REVIEW COMPLETE STATE
   ============================================= */

.review-complete {
  position: fixed;
  bottom: 40px;
  right: 24px;
  width: 400px;
}

.review-complete-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  text-align: center;
}

.review-complete-icon {
  color: var(--status-green);
  margin-bottom: 16px;
}

.review-complete-card h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 8px;
}

.review-complete-card p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

/* =============================================
   REVIEW ACTION BAR
   ============================================= */

.review-action-bar {
  position: fixed;
  bottom: 0;
  left: 136px; /* Width of filmstrip */
  right: 0;
  background-color: var(--card);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.review-action-summary {
  font-size: 14px;
  color: var(--muted-foreground);
}

.review-action-summary span {
  font-weight: 600;
  color: var(--foreground);
}

/* =============================================
   ISSUE CARD DECISION STATES
   ============================================= */

.issue-card.decided {
  opacity: 0.6;
}

.issue-card.decided.active {
  opacity: 1;
}

.issue-card.decided-accept {
  border-color: var(--status-green);
}

.issue-card.decided-accept::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--status-green);
  border-radius: var(--radius) var(--radius) 0 0;
}

.issue-card.decided-keep {
  border-color: var(--status-grey);
}

.issue-card.decided-keep::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--status-grey);
  border-radius: var(--radius) var(--radius) 0 0;
}

/* =============================================
   FILMSTRIP EMPTY STATE
   ============================================= */

.filmstrip-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* Dashboard Empty State */
.dashboard-empty {
  padding: 48px 24px;
  text-align: center;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */

@media (max-width: 900px) {
  .deck-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .deck-cards {
    grid-template-columns: 1fr;
  }

  .review-layout {
    flex-direction: column;
  }

  .filmstrip {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .filmstrip-slides {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 16px;
  }

  .filmstrip-footer {
    position: relative;
    border-top: none;
    padding-top: 0;
  }

  .issue-stack {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    margin-top: 24px;
  }

  .issue-card {
    width: 100%;
  }

  .review-action-bar {
    left: 0;
  }
}

/* =============================================
   SETTINGS PAGE
   ============================================= */

.settings-page {
  flex: 1;
  padding: 40px 24px;
}

.settings-container {
  max-width: 600px;
  margin: 0 auto;
}

.settings-header {
  margin-bottom: 32px;
}

.settings-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.15s ease;
}

.settings-back:hover {
  color: var(--foreground);
}

.settings-header h1 {
  font-size: 24px;
  font-weight: 500;
  color: var(--foreground);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.settings-section {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.settings-section h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.settings-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.settings-option-info {
  flex: 1;
}

.settings-option-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  display: block;
  margin-bottom: 4px;
}

.settings-option-description {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.settings-option-description a {
  color: var(--primary);
  text-decoration: none;
}

.settings-option-description a:hover {
  text-decoration: underline;
}

/* Toggle Switch */
.settings-toggle-wrap {
  flex-shrink: 0;
}

.settings-toggle {
  display: none;
}

.settings-toggle-label {
  display: block;
  width: 44px;
  height: 24px;
  background-color: var(--grey-60);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.settings-toggle-label::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: var(--white);
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-toggle:checked + .settings-toggle-label {
  background-color: var(--status-green);
}

.settings-toggle:checked + .settings-toggle-label::after {
  transform: translateX(20px);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

/* =============================================
   WELCOME MODAL
   ============================================= */

.welcome-modal {
  width: 440px;
  padding: 32px;
  text-align: center;
}

.welcome-modal-icon {
  margin-bottom: 16px;
  color: var(--primary);
}

.welcome-modal-content h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 12px;
}

.welcome-modal-content p {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 24px;
}

.welcome-modal-content p a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.welcome-modal-content p a:hover {
  text-decoration: underline;
}

.welcome-modal-content .btn {
  min-width: 120px;
}

/* =============================================
   SHARE BUTTON
   ============================================= */

.share-btn {
  border: none;
  background: none;
  transition: all 0.15s ease;
}

.share-btn.share-success {
  color: var(--status-green) !important;
}

.share-btn.share-success:hover {
  background-color: var(--status-green-bg) !important;
}

/* =============================================
   SHARE EXPIRED PAGE
   ============================================= */

.share-expired-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.share-expired-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 48px;
  max-width: 400px;
  text-align: center;
}

.share-expired-icon {
  color: var(--muted);
  margin-bottom: 24px;
}

.share-expired-card h1 {
  font-size: 24px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 12px;
}

.share-expired-card p {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 16px;
}

.share-expired-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}



