* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text); 
  background: var(--bg);
  overflow: auto;
}

:root {
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --text: #212529;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --border-light: #e9ecef;
  --accent: #0d6efd;
  --accent-hover: #0b5ed7;
  --accent-light: rgba(13, 110, 253, 0.1);
  --header: #f8f9fa;
  --sidebar: #f8f9fa;
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --transition: all 0.2s ease;
}

[data-theme="dark"] {
  --bg: #1a1d23;
  --bg-secondary: #212529;
  --text: #e9ecef;
  --text-muted: #adb5bd;
  --border: #343a40;
  --border-light: #495057;
  --accent: #0d6efd;
  --accent-hover: #3d8bfd;
  --accent-light: rgba(13, 110, 253, 0.15);
  --header: #212529;
  --sidebar: #212529;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ===== HEADER ===== */
.app-header { 
  display: flex; 
  align-items: center; 
  gap: 20px; 
  padding: 12px 20px; 
  background: var(--header); 
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 100;
}

.brand { 
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  user-select: none;
}
.brand-icon { font-size: 24px; }
.brand-text { letter-spacing: -0.02em; }

.toolbar { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar .divider { 
  width: 1px; 
  height: 32px; 
  background: var(--border);
  margin: 0 4px;
}

/* Button Styles */
.btn-icon, .btn-icon-sm {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  white-space: nowrap;
}

.btn-icon:hover, .btn-icon-sm:hover {
  background: var(--accent-light);
  border-color: var(--border);
}

.btn-icon:active, .btn-icon-sm:active {
  transform: translateY(1px);
}

.btn-icon .material-icons {
  font-size: 20px;
}

.btn-icon-sm {
  padding: 6px;
  min-width: 36px;
}

.btn-icon-sm .material-icons {
  font-size: 20px;
}

.btn-label {
  font-size: 11px;
  font-weight: 500;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Zoom Controls */
.zoom-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

#zoom-input {
  width: 100px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  appearance: none;
}

#zoom-input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

#zoom-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.zoom-display {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 42px;
  text-align: center;
}

/* ===== MAIN LAYOUT ===== */
.app-main { 
  display: grid; 
  grid-template-columns: 100px 1fr 320px; 
  height: calc(100vh - 90px);
  overflow: hidden;
}

/* ===== LEFT SIDEBAR (Pages) ===== */
.sidebar-left { 
  border-right: 1px solid var(--border); 
  background: var(--sidebar); 
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-header { 
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.sidebar-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-tabs {
  display: flex;
  gap: 4px;
}

.property-tab {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-tab:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.property-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.property-tab .material-icons {
  font-size: 18px;
}

.tab-content {
  display: block;
}

.tab-content[style*="display: none"] {
  display: none;
}

.sidebar-actions {
  display: flex;
  gap: 4px;
}

.thumb-list { 
  list-style: none;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
}

.thumb { 
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.thumb:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.thumb .label { 
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.thumb img { 
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.thumb.active { 
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow-md);
}

.thumb.active .label {
  color: var(--accent);
  font-weight: 600;
}

/* ===== CANVAS AREA ===== */
#canvas-area { 
  position: relative;
  overflow: auto;
  padding: 32px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page { 
  margin: 16px auto;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: var(--transition);
}

.page:hover {
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent-light);
}

.page canvas { 
  display: block;
  cursor: crosshair;
}

.page .page-label { 
  position: absolute;
  top: -28px;
  left: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ===== RIGHT SIDEBAR (Properties) ===== */
.sidebar-right { 
  border-left: 1px solid var(--border);
  background: var(--sidebar);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.properties-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  overflow-y: auto;
}

.panel-toggle {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.panel-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.panel-toggle .material-icons {
  font-size: 20px;
}

.property-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .material-icons {
  font-size: 18px;
  color: var(--accent);
}

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
}

.tool-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.tool-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.tool-btn .material-icons {
  font-size: 20px;
}

.tool-name {
  font-size: 10px;
  font-weight: 500;
}

/* Color Controls */
.color-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-row label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.control-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-wrapper input[type="color"] {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.color-hex {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
}

.color-presets {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.color-preset {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.color-preset:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

/* Slider Controls */
.slider-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-control label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-wrapper input[type="range"] {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  appearance: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.slider-wrapper input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.slider-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  min-width: 32px;
  text-align: right;
}

/* Text Style Buttons */
.text-style-buttons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.style-btn {
  flex: 1;
  padding: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
}

.style-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.style-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.action-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.action-btn .material-icons {
  font-size: 16px;
}

.advanced-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.advanced-controls .control-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.advanced-controls .control-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.advanced-controls .control-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

.effect-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ===== FOOTER ===== */
.app-footer { 
  border-top: 1px solid var(--border);
  padding: 8px 20px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--header);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  background: var(--bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 300px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--text);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #0b5ed7);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--accent); }

.toast .material-icons {
  font-size: 20px;
}

.toast.success .material-icons { color: var(--success); }
.toast.warning .material-icons { color: var(--warning); }
.toast.error .material-icons { color: var(--danger); }
.toast.info .material-icons { color: var(--accent); }

.toast-message {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.toast-close .material-icons {
  font-size: 18px;
}

/* ===== ACCESSIBILITY ===== */
:focus-visible { 
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .app-main {
    grid-template-columns: 240px 1fr 280px;
  }
}

@media (max-width: 992px) {
  .app-main {
    grid-template-columns: 200px 1fr;
  }
  .sidebar-right {
    display: none;
  }
}

@media (max-width: 1024px) {
  .app-header {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .brand {
    font-size: 16px;
  }
  
  .brand-icon {
    font-size: 20px;
  }
  
  .toolbar {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  .toolbar-group {
    gap: 2px;
  }
  
  .btn-label {
    display: none;
  }
  
  .btn-icon {
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
  }
  
  .btn-icon .material-icons {
    font-size: 20px;
  }
  
  .app-main {
    grid-template-columns: 1fr;
    height: calc(100vh - 70px);
  }
  
  .sidebar-left,
  .sidebar-right {
    display: flex !important;
  }
  
  #canvas-area {
    padding: 8px;
    height: 100%;
    min-height: calc(100vh - 70px);
  }
  
  .page-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .zoom-controls {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 6px 8px;
  }
  
  .brand-text {
    display: none;
  }
  
  .btn-icon {
    min-width: 32px;
    min-height: 32px;
    padding: 4px;
  }
  
  .btn-icon .material-icons {
    font-size: 18px;
  }
  
  .toolbar .divider {
    display: none;
  }
  
  #canvas-area {
    padding: 4px;
    height: 100%;
    min-height: calc(100vh - 60px);
  }
  
  .zoom-value {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .page-nav {
    font-size: 12px;
  }
}

/* OCR Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ocr-modal {
  display: flex;
  flex-direction: column;
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid var(--border-light);
  justify-content: flex-end;
}

.smart-modal .smart-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smart-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.smart-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 14px;
}

.smart-input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.smart-help {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.smart-error {
  margin: 0;
  color: #d14343;
  font-size: 13px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-light);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* OCR Progress indicator */
#btn-ocr.processing::after {
  content: '';
  animation: spin 1s linear infinite;
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* AdSense Ad Containers */
.ad-container {
  margin: 20px auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-container ins {
  display: block;
}


/* ===== NEW PROPERTIES PANEL STYLES ===== */

/* Tab Navigation */
.properties-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
}

.prop-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.prop-tab-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.prop-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(13, 110, 253, 0.05);
}

.prop-tab-btn .material-icons {
  font-size: 20px;
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
}

/* Tab Content */
.prop-tab-content {
  display: none;
  animation: fadeIn 0.2s ease;
}

.prop-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tool Lists (Expanded) */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-btn-wide {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
  width: 100%;
  text-align: left;
}

.tool-btn-wide:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  transform: translateX(2px);
}

.tool-btn-wide .material-icons {
  font-size: 20px;
  color: var(--text-muted);
}

.tool-btn-wide:hover .material-icons {
  color: var(--accent);
}

.tool-btn-wide span:not(.material-icons) {
  font-size: 13px;
  font-weight: 500;
}

/* Action Buttons Grid */
.action-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* OCR Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--danger);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-secondary {
  background: white;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}
