/*
 * Journalizer Web Stylesheet
 */

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

:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #818cf8;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-gray-800);
  background: var(--color-gray-50);
  min-height: 100vh;
}

/* Dot grid background for landing page */
.main-content-full {
  background:
    radial-gradient(circle, var(--color-gray-300) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-gray-50), white 300px);
  background-size: 24px 24px, 100% 100%;
  background-position: 12px 12px, 0 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: white;
  border-bottom: 1px solid var(--color-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--color-gray-600);
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--color-gray-900);
  text-decoration: none;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-name {
  font-weight: 500;
  color: var(--color-gray-700);
}

.credit-badge {
  background: var(--color-primary-light);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.main-content-full {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

/* Flash Messages */
.flash {
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.main-content .flash {
  margin-left: 0;
  margin-right: 0;
}

.flash-notice {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.flash-alert {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: white;
  color: var(--color-gray-700);
  border: 1px solid var(--color-gray-300);
}

.btn-secondary:hover {
  background: var(--color-gray-50);
  color: var(--color-gray-900);
  text-decoration: none;
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-gray-600);
}

.btn-ghost:hover {
  background: var(--color-gray-100);
  color: var(--color-gray-900);
  text-decoration: none;
}

.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-large {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-google {
  background: white;
  color: var(--color-gray-700);
  border: 1px solid var(--color-gray-300);
  font-weight: 500;
}

.btn-google:hover {
  background: var(--color-gray-50);
  text-decoration: none;
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

.form-input::placeholder {
  color: var(--color-gray-400);
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  margin-top: 0.375rem;
}

.form-error {
  color: var(--color-danger);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

/* Error messages from Rails */
#error_explanation {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

#error_explanation h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#error_explanation ul {
  margin-left: 1.25rem;
}

.field_with_errors input {
  border-color: var(--color-danger);
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-900);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-top: 0.25rem;
}

/* Auth Pages */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--color-gray-500);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray-200);
}

.auth-divider span {
  padding: 0 1rem;
  color: var(--color-gray-400);
  font-size: 0.875rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--color-gray-500);
}

/* Landing Page */
.landing-hero {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.landing-logo-icon {
  width: 48px;
  height: 48px;
}

.landing-logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.landing-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.landing-subtitle {
  font-size: 1.375rem;
  color: var(--color-gray-600);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.landing-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px -2px rgb(0 0 0 / 0.1), 0 2px 8px -2px rgb(0 0 0 / 0.08);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-light);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--color-gray-600);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Landing Pricing */
.landing-pricing {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.landing-pricing-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: white;
  box-shadow: 0 4px 20px -2px rgb(99 102 241 / 0.3);
}

.landing-pricing-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.landing-pricing-subtitle {
  opacity: 0.9;
  margin-bottom: 2rem;
}

.landing-pricing-amount {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}

.landing-pricing-unit {
  opacity: 0.8;
  font-size: 1.125rem;
  margin-top: 0.25rem;
}

.landing-pricing-note {
  opacity: 0.85;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
}

/* Landing Open Source */
.landing-opensource {
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
  background: white;
  padding: 4rem 2rem;
}

.landing-opensource-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.landing-opensource-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.landing-opensource-desc {
  color: var(--color-gray-600);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

.landing-opensource-list {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
  color: var(--color-gray-600);
  list-style: none;
}

.landing-opensource-list li {
  margin-bottom: 0.75rem;
  font-size: 1.0625rem;
}

.landing-opensource-list li:last-child {
  margin-bottom: 0;
}

/* Dashboard */
.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.stat-action {
  margin-top: 1rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

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

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-gray-200);
}

th {
  font-weight: 600;
  color: var(--color-gray-600);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover td {
  background: var(--color-gray-50);
}

/* Lists */
.entry-list {
  list-style: none;
}

.entry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.entry-item:last-child {
  border-bottom: none;
}

.entry-date {
  font-weight: 500;
  color: var(--color-gray-900);
}

.entry-meta {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pricing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.pricing-card:hover {
  border-color: var(--color-primary-light);
}

.pricing-card.popular {
  border-color: var(--color-primary);
  position: relative;
}

.pricing-card.popular::before {
  content: 'Best value';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pricing-pages {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.pricing-pages span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-gray-500);
}

.pricing-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0.5rem 0;
}

.pricing-per-page {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-bottom: 1.5rem;
}

/* Token display */
.token-display {
  background: var(--color-gray-800);
  color: #10b981;
  padding: 1rem;
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 0.875rem;
  word-break: break-all;
  margin: 1rem 0;
}

.token-warning {
  background: #fef3c7;
  color: #92400e;
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--color-gray-500);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-gray-500);
  font-size: 0.875rem;
  margin-top: auto;
}

/* Page Headers */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.page-subtitle {
  color: var(--color-gray-500);
  margin-top: 0.25rem;
}

/* Sections */
.section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 1rem;
}

/* Utility Classes */
.text-center { text-align: center; }
/* Upload Page */
.upload-container {
  max-width: 600px;
  margin: 0 auto;
}

.upload-header {
  text-align: center;
  margin-bottom: 2rem;
}

.upload-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.upload-subtitle {
  color: var(--color-gray-600);
}

.upload-hint-date {
  font-size: 0.8rem;
  color: var(--color-gray-500);
  margin-top: 0.25rem;
}

.upload-mode-switch {
  margin-bottom: 1.5rem;
}

.mode-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.mode-option:hover {
  background: var(--color-primary-dark);
  color: white;
}

.mode-icon {
  font-size: 1.25rem;
}

.mode-label {
  font-size: 1rem;
}

.upload-zone {
  background: white;
  border: 2px dashed var(--color-gray-300);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 200px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-primary);
  background: var(--color-gray-50);
}

.upload-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.upload-prompt {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-gray-700);
}

.upload-hint {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  width: 100%;
}

.preview-item {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-gray-100);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-remove:hover {
  background: var(--color-danger);
}

.preview-container {
  width: 100%;
}

.orientation-toolbar {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--color-gray-800);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.orientation-label {
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
}

.orientation-buttons {
  display: flex;
  gap: 0.5rem;
}

.orientation-btn {
  cursor: pointer;
}

.orientation-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.orientation-btn-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: var(--color-gray-700);
  color: var(--color-gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  min-width: 60px;
}

.orientation-btn:hover .orientation-btn-inner {
  background: var(--color-gray-600);
  color: white;
}

.orientation-btn input:checked + .orientation-btn-inner {
  background: var(--color-primary);
  color: white;
}

.add-more-btn {
  margin-top: 1rem;
  position: relative;
  z-index: 10;
}

.preview-item.rotated-90 img {
  transform: rotate(90deg);
}

.preview-item.rotated-180 img {
  transform: rotate(180deg);
}

.preview-item.rotated-270 img {
  transform: rotate(270deg);
}

/* Camera Page */
.camera-container {
  position: fixed;
  inset: 0;
  background: black;
  display: flex;
  flex-direction: column;
}

.camera-preview {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camera-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-loading,
.camera-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: white;
  text-align: center;
  padding: 2rem;
}

.camera-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.camera-error-message {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.camera-strip {
  background: rgba(0,0,0,0.8);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.camera-strip-inner {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  flex: 1;
}

.strip-item {
  position: relative;
  width: 60px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-strip-count {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.camera-controls {
  background: black;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.camera-controls-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.camera-close,
.camera-files {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  text-decoration: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.camera-close:hover,
.camera-files:hover {
  background: rgba(255,255,255,0.2);
}

.orientation-toggle {
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 70px;
}

.orientation-toggle:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

.camera-controls-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.camera-flip {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.camera-flip:hover {
  background: rgba(255,255,255,0.2);
}

.camera-shutter {
  width: 72px;
  height: 72px;
  background: white;
  border: 4px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}

.camera-shutter:hover {
  transform: scale(1.05);
}

.camera-shutter:active,
.camera-shutter.flash {
  transform: scale(0.95);
  background: var(--color-gray-200);
}

.shutter-inner {
  width: 58px;
  height: 58px;
  background: white;
  border-radius: 50%;
  border: 2px solid var(--color-gray-300);
}

.camera-flash {
  position: fixed;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
}

.camera-flash.flash {
  animation: camera-flash 0.15s ease-out;
}

@keyframes camera-flash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

.camera-done {
  min-width: 80px;
}

.upload-actions {
  margin-top: 1.5rem;
}

.credit-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--color-gray-100);
  border-radius: var(--radius);
}

.credit-balance {
  font-weight: 600;
  color: var(--color-gray-700);
}

.credit-cost {
  color: var(--color-gray-500);
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.alert-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.alert-error {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.text-right { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-user {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .landing-logo-icon {
    width: 40px;
    height: 40px;
  }

  .landing-logo-text {
    font-size: 1.5rem;
  }

  .landing-title {
    font-size: 2.25rem;
  }

  .landing-subtitle {
    font-size: 1.125rem;
  }

  .main-content {
    padding: 1rem;
  }
}
