:root {
  --primary: #4CAF50;
  --primary-dark: #388E3C;
  --primary-light: #66BB6A;
  --success: #28a745;
  --danger: #dc3545;
  --secondary: #6c757d;
  --surface: #f8f9fa;
  --border: #dfe3e8;
  --text: #212529;
  --text-secondary: #6c757d;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  
  /* Mobile-First Touch Targets */
  --touch-target: 44px; /* Apple/Google minimum */
  --spacing-mobile: 1rem;
  --spacing-desktop: 1.5rem;
  --font-mobile: 16px;
  --font-desktop: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  font-size: var(--font-mobile);
  padding-bottom: 140px;
  /* Mobile optimizations */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(76, 175, 80, 0.2);
  touch-action: manipulation; /* Prevent double-tap zoom */
}

/* Header Compacto */
header {
  background: white;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.header-title {
  flex: 1;
  text-align: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-btn {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 20px;
  color: var(--text-secondary);
}

.header-btn:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

h1 {
  font-size: 1.3rem;
  color: var(--primary);
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.app-logo-header {
  width: 1.3em;
  height: 1.3em;
  object-fit: contain;
  vertical-align: middle;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 400;
}

/* Settings Button */
.settings-btn {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  position: relative;
}

.ai-status-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 1;
}

.settings-btn:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(45deg);
}

.settings-btn:active {
  transform: scale(0.95) rotate(45deg);
}

/* Settings Menu */
.settings-menu {
  position: fixed;
  top: 70px;
  right: 10px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 320px;
  max-width: calc(100vw - 20px);
  overflow: hidden;
  z-index: 2000;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-menu-content {
  padding: 1rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.settings-section {
  margin-bottom: 0.5rem;
}

.settings-section h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  color: var(--text-primary);
  text-align: left;
  width: 100%;
}

.settings-option:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateX(4px);
}

.settings-option:active {
  transform: scale(0.98) translateX(4px);
}

.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.ai-status {
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.ai-status span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Remove old language menu styles - now using settings menu */
.language-menu.hidden {
  display: none;
}

.language-option.active {
  background: var(--primary-light);
  color: white;
  font-weight: 600;
}

/* ============================================
   TAB NAVIGATION - REMOVED (No longer used)
   ============================================ */

/* Tab navigation removed - all buttons now in bottom action bar */

/* ============================================
   CONTENT AREA
   ============================================ */

#content-datos {
  display: block;
}

/* ============================================
   FLOATING ACTION BUTTON (FAB)
   ============================================ */

.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: auto;
  min-width: 100px;
  height: 50px;
  padding: 0 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 25px;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-text {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.fab-icon {
  font-size: 1.75rem;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

/* ============================================
   BOTTOM ACTION BAR
   ============================================ */

.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 998;
}

.btn-action {
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  flex: 1;
  max-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  line-height: 1;
}

.btn-compact {
  padding: 0.75rem;
  font-size: 2.5rem;
}

.btn-generate-center {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-generate-center:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-action:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-danger-outline {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger-outline:hover {
  background: var(--danger);
  color: white;
}

/* Main Container */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.5rem 0.75rem 1rem;
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.4rem;
  font-weight: 600;
}

/* Collapsed Sections */
.collapsed-section .section-header-collapse {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  user-select: none;
}

.collapsed-section .section-header-collapse:hover {
  opacity: 0.8;
}

.collapsed-section .collapse-icon {
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.collapsed-section.expanded .collapse-icon {
  transform: rotate(180deg);
}

.collapsed-section .section-content {
  padding-top: 1rem;
}

/* Acciones Correctivas */
.accion-correctiva-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.accion-correctiva-card .section-content {
  padding: 1rem;
}

.accion-correctiva-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: background 0.2s;
}

.accion-correctiva-header:hover {
  background: linear-gradient(135deg, #eaeaea 0%, #d8d8d8 100%);
}

.accion-correctiva-number {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  flex: 1;
}

.accion-correctiva-header .header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-remove-accion {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.btn-remove-accion:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

/* Form Fields */
.form-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-field {
  margin-bottom: 0.75rem;
}

.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.9rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  background-color: white;
}

.form-field select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  background-repeat: no-repeat;
  background-position: right 0.7rem center, center;
  padding-right: 2.5rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
  
  /* Custom arrow */
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%),
    linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  background-position:
    calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px),
    center;
  background-size:
    5px 5px,
    5px 5px,
    100% 100%;
  background-repeat: no-repeat;
}

.form-field select:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%),
    linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  background-position:
    calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px),
    center;
  background-size:
    5px 5px,
    5px 5px,
    100% 100%;
}

.form-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15), 0 4px 12px rgba(0,0,0,0.1);
  outline: none;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.input-with-button input {
  flex: 1;
}

.icon-btn {
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
}

.icon-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.icon-btn:active {
  transform: scale(0.95);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Verification Sections */
.verification-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.verification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.verification-header h3 {
  font-size: 1.1rem;
  color: var(--text);
}

.photo-section {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.photo-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* Buttons */
.btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-small {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Actions Section */
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
}

/* Status */
#status {
  text-align: center;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
  font-weight: 500;
}

#status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  background: var(--surface);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Camera */
#camera-preview {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  background: #000;
  margin-bottom: 1rem;
}

.photo-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Draft List */
.draft-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

/* ============================================
   PRE-DEFINED SECTIONS & ITEMS STRUCTURE  
   (GenReport Python Style)
   ============================================ */

.section-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.2s;
}

.section-card.collapsed .section-header {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.section-header:hover {
  background: var(--surface);
}

.section-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.section-toggle {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.8rem;
  color: var(--primary);
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
  flex-shrink: 0;
}

.btn-add-section-photo {
  padding: 0.4rem 0.6rem;
  background: white;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-add-section-photo:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.section-photo-preview {
  position: relative;
  margin: 0 1rem 0.75rem;
  border-radius: 6px;
  overflow: hidden;
}

.section-photo-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain; /* Mantém proporção, não estica */
  background: #f5f5f5;
}

.section-photo-preview .btn-remove-photo {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(244, 67, 54, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.item-row:hover {
  background: white;
  box-shadow: var(--shadow-sm);
}

.item-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.item-name {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  flex: 1;
  line-height: 1.3;
}

.item-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-select-state {
  padding: 0.4rem 0.6rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
  white-space: nowrap;
}

.btn-select-state:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-select-state.has-selection {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.state-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-count {
  background: var(--primary);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Photo Gallery - Unlimited photos system */
.item-photos-gallery {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-add-photo {
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-add-photo:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.photo-thumbnail {
  width: 50px;
  height: 50px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-thumbnail:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 10;
}

.item-photos {
  display: flex;
  gap: 0.3rem;
}

.btn-item-photo {
  padding: 0.35rem 0.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
  min-width: 40px;
  position: relative;
  overflow: hidden;
}

.btn-item-photo:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: white;
}

.btn-item-photo.has-photo {
  background-size: cover;
  background-position: center;
  border: 2px solid var(--primary);
  min-width: 50px;
  min-height: 40px;
  padding: 0;
}

.btn-item-photo.has-photo .photo-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ============================================
   STATE SELECTOR MODAL
   ============================================ */

.state-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.state-modal-content {
  background: #2c2c2c;
  border-radius: 12px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.state-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #404040;
}

.state-modal-header h3 {
  margin: 0;
  color: #4CAF50;
  font-size: 20px;
}

.state-modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.state-modal-close:hover {
  background: #404040;
  color: #fff;
}

.state-modal-subtitle {
  padding: 16px 24px;
  margin: 0;
  color: #ddd;
  font-size: 14px;
  background: #242424;
}

.state-modal-checkboxes {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
  max-height: 60vh;
}

.state-checkbox-label {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  color: #ddd;
  font-size: 0.9rem;
}

.state-checkbox-label:hover {
  background: #353535;
}

.state-checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #4CAF50;
  flex-shrink: 0;
}

.state-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #404040;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-modal-cancel,
.btn-modal-confirm {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-modal-cancel {
  background: #404040;
  color: #fff;
}

.btn-modal-cancel:hover {
  background: #4a4a4a;
}

.btn-modal-confirm {
  background: #4CAF50;
  color: white;
  font-size: 0.9rem;
  padding: 8px 20px;
}

.btn-modal-confirm:hover {
  background: #45a049;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .item-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .section-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .btn-add-section-photo {
    width: 100%;
  }
}

/* ============================================
   PHOTO CAPTURE MODAL
   ============================================ */

.photo-capture-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
}

@media (max-width: 768px) {
  .photo-capture-modal {
    background: black;
  }
}

.photo-capture-content {
  width: 90%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

@media (max-width: 768px) {
  .photo-capture-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    gap: 0;
    justify-content: space-between;
  }
}

.photo-capture-content video {
  width: 100%;
  border-radius: 12px;
  background: black;
  object-fit: contain; /* Mantém proporção 1:1, não estica */
}

@media (max-width: 768px) {
  .photo-capture-content video {
    border-radius: 0;
    height: calc(100vh - 120px);
    object-fit: cover;
  }
}

/* Flash button */
.btn-flash {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

@media (max-width: 768px) {
  .btn-flash {
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

.btn-flash:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.btn-flash.flash-on {
  background: rgba(255, 193, 7, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.6);
}

.btn-flash.flash-on .flash-icon {
  animation: flash-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes flash-pulse {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

.photo-capture-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-capture,
.btn-cancel {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

@media (max-width: 768px) {
  .btn-capture,
  .btn-cancel {
    padding: 18px 24px;
    font-size: 18px;
    min-height: 56px;
  }

  .photo-capture-actions {
    gap: 12px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
  }
}

.btn-capture {
  background: var(--primary);
  color: white;
  flex: 1;
}

.btn-capture:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.btn-cancel {
  background: #f44336;
  color: white;
  flex: 0.5;
}

.btn-cancel:hover {
  background: #d32f2f;
  transform: scale(1.05);
}

/* ============================================
   PHOTO SELECTOR MODAL (Drag & Drop + File + Camera)
   ============================================ */

.photo-selector-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15000;
}

.photo-selector-content {
  background: #2c2c2c;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.photo-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #404040;
}

.photo-selector-header h3 {
  margin: 0;
  color: #4CAF50;
  font-size: 20px;
}

/* Prevenir duplicação de ícones */
.photo-selector-header h3::before,
.photo-selector-header h3::after {
  content: none !important;
  display: none !important;
}

.btn-close-photo-modal {
  background: none;
  border: none;
  color: #999;
  font-size: 28px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-close-photo-modal:hover {
  background: #404040;
  color: #fff;
}

.photo-selector-body {
  padding: 24px;
}

.photo-preview-area {
  border: 3px dashed #4CAF50;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(76, 175, 80, 0.05);
  transition: all 0.3s;
  margin-bottom: 20px;
}

.photo-preview-area.drag-over {
  background: rgba(76, 175, 80, 0.15);
  border-color: #66BB6A;
  transform: scale(1.02);
}

.photo-preview-area p {
  color: #aaa;
  margin: 0;
  font-size: 1rem;
}

.photo-preview-area img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: contain; /* Mantém proporção, não estica */
}

.photo-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-photo-action {
  flex: 1;
  padding: 12px 20px;
  background: #404040;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
  text-align: center;
}

.btn-photo-action:hover {
  background: #4a4a4a;
  transform: translateY(-2px);
}

.btn-file-input {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-confirm-photo {
  width: 100%;
  padding: 14px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm-photo:hover {
  background: #45a049;
  transform: scale(1.02);
}

/* ============================================
   PHOTO VIEW MODAL (View + Delete + Replace)
   ============================================ */

.photo-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 16000;
}

.photo-view-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.photo-view-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.btn-close-view {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close-view:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.photo-view-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn-edit-photo,
.btn-delete-photo,
.btn-replace-photo {
  flex: 1;
  max-width: 200px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Prevenir duplicação de ícones globalmente (PC e Mobile) */
.btn-edit-photo::before,
.btn-edit-photo::after,
.btn-delete-photo::before,
.btn-delete-photo::after,
.btn-replace-photo::before,
.btn-replace-photo::after,
.btn-capture::before,
.btn-capture::after,
.btn-cancel::before,
.btn-cancel::after,
.btn-photo-action::before,
.btn-photo-action::after,
.btn-open-camera-item::before,
.btn-open-camera-item::after,
.btn-open-camera-app::before,
.btn-open-camera-app::after,
.btn-file-input::before,
.btn-file-input::after,
.btn-close-view::before,
.btn-close-view::after,
.btn-close-editor::before,
.btn-close-editor::after,
.btn-close-photo-modal::before,
.btn-close-photo-modal::after,
.btn-confirm-photo::before,
.btn-confirm-photo::after,
.btn-confirm-photo-item::before,
.btn-confirm-photo-item::after,
.btn-save-editor::before,
.btn-save-editor::after,
.btn-cancel-editor::before,
.btn-cancel-editor::after,
.btn-undo::before,
.btn-undo::after,
.btn-clear::before,
.btn-clear::after,
.tool-btn::before,
.tool-btn::after,
.photo-view-actions button::before,
.photo-view-actions button::after,
.photo-actions button::before,
.photo-actions button::after,
.photo-capture-actions button::before,
.photo-capture-actions button::after,
.photo-editor-actions button::before,
.photo-editor-actions button::after,
.photo-editor-toolbar button::before,
.photo-editor-toolbar button::after,
.photo-editor-header h3::before,
.photo-editor-header h3::after {
  content: none !important;
  display: none !important;
}

.btn-edit-photo {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-edit-photo:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-delete-photo {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-delete-photo:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

/* Reduzir botões de foto no mobile */
@media (max-width: 768px) {
  .btn-photo-action {
    padding: 5px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
  }

  .btn-edit-photo,
  .btn-delete-photo,
  .btn-replace-photo {
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
    max-width: 100px;
    gap: 4px;
  }

  .photo-view-actions {
    gap: 6px;
    margin-top: 0.75rem;
  }
}
}

.draft-item:hover {
  background: #e9ecef;
}

.draft-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}

.draft-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.draft-actions {
  display: flex;
  gap: 0.5rem;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* ============================================
   SIGNATURE PAD (Firmas Digitales)
   ============================================ */

.firmas-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.signature-section {
  margin-bottom: 0;
  padding: 1rem;
  background: var(--surface);
  border-radius: 8px;
}

.signature-section h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.signature-pad-container {
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.signature-pad-container:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.signature-placeholder {
  color: var(--text-secondary);
  font-size: 1.1rem;
  text-align: center;
  padding: 2rem;
}

.signature-pad-container.has-signature {
  padding: 0.5rem;
}

.signature-preview {
  width: 100%;
  height: auto;
  max-height: 200px;
  border-radius: 4px;
}

.signature-remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

/* Modal de assinatura */
.modal-signature .modal-content {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  overflow-y: auto;
}

.signature-canvas-large {
  width: 100%;
  min-width: 280px;
  max-width: 700px;
  height: 300px;
  border: 2px dashed var(--border);
  border-radius: 4px;
  cursor: crosshair;
  touch-action: none;
  background: white;
  display: block;
  margin: 0 auto;
}

.signature-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .modal-signature .modal-content {
    max-width: 98vw;
    max-height: 85vh;
    padding: 0.75rem;
  }
  
  .signature-canvas-large {
    height: 250px;
    min-width: 260px;
  }
  
  .signature-modal-actions {
    gap: 0.5rem;
  }
  
  .signature-modal-actions .btn {
    flex: 1;
    min-width: 120px;
  }
}

.signature-canvas {
  width: 100%;
  height: 200px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  cursor: crosshair;
  touch-action: none;
  background: white;
}

.signature-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 1.3rem;
  }

  header {
    padding: 0.75rem;
  }

  .tab-navigation {
    top: 65px;
  }

  .tab-btn {
    padding: 0.6rem 0.4rem;
    font-size: 0.7rem;
  }

  .tab-icon {
    font-size: 1.1rem;
  }

  .card {
    padding: 0.75rem;
  }

  .card h2 {
    font-size: 1.1rem;
  }

  .fab {
    width: 56px;
    height: 56px;
    bottom: 120px;
    right: 16px;
  }

  .fab-icon {
    font-size: 1.5rem;
  }

  .bottom-action-bar {
    padding: 0.4rem;
    gap: 0.4rem;
  }

  .btn-action {
    padding: 0.5rem 0.3rem;
    font-size: 0.7rem;
  }

  .signature-canvas {
    height: 150px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.2rem;
  }

  header {
    padding: 0.6rem;
  }

  .subtitle {
    font-size: 0.75rem;
  }

  .tab-navigation {
    top: 55px;
  }

  .tab-btn {
    min-width: 70px;
    padding: 0.5rem 0.3rem;
  }

  .tab-label {
    font-size: 0.65rem;
  }

  .card {
    border-radius: 8px;
    padding: 0.6rem;
    margin-bottom: 0.75rem;
  }

  .card h2 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .form-field {
    margin-bottom: 0.6rem;
  }

  .form-field label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }

  .form-field input,
  .form-field textarea {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  textarea {
    min-height: 60px;
  }

  .fab {
    width: 52px;
    height: 52px;
    bottom: 115px;
    right: 12px;
  }

  .fab-icon {
    font-size: 1.4rem;
  }

  .bottom-action-bar {
    padding: 0.3rem;
  }

  .btn-action {
    padding: 0.4rem 0.2rem;
    font-size: 0.65rem;
    border-radius: 6px;
  }

  .signature-section {
    padding: 0.75rem;
  }

  .signature-canvas {
    height: 120px;
  }

  .state-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .state-modal-checkboxes {
    padding: 8px 12px;
    max-height: 50vh;
  }

  .state-checkbox-label {
    padding: 5px 6px;
    margin-bottom: 3px;
    font-size: 0.85rem;
  }

  .state-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin-right: 6px;
  }

  .state-modal-footer {
    padding: 10px 12px;
  }

  .btn-modal-cancel,
  .btn-modal-confirm {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .modal-content {
    max-height: 95vh;
  }
}

/* ============================================
   HOURS TABLE (Tabela de Horas Trabalhadas)
   ============================================ */
.hours-table-container {
  overflow-x: auto;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: white;
}

.hours-table thead {
  background: var(--primary);
  color: white;
}

.hours-table th {
  padding: 1rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1.3;
}

.hours-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.hours-table tbody tr:hover:not(.total-row) {
  background: var(--surface);
}

.hours-table td {
  padding: 0.5rem;
  text-align: center;
  border: 1px solid var(--border);
}

.hours-table td:first-child {
  font-weight: 600;
  background: var(--surface);
}

.hours-table input {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}

.hours-table input.date-input {
  min-width: 120px;
}

.hours-table input.hours-input {
  min-width: 60px;
  max-width: 80px;
}

.hours-table input.comment-input {
  text-align: left;
  min-width: 150px;
}

.hours-table input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* ============================================
   PHOTO EDITOR MODAL
   ============================================ */

.photo-editor-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 25000;
  padding: 20px;
}

.photo-editor-container {
  background: #2c2c2c;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.photo-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 2px solid #404040;
  background: #1e1e1e;
}

.photo-editor-header h3 {
  margin: 0;
  color: #4CAF50;
  font-size: 20px;
}

.btn-close-editor {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-close-editor:hover {
  background: rgba(255, 255, 255, 0.1);
}

.photo-editor-toolbar {
  display: flex;
  gap: 20px;
  padding: 12px 20px;
  background: #252525;
  border-bottom: 1px solid #404040;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-section {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px;
  background: #1e1e1e;
  border-radius: 8px;
}

.tool-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #404040;
  background: #2c2c2c;
  color: #fff;
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-btn:hover {
  background: #383838;
  border-color: #4CAF50;
}

.tool-btn.active {
  background: #4CAF50;
  border-color: #4CAF50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.color-picker-label,
.line-width-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
}

#color-picker {
  width: 50px;
  height: 40px;
  border: 2px solid #404040;
  border-radius: 6px;
  cursor: pointer;
  background: none;
}

#line-width {
  width: 100px;
}

#line-width-value {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
  color: #4CAF50;
}

.btn-undo,
.btn-clear {
  width: 40px;
  height: 40px;
  border: 2px solid #404040;
  background: #2c2c2c;
  color: #fff;
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-undo:hover {
  background: #007BFF;
  border-color: #007BFF;
}

.btn-clear:hover {
  background: #f44336;
  border-color: #f44336;
}

.photo-editor-canvas-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1a1a1a;
  padding: 20px;
  overflow: auto;
  position: relative;
}

#photo-editor-canvas {
  max-width: 100%;
  max-height: 100%;
  border: 2px solid #404040;
  border-radius: 8px;
  cursor: crosshair;
  background: white;
}

.text-input-overlay {
  position: fixed;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 2px solid #4CAF50;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  outline: none;
  z-index: 30000;
}

.photo-editor-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: #1e1e1e;
  border-top: 2px solid #404040;
}

.btn-cancel-editor,
.btn-save-editor {
  flex: 1;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel-editor {
  background: #666;
  color: white;
}

.btn-cancel-editor:hover {
  background: #555;
  transform: scale(1.02);
}

.btn-save-editor {
  background: #4CAF50;
  color: white;
}

.btn-save-editor:hover {
  background: #45a049;
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .photo-editor-modal {
    padding: 0;
  }

  .photo-editor-container {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .photo-editor-header {
    padding: 14px 16px;
  }

  .photo-editor-header h3 {
    font-size: 18px;
  }

  .photo-editor-toolbar {
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
  }

  .photo-editor-toolbar button {
    min-width: 48px;
    min-height: 48px;
    font-size: 18px;
  }

  .photo-editor-actions {
    padding: 16px;
    gap: 12px;
  }

  .btn-cancel-editor,
  .btn-save-editor {
    padding: 16px 20px;
    font-size: 17px;
    min-height: 52px;
  }

  .photo-editor-canvas-container {
    height: calc(100vh - 240px);
  }
}
  
  .toolbar-section {
    gap: 4px;
  }
  
  .tool-btn,
  .btn-undo,
  .btn-clear {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  #color-picker {
    width: 40px;
    height: 35px;
  }
  
  #line-width {
    width: 80px;
  }
}

.hours-table .total-row {
  background: var(--surface);
  font-weight: bold;
  border-top: 2px solid var(--primary);
}

.hours-table .total-row td {
  padding: 0.75rem;
  font-size: 1rem;
  color: var(--primary);
}

/* Week tabs for dual-week mode */
.weeks-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--surface);
}

.week-tab {
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.week-tab:hover {
  background: var(--background);
  color: var(--text);
}

.week-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--background);
  font-weight: 600;
}

/* Campos de semana compactos */
#semana,
#semana2 {
  min-width: 60px;
  max-width: 80px;
  text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hours-table {
    font-size: 0.75rem;
  }

  .hours-table th {
    padding: 0.5rem 0.25rem;
    font-size: 0.7rem;
  }

  .hours-table td {
    padding: 0.3rem;
  }

  .hours-table input {
    padding: 0.3rem;
    font-size: 0.8rem;
  }

  .hours-table input.date-input {
    min-width: 100px;
  }

  .hours-table input.hours-input {
    min-width: 50px;
    max-width: 60px;
  }

  .hours-table input.comment-input {
    min-width: 100px;
  }
}

/* ============================================
   EQUIPMENT SELECTOR & TABS
   ============================================ */

.equipment-selector-card {
  background: white;
  border-left: 4px solid var(--primary);
}

.equipment-selector-card h2 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.equipment-config {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.equipment-config .form-field {
  flex: 1;
  max-width: 300px;
}

.equipment-config label {
  color: var(--text-secondary);
  font-weight: 500;
}

#num-equipments {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

#num-equipments:hover {
  border-color: var(--primary);
}

#num-equipments:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Seletor de tipo de equipamento (categoria) dentro de cada card de equipamento */
.equipment-type-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.equipment-type-selector label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.equipment-type-selector select {
  flex: 1;
  max-width: 320px;
  padding: 8px 10px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.equipment-type-selector select:hover {
  border-color: var(--primary);
}

.equipment-type-selector select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.equipment-tabs {
  display: flex;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scroll-behavior: smooth;
}

.equipment-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.equipment-tab:hover {
  border-color: var(--primary);
  background: rgba(0, 123, 255, 0.05);
}

.equipment-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.equipment-icon {
  font-size: 16px;
}

.equipment-label {
  font-size: 14px;
  flex: 1;
}

.btn-edit-equipment-name {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
  font-size: 14px;
  margin-left: 4px;
}

.btn-edit-equipment-name:hover {
  opacity: 1;
  transform: scale(1.1);
}

.equipment-tab.active .btn-edit-equipment-name {
  color: white;
}

.equipment-container {
  display: none;
}

.equipment-container.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .equipment-tabs {
    padding: 0.5rem;
    gap: 4px;
  }
  
  .equipment-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .equipment-icon {
    font-size: 16px;
  }
}

/* Checkbox group styling */
.checkbox-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.checkbox-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-label span {
  font-size: 0.95rem;
  color: var(--text);
}
/* ============================================
   ENGINEER & WEEK TABS
   ============================================ */

/* Engineer Fields Container - Compact Style */
#engineers-fields-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

#engineers-fields-container .engineer-field-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  align-items: center;
}

#engineers-fields-container .engineer-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

#engineers-fields-container .form-field {
  margin: 0;
}

#engineers-fields-container .form-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  display: block;
}

#engineers-fields-container .form-field input {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

#engineers-fields-container .form-field input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* Engineer Tabs (Main Level) */
.engineer-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.engineer-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  bottom: -2px;
}

.engineer-tab:hover {
  background: var(--surface);
  border-color: var(--primary);
}

.engineer-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

.engineer-tab-icon {
  font-size: 1.2rem;
}

.engineer-tab-name {
  font-weight: inherit;
}

/* Week Tabs (Sub Level) */
.week-tabs-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: var(--surface);
  border-radius: 6px;
}

.week-tab {
  padding: 0.6rem 1.2rem;
  background: white;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.week-tab:hover {
  background: var(--surface);
  border-color: var(--primary);
}

.week-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

/* Hours Table Wrapper */
.hours-table-wrapper {
  margin-top: 1rem;
}

/* Mobile Responsiveness for Tabs */
@media (max-width: 768px) {
  .engineer-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .engineer-tab {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .week-tabs-container {
    flex-wrap: wrap;
  }

  .week-tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    flex: 1;
    min-width: 120px;
  }
}

/* Engineer Fields Container */
#engineers-fields-container {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

#engineers-fields-container .form-row {
  background: var(--surface);
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
/* ══════════════════════════════════════════════════════════════
   TELA DE LOGIN — v2
══════════════════════════════════════════════════════════════ */

#login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
  z-index: 9999;
  padding: 1rem;
}

#login-screen.hidden {
  display: none !important;
}

#app-content.hidden {
  display: none !important;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 0.75rem;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.login-field {
  margin-bottom: 1.25rem;
}

.login-field label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.login-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.login-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.login-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-password-wrap input {
  padding-right: 3rem;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  color: var(--text-secondary);
}

.login-error {
  color: var(--danger);
  font-size: 0.875rem;
  min-height: 1.25rem;
  margin: -0.5rem 0 0.75rem;
  text-align: center;
}

.login-btn {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 0.5rem;
}

/* Nome do usuário logado no header */
#logged-user-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

/* Botão de logout no header */
#btn-logout {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all 0.2s;
}

#btn-logout:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Modal "Meus Relatórios" ── */
.reports-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.reports-modal-overlay.hidden {
  display: none;
}

.reports-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.reports-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--primary);
}

.reports-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary);
}

.reports-modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
}

.reports-modal-body {
  padding: 0.5rem 1rem 1rem;
  overflow-y: auto;
}

.reports-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem 1rem;
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.report-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.report-row-client {
  font-weight: 600;
  color: var(--text);
}

.report-row-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.report-row-side {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.report-row-badge {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.report-row-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.7;
}

.report-row-delete:hover {
  opacity: 1;
}

/* ── Câmera in-app (visor ao vivo + revisão) ── */
.cam-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.cam-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cam-video,
.cam-review-img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.cam-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.75rem;
  z-index: 2;
}

.cam-top-right {
  display: flex;
  gap: 0.5rem;
}

.cam-btn {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.cam-torch-on {
  background: #f5c518;
  color: #000;
}

.cam-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 1rem max(1.25rem, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.4);
}

.cam-shutter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: transform 0.1s;
}

.cam-shutter:active {
  transform: scale(0.92);
}

.cam-shutter:disabled {
  opacity: 0.5;
}

.cam-controls-review .cam-btn {
  font-size: 1.05rem;
  padding: 0.8rem 1.6rem;
}

.cam-use {
  background: var(--primary, #4CAF50);
}

/* ── Editor de fotos (Fabric.js) ── */
.pe-modal {
  position: fixed;
  inset: 0;
  background: #1a1a1a;
  z-index: 2100;
  display: flex;
  flex-direction: column;
}

.pe-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: max(0.5rem, env(safe-area-inset-top)) 0.6rem 0.5rem;
  background: #2a2a2a;
}

.pe-tool,
.pe-action {
  background: #3a3a3a;
  color: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.pe-tool.active {
  border-color: var(--primary, #4CAF50);
  background: #1f3a23;
}

.pe-sep {
  width: 1px;
  align-self: stretch;
  background: #555;
  margin: 0 0.2rem;
}

.pe-color {
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.pe-width {
  width: 90px;
}

.pe-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 10px;
}

.pe-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 1rem max(0.8rem, env(safe-area-inset-bottom));
  background: #2a2a2a;
}

.pe-btn {
  background: #3a3a3a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  cursor: pointer;
}

.pe-save {
  background: var(--primary, #4CAF50);
}

.pe-crop-confirm {
  background: #2196F3;
}

/* ── Badge de itens pendentes de sincronização ── */
#btn-my-reports {
  position: relative;
}

.sync-pending-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* ── Indicador de conexão no cabeçalho ── */
.conn-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--surface, #f1f3f5);
}

.conn-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9e9e9e;
  flex-shrink: 0;
}

.conn-online .conn-dot { background: #2e7d32; }
.conn-offline .conn-dot { background: #e53935; }
.conn-syncing .conn-dot { background: #1e88e5; animation: conn-pulse 1s infinite; }

@keyframes conn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (max-width: 600px) {
  .conn-status .conn-label { display: none; }
}

/* ── Telas de administração ── */
.admin-modal-content { max-width: 720px; }

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.admin-form {
  background: var(--surface, #f8f9fa);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.admin-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.admin-field { display: flex; flex-direction: column; gap: 0.2rem; }
.admin-field label { font-size: 0.8rem; color: var(--text-secondary); }
.admin-field input {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.admin-list { display: flex; flex-direction: column; }

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

.admin-row small { color: var(--text-secondary); font-weight: 400; }

.admin-edit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
}
.admin-edit:hover { opacity: 1; }
