/* Reset y variables */
:root {
  --primary-color: #4A5568;
  --primary-dark: #2D3748;
  --primary-light: #E2E8F0;
  --accent-color: #277DAF;
  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-light: #1A202C;
  --text-lighter: #718096;
  --divider-color: #E2E8F0;
  --error-color: #F44336;
  --success-color: #4CAF50;
  --background: #F7FAFC;
  --card-background: #FFFFFF;
  --dark-bg: #FFFFFF;
  --dark-card: #FFFFFF;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.2);
  --header-height: 56px;
  --safe-area-top: env(safe-area-inset-top, 0);
  --safe-area-bottom: env(safe-area-inset-bottom, 0);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app-container {
  min-height: 100vh;
  background: var(--background);
}

/* Login Container */
.container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #F7FAFC 0%, #E2E8F0 100%);
}

.login-box {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 40px 30px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-dark);
  animation: slideUp 0.3s ease-out;
  border: 1px solid var(--divider-color);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  text-align: center;
  margin-bottom: 24px;
}

.logo img {
  max-width: 120px;
  height: auto;
}

h1 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--text-light);
}

.subtitle {
  text-align: center;
  color: var(--text-lighter);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-light);
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--divider-color);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #FFFFFF;
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  -webkit-appearance: none;
  appearance: none;
}

/* Evitar que el autocomplete cambie los colores */
.form-group input[type="text"]:-webkit-autofill,
.form-group input[type="password"]:-webkit-autofill,
.form-group input[type="text"]:-webkit-autofill:hover,
.form-group input[type="password"]:-webkit-autofill:hover,
.form-group input[type="text"]:-webkit-autofill:focus,
.form-group input[type="password"]:-webkit-autofill:focus,
.form-group input[type="text"]:-webkit-autofill:active,
.form-group input[type="password"]:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  -webkit-text-fill-color: #1A202C !important;
  box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  background-color: #FFFFFF !important;
  color: #1A202C !important;
  transition: background-color 5000s ease-in-out 0s;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 48px;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-lighter);
  transition: color 0.2s ease;
  border-radius: 4px;
}

.toggle-password-btn:hover {
  color: var(--accent-color);
}

.toggle-password-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(39, 125, 175, 0.2);
  background: #FFFFFF !important;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder {
  color: var(--text-lighter);
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
  font-weight: normal;
  color: var(--text-lighter);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--accent-color);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 14px 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;
  position: relative;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--accent-color);
  color: #FFFFFF;
  margin-top: 8px;
  font-weight: 700;
}

.btn-primary:active {
  transform: scale(0.98);
  background: #1E6A9A;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--divider-color);
  margin-top: 12px;
}

.btn-secondary:active {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--text-secondary);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
}

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

/* Error Message */
.error-message {
  background: #FFEBEE;
  color: var(--error-color);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  border-left: 4px solid var(--error-color);
}

/* Offline Notice */
.offline-notice {
  background: #FFF3E0;
  color: #F57C00;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  border-left: 4px solid #F57C00;
  display: flex;
  align-items: center;
  gap: 8px;
}

.offline-notice svg {
  flex-shrink: 0;
}

/* Install Prompt */
.install-prompt {
  margin-top: 24px;
  padding: 16px;
  background: #F7FAFC;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--divider-color);
}

.install-prompt p {
  font-size: 14px;
  color: var(--text-lighter);
  margin-bottom: 12px;
}

/* Map View Styles */
.map-view {
  overflow: hidden;
  background: var(--background);
}

#map-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Header */
.map-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding-top: var(--safe-area-top);
  background: var(--card-background);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  z-index: 1000;
}

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

.map-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF3E0;
  color: #F57C00;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 8px;
}

.offline-badge svg {
  flex-shrink: 0;
}

/* App Header for Assignments */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + env(safe-area-inset-top, 0));
  padding-top: env(safe-area-inset-top, 0);
  background: var(--card-background);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  z-index: 1000;
}

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

.app-title h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
  touch-action: manipulation;
}

.icon-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

/* Map Controls Top Left */
.map-controls-top-left {
  position: absolute;
  left: 16px;
  top: calc(80px + env(safe-area-inset-top, 0));
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 900;
}

/* Map Controls */
.map-controls {
  position: absolute;
  right: 16px;
  bottom: calc(100px + var(--safe-area-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 900;
}

.control-btn {
  width: 48px;
  height: 48px;
  background: var(--card-background);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.control-btn:active {
  transform: scale(0.95);
  background: var(--primary-light);
}

/* Side Menu */
.side-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: var(--card-background);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  transition: left 0.3s ease;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.side-menu.open {
  left: 0;
}

.menu-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--divider-color);
}

.menu-header h3 {
  font-size: 20px;
  color: var(--text-primary);
}

.menu-content {
  padding: 8px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.2s ease;
  cursor: pointer;
}

.menu-item:active {
  background: rgba(0, 0, 0, 0.05);
}

.menu-item.active {
  color: var(--primary-color);
  background: var(--primary-light);
}

.menu-item span {
  font-size: 16px;
  font-weight: 500;
}

/* Menu List Styles */
.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.menu-list li {
  margin: 0;
}

.menu-list a,
.menu-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 15px;
  font-family: inherit;
}

.menu-list a:hover,
.menu-item-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

.menu-list a:active,
.menu-item-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

.menu-list a.active {
  color: var(--accent-color);
  background: rgba(39, 125, 175, 0.1);
}

.menu-list svg {
  flex-shrink: 0;
}

/* Menu Header */
.menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--divider-color);
}

.menu-header img {
  border-radius: 8px;
}

.menu-header h2 {
  font-size: 18px;
  color: var(--text-primary);
  margin: 0;
}

/* Side Menu */
.side-menu {
  background: var(--card-background);
  display: flex;
  flex-direction: column;
  max-height: 100vh;
}

.side-menu.active {
  left: 0;
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Layer Panel */
.layer-panel {
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0));
  left: -280px;
  width: 260px;
  height: calc(100vh - var(--header-height) - env(safe-area-inset-top, 0));
  background: var(--card-background);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  z-index: 950;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--divider-color);
}

.layer-panel.open {
  left: 0;
}

.layer-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.layer-panel-header h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text-light);
}

.icon-btn-small {
  background: transparent;
  border: none;
  color: var(--text-lighter);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.icon-btn-small:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.icon-btn-small:active {
  transform: scale(0.95);
}

.layers-tree {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.empty-layers {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-lighter);
  font-size: 14px;
  text-align: center;
}

.layer-group {
  margin-bottom: 4px;
}

.layer-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.layer-group-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.layer-group-header:active {
  transform: scale(0.98);
}

.expand-icon {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--text-lighter);
}

.expand-spacer {
  width: 16px;
  flex-shrink: 0;
}

.group-checkbox {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.group-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  flex: 1;
}

.layer-group-content {
  display: none;
  padding-left: 24px;
  margin-top: 4px;
}

.layer-group.expanded > .layer-group-content {
  display: block;
}

.layer-item {
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.layer-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.layer-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.layer-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-color);
}

.layer-name {
  font-size: 14px;
  color: var(--text-light);
  flex: 1;
}


/* Tablet Styles */
@media (min-width: 768px) {
  .login-box {
    padding: 48px 40px;
  }

  h1 {
    font-size: 32px;
  }

  .side-menu {
    width: 320px;
    left: -320px;
  }
}

/* Large Tablet / Desktop */
@media (min-width: 1024px) {
  .map-controls {
    right: 24px;
    bottom: calc(120px + var(--safe-area-bottom));
  }

  .control-btn {
    width: 56px;
    height: 56px;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
  .container {
    padding: 10px;
  }

  .login-box {
    padding: 24px 30px;
    max-width: 450px;
  }

  h1 {
    font-size: 24px;
  }

  .subtitle {
    margin-bottom: 20px;
  }

  .form-group {
    margin-bottom: 16px;
  }
}

/* Dark mode support - desactivado temporalmente
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #E0E0E0;
    --text-secondary: #BDBDBD;
    --background: #121212;
    --card-background: #1E1E1E;
    --divider-color: #424242;
  }

  .form-group input[type="text"],
  .form-group input[type="password"] {
    background: #2C2C2C;
    border-color: #424242;
    color: var(--text-primary);
  }

  .icon-btn:active {
    background: rgba(255, 255, 255, 0.05);
  }

  .menu-item:active {
    background: rgba(255, 255, 255, 0.05);
  }
}
*/

/* Assignments Page Styles */
.assignments-container {
  padding: 0 0 var(--safe-area-bottom);
  max-width: 1200px;
  margin: 0 auto;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0) + 136px);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.spinner-large {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(39, 125, 175, 0.2);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader p {
  color: var(--text-lighter);
  font-size: 14px;
}

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--card-background);
  border-bottom: 1px solid var(--divider-color);
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0));
  left: 0;
  right: 0;
  z-index: 1000;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 8px 16px;
  background: #F7FAFC;
  border: 1px solid var(--divider-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn:active {
  transform: scale(0.95);
}

.filter-btn.active {
  background: var(--accent-color);
  color: #FFFFFF;
  border-color: var(--accent-color);
  font-weight: 600;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  padding: 16px;
  background: var(--card-background);
  border-bottom: 1px solid var(--divider-color);
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0) + 48px);
  left: 0;
  right: 0;
  z-index: 999;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid var(--divider-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn:active {
  transform: scale(0.98);
}

.tab-btn.active {
  background: var(--accent-color);
  color: #FFFFFF;
  border-color: var(--accent-color);
  font-weight: 600;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Assignments List */
.assignments-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.assignment-card {
  background: var(--card-background);
  border: 1px solid var(--divider-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-content {
  padding: 16px;
  cursor: pointer;
}

.card-content:active {
  background: rgba(0, 0, 0, 0.02);
}

.work-order-card {
  border-left: 4px solid #277DAF;
}

.issue-card {
  border-left: 4px solid #EF4444;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-lighter);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-id {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-color);
  background: rgba(39, 125, 175, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.card-dates {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.card-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-lighter);
  white-space: nowrap;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-status {
  background: rgba(74, 85, 104, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(74, 85, 104, 0.2);
}

.badge-priority {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-primary);
  font-weight: 600;
  border: 1px solid rgba(156, 163, 175, 0.2);
}

/* Prioridad Baja - Gris estándar */
.priority-l,
.priority-baja,
.priority-low {
  background: rgba(156, 163, 175, 0.1);
  color: #6B7280;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Prioridad Media - Azul */
.priority-m,
.priority-media,
.priority-medium {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Prioridad Alta - Naranja */
.priority-h,
.priority-alta,
.priority-high {
  background: rgba(249, 115, 22, 0.1);
  color: #EA580C;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Prioridad Crítica/Urgente - Rojo */
.priority-u,
.priority-urgente {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-location {
  background: rgba(34, 197, 94, 0.1);
  color: #16A34A;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
}

.badge-location:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

.badge-location:active {
  transform: translateY(0);
}

.badge-location svg {
  flex-shrink: 0;
}

.card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: var(--text-lighter);
}

.card-location svg {
  flex-shrink: 0;
}

.card-footer {
  border-top: 1px solid var(--divider-color);
  padding: 0;
}

.card-map-btn {
  width: 100%;
  padding: 12px 16px;
  background: rgba(39, 125, 175, 0.1);
  border: none;
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card-map-btn:hover {
  background: rgba(39, 125, 175, 0.15);
}

.card-map-btn:active {
  background: rgba(39, 125, 175, 0.2);
  transform: scale(0.98);
}

.card-map-btn svg {
  flex-shrink: 0;
}

.empty-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-lighter);
  font-size: 14px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-lighter);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--text-light);
}

.empty-state p {
  margin: 0;
  font-size: 14px;
  max-width: 300px;
}

/* User name badge in header */
.user-name-badge {
  font-size: 12px;
  color: var(--text-lighter);
  font-weight: 500;
}

/* Modal de detalle */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--card-background);
  border-radius: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  box-shadow: none;
  animation: modalSlideUp 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-header {
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0));
  border-bottom: 1px solid var(--divider-color);
  position: relative;
  flex-shrink: 0;
  background: var(--card-background);
}

.close-btn-header {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0));
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  z-index: 10;
}

.close-btn-header:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.close-btn-header:active {
  transform: scale(0.95);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-lighter);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.close-btn:active {
  transform: scale(0.95);
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detail-meta .badge-location {
  margin-left: auto;
}

.detail-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-lighter);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.detail-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
}

.detail-dates {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-date-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #F7FAFC;
  border-radius: 6px;
  border: 1px solid var(--divider-color);
}

.detail-date-row {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: #F7FAFC;
  border-radius: 6px;
  border: 1px solid var(--divider-color);
}

.detail-date-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-date-label {
  font-size: 13px;
  color: var(--text-lighter);
}

.detail-date-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #F7FAFC;
  border-radius: 6px;
  border: 1px solid var(--divider-color);
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.detail-location svg {
  flex-shrink: 0;
  color: var(--accent-color);
}

.btn-map {
  width: 100%;
  padding: 12px 16px;
  background: var(--accent-color);
  color: #1A202C;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-map:active {
  transform: scale(0.98);
  background: #1F6A94;
}

.detail-loader {
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.detail-loader p {
  color: var(--text-lighter);
  font-size: 14px;
}

/* Detail Info List */
.detail-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #F7FAFC;
  border-radius: 6px;
  border: 1px solid var(--divider-color);
  gap: 12px;
}

.detail-info-label {
  font-size: 13px;
  color: var(--text-lighter);
  flex-shrink: 0;
}

.detail-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* Assets List */
.assets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.asset-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: #F7FAFC;
  border-radius: 8px;
  border: 1px solid var(--divider-color);
  transition: all 0.2s;
  text-align: center;
}

.asset-item:active {
  background: rgba(0, 0, 0, 0.02);
  transform: scale(0.98);
}

.asset-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 125, 175, 0.15);
  border-radius: 6px;
  color: var(--accent-color);
}

.asset-icon svg {
  width: 16px;
  height: 16px;
}

.asset-icon.has-thumbnail {
  background: none;
  overflow: hidden;
}

.asset-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.asset-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.asset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-type {
  font-size: 11px;
  color: var(--accent-color);
  font-weight: 500;
}

.asset-description {
  font-size: 11px;
  color: var(--text-lighter);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tablet: más items por fila */
@media (min-width: 500px) {
  .assets-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Inventory List */
.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inventory-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #F7FAFC;
  border-radius: 8px;
  border: 1px solid var(--divider-color);
  transition: all 0.2s;
}

.inventory-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 161, 105, 0.15);
  border-radius: 8px;
  color: #38A169;
}

.inventory-qty-box {
  flex-shrink: 0;
  width: 48px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(56, 161, 105, 0.15);
  border-radius: 8px;
  padding: 4px;
}

.inventory-qty-number {
  font-size: 18px;
  font-weight: 700;
  color: #38A169;
  line-height: 1.1;
}

.inventory-qty-unit {
  font-size: 10px;
  font-weight: 500;
  color: #38A169;
  text-transform: uppercase;
  line-height: 1.2;
}

.inventory-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inventory-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.inventory-category {
  font-size: 12px;
  color: #38A169;
  font-weight: 500;
}

.inventory-description {
  font-size: 12px;
  color: var(--text-lighter);
  line-height: 1.4;
}

.inventory-quantity {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(56, 161, 105, 0.1);
  border-radius: 4px;
  width: fit-content;
}

.inventory-quantity .quantity-value {
  font-size: 14px;
  font-weight: 600;
  color: #38A169;
}

.inventory-quantity .quantity-unit {
  font-size: 12px;
  color: var(--text-lighter);
}

/* Subtasks List */
.subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #F7FAFC;
  border-radius: 6px;
  border: 1px solid var(--divider-color);
}

.subtask-item svg {
  flex-shrink: 0;
  color: var(--accent-color);
}

.subtask-name {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.subtasks-indented {
  margin-left: 24px;
  margin-top: 8px;
}

.subtask-child {
  padding: 8px 10px;
  background: #EDF2F7;
}

.subtask-child .subtask-name {
  font-size: 13px;
}

/* Personnel info */
.personnel-item {
  align-items: flex-start;
}

.personnel-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.personnel-phone {
  font-size: 12px;
  color: var(--text-lighter);
}

/* Checklist Items */
.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #F7FAFC;
  border-radius: 8px;
  border: 1px solid var(--divider-color);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.checklist-item:hover {
  background: #EDF2F7;
  border-color: #CBD5E0;
}

.checklist-item:active {
  transform: scale(0.98);
  background: #E2E8F0;
}

.checklist-item.completed {
  background: rgba(56, 161, 105, 0.08);
  border-color: rgba(56, 161, 105, 0.3);
}

.checklist-item.completed:hover {
  background: rgba(56, 161, 105, 0.15);
  border-color: rgba(56, 161, 105, 0.4);
}

.checklist-checkbox {
  flex-shrink: 0;
  color: var(--text-lighter);
}

.checklist-item.completed .checklist-checkbox {
  color: #38A169;
}

.checklist-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checklist-name {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.checklist-item.completed .checklist-name {
  color: #38A169;
}

.checklist-completed-at {
  font-size: 12px;
  color: var(--text-lighter);
}

/* Section Links (Attachments, Checklists, etc.) */
.section-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-link-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #F7FAFC;
  border-radius: 8px;
  border: 1px solid var(--divider-color);
  transition: all 0.2s;
  cursor: pointer;
}

.section-link-item:active {
  background: rgba(0, 0, 0, 0.02);
  transform: scale(0.98);
}

.section-link-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 125, 175, 0.15);
  border-radius: 8px;
  color: var(--accent-color);
}

.section-link-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.section-link-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-link-desc {
  font-size: 12px;
  color: var(--text-lighter);
  line-height: 1.4;
}

/* Tabs dentro del modal de detalle */
.detail-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid var(--divider-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  background: var(--card-background);
}

.detail-tabs::-webkit-scrollbar {
  display: none;
}

.detail-tab-btn {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-tab-btn:hover {
  color: var(--text-primary);
}

.detail-tab-btn.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  font-weight: 600;
}

.detail-tab-content {
  display: none;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
  flex: 1;
  overflow-y: auto;
}

.detail-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Mensaje vacío para tabs sin contenido */
.tab-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-lighter);
}

.tab-empty-state svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.tab-empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Asset Detail Modal */
.asset-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.asset-detail-container {
  background: var(--card-background);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-dark);
  animation: slideUp 0.3s ease-out;
}

.asset-detail-header {
  position: relative;
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #1e5f8a 100%);
  color: white;
  text-align: center;
}

.asset-detail-header .close-btn-header {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.asset-detail-header .close-btn-header:hover {
  background: rgba(255, 255, 255, 0.3);
}

.asset-detail-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.asset-detail-icon svg {
  width: 32px;
  height: 32px;
}

.asset-detail-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.asset-detail-type {
  font-size: 13px;
  opacity: 0.85;
}

/* Header con foto de fondo */
.asset-detail-header.has-photo-background {
  min-height: 180px;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background-image 0.3s ease;
}

.asset-detail-header.has-photo-background .asset-detail-icon {
  display: none;
}

.asset-detail-header.has-photo-background .asset-detail-title {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.asset-detail-header.has-photo-background .asset-detail-type {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.asset-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.asset-detail-section {
  margin-bottom: 20px;
}

.asset-detail-section:last-child {
  margin-bottom: 0;
}

.asset-detail-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider-color);
}

.asset-detail-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.asset-properties-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-property-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px;
  background: #F7FAFC;
  border-radius: 8px;
  gap: 12px;
}

.asset-property-key {
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
  max-width: 40%;
}

.asset-property-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
}

.asset-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-lighter);
}

.asset-detail-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.asset-detail-empty p {
  margin: 0;
  font-size: 14px;
}

/* Asset item clickable cursor */
.asset-item {
  cursor: pointer;
}

/* Photo Gallery Styles */
.asset-photos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.asset-photos-header .asset-detail-section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.btn-take-photo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-take-photo:hover {
  background: #1e5f8a;
}

.btn-take-photo:active {
  transform: scale(0.98);
}

.asset-photos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  min-height: 60px;
}

.photos-loading,
.photos-empty,
.photos-error,
.photo-saving {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--text-lighter);
  font-size: 13px;
}

.photo-saving {
  flex-direction: row;
  background: rgba(39, 125, 175, 0.1);
  border-radius: 8px;
  padding: 12px;
}

.photos-error {
  color: var(--error-color);
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid var(--divider-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #F7FAFC;
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.photo-item:hover img {
  transform: scale(1.05);
}

.photo-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.photo-item:hover .photo-actions {
  opacity: 1;
}

.btn-delete-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(244, 67, 54, 0.9);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-delete-photo:hover {
  background: #d32f2f;
}

.photo-pending-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(255, 152, 0, 0.9);
  color: white;
  border-radius: 50%;
}

.photo-date {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  font-size: 10px;
  text-align: center;
}

/* Photo Viewer Modal */
.photo-viewer-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2200;
  align-items: center;
  justify-content: center;
}

.photo-viewer-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-viewer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.photo-viewer-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.photo-viewer-image {
  max-width: 95%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 4px;
}

.photo-viewer-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  color: white;
  font-size: 13px;
}

.photo-viewer-info .pending-badge {
  padding: 4px 8px;
  background: rgba(255, 152, 0, 0.8);
  border-radius: 12px;
  font-size: 11px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
