/* ==========================================================================
   BASE CONTROLS & COMPONENTS
   ========================================================================== */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--ds-radius-sm);
  border: 1px solid transparent;
  font-family: var(--ds-font-display);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
  text-decoration: none;
}

.ds-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ds-btn:active:not(:disabled) {
  transform: translateY(0);
}

.ds-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ds-btn-primary {
  background: var(--ds-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(32, 58, 109, 0.22);
}

.ds-btn-primary:hover:not(:disabled) {
  background: var(--ds-primary-hover);
}

.ds-btn-accent {
  background: var(--ds-gradient-cta);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(184, 83, 32, 0.28);
}

.ds-btn-accent:hover:not(:disabled) {
  filter: brightness(1.06);
}

.ds-btn-secondary {
  background: var(--ds-primary-soft);
  color: var(--ds-primary);
  border-color: var(--ds-border);
}

.ds-btn-secondary:hover:not(:disabled) {
  background: var(--ds-secondary-soft);
}

.ds-btn-tertiary {
  background: #FFFFFF;
  color: var(--ds-primary);
  border-color: var(--ds-border);
}

.ds-btn-tertiary:hover:not(:disabled) {
  border-color: var(--ds-primary);
  background: var(--ds-surface-subtle);
}

.ds-btn-ghost {
  background: transparent;
  color: var(--ds-text-muted);
  border-color: transparent;
}

.ds-btn-ghost:hover:not(:disabled) {
  background: var(--ds-primary-soft);
  color: var(--ds-primary);
}

.ds-btn-danger-ghost {
  background: transparent;
  color: var(--ds-danger);
}

.ds-btn-danger-ghost:hover:not(:disabled) {
  background: var(--ds-danger-soft);
}

.ds-btn:focus-visible {
  outline: 3px solid var(--ds-primary);
  outline-offset: 2px;
}

.ds-btn-light {
  background: var(--ds-sand);
  color: var(--ds-primary);
  border-color: transparent;
}

.ds-btn-light:hover:not(:disabled) {
  background: #FFF3D5;
}

.ds-btn-inverse-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.55);
}

.ds-btn-inverse-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

.ds-btn-inverse-outline:focus-visible {
  outline-color: var(--ds-sand);
}

.ds-btn-sm {
  padding: 6px 11px;
  font-size: 11.5px;
  border-radius: 7px;
}

.ds-btn-xs {
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 6px;
}

.ds-btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.ds-btn-icon:hover {
  background: #EFF5FC;
  border-color: #BFD2EA;
  color: var(--ds-primary);
}

.ds-btn-icon:focus-visible {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.ds-btn-icon:active {
  transform: scale(0.94);
}

.ds-btn-icon.is-danger {
  background: #FFFDFD;
  border-color: #F1D5D5;
  color: #B91C1C;
}

.ds-btn-icon.is-danger:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #DC2626;
}

.ds-btn-edit-icon {
  background: #FFFFFF;
  color: var(--ds-primary);
  border: 1px solid var(--ds-border);
}

.ds-btn-edit-icon:hover {
  background: var(--ds-primary-soft);
  border-color: var(--ds-primary);
}

.ds-btn-edit-icon.is-editing {
  background: var(--ds-accent);
  color: #FFFFFF;
  border-color: var(--ds-accent);
  box-shadow: 0 2px 8px rgba(199, 91, 40, 0.25);
}

.ds-btn-icon.is-inverse {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.ds-btn-icon.is-inverse:hover {
  background: rgba(255, 255, 255, 0.24);
}

.ds-btn-icon.is-inverse.is-editing {
  background: var(--ds-accent);
  border-color: #FFFFFF;
}

.ds-btn-icon.is-inverse-danger {
  background: rgba(185, 28, 28, 0.34);
  color: #FECACA;
  border: 1px solid rgba(252, 165, 165, 0.35);
}

.ds-btn-icon.is-inverse-danger:hover {
  background: rgba(220, 38, 38, 0.52);
}

tr.is-row-editing td {
  background: #FFFDF7 !important;
}

.ds-label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ds-secondary);
}

.ds-input,
.ds-select,
.ds-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--ds-border);
  border-radius: var(--ds-radius-sm);
  background: #FFFFFF;
  color: var(--ds-text);
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ds-input:focus,
.ds-select:focus,
.ds-textarea:focus {
  outline: none;
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px rgba(32, 58, 109, 0.12);
}

.ds-input-compact,
.ds-select-compact {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid #B2C3D8;
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ds-text);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 33, 63, 0.05);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ds-input::placeholder,
.ds-input-compact::placeholder,
.ds-textarea::placeholder {
  color: #566882;
  opacity: 1;
}

.ds-input-compact:focus,
.ds-select-compact:focus {
  outline: none;
  border-color: var(--ds-accent);
  background: #FFFDFB;
  box-shadow: 0 0 0 3px rgba(199, 91, 40, 0.12);
}

/* Badges */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ds-badge-primary {
  background: var(--ds-primary-soft);
  color: var(--ds-primary);
}

.ds-badge-navy {
  background: var(--ds-primary);
  color: #FFFFFF;
}

.ds-badge-accent {
  background: var(--ds-accent-soft);
  color: var(--ds-accent-text);
}

.ds-badge-sand {
  background: var(--ds-sand);
  color: var(--ds-primary-active);
}

.ds-badge-teal {
  background: var(--ds-teal-soft);
  color: var(--ds-teal);
}

.ds-badge-success {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

.ds-badge-warning {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

.ds-badge-danger {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

.ds-badge-muted {
  background: #EDF2F7;
  color: #475569;
}

.ds-badge-info {
  background: var(--ds-info-soft);
  color: var(--ds-info);
}

.ds-card {
  background: var(--ds-surface);
  border: 1.5px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  padding: 18px;
  box-shadow: var(--ds-shadow-xs);
}

.ds-subtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border-radius: 10px;
  background: #DAE4F0;
  border: 1.5px solid #B4C5DA;
  box-shadow: inset 0 1px 2px rgba(16, 33, 63, 0.06);
}

.ds-subtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #1F3558;
  font-family: var(--ds-font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ds-subtab:hover {
  color: var(--ds-primary);
  background: rgba(255, 255, 255, 0.78);
}

.ds-subtab:focus-visible {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.ds-subtab.is-active {
  background: var(--ds-primary);
  color: #FFFFFF;
  border-color: var(--ds-primary-hover);
  box-shadow: 0 3px 8px rgba(16, 33, 63, 0.22);
}

.ds-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ds-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ds-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ds-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #DAE4F0;
  border: 1.5px solid #B4C5DA;
  box-shadow: inset 0 1px 2px rgba(16, 33, 63, 0.06);
}

.ds-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #1F3558;
  padding: 7px 14px;
  border-radius: 7px;
  font-family: var(--ds-font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ds-tab:hover {
  color: var(--ds-primary);
  background: rgba(255, 255, 255, 0.78);
}

.ds-tab.is-active {
  background: var(--ds-primary);
  color: #FFFFFF;
  border-color: var(--ds-primary-hover);
  box-shadow: 0 3px 8px rgba(16, 33, 63, 0.22);
}

/* Tables */
.ds-table-wrap {
  width: 100%;
  max-block-size: min(640px, 75vh);
  overflow: auto;
  border-radius: var(--ds-radius-md);
  border: 1px solid var(--ds-border);
  background: #FFFFFF;
}

.ds-table-wrap:focus-visible {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ds-table th {
  text-align: left;
  padding: 11px 12px;
  background: #F1F5F9;
  color: var(--ds-primary);
  font-family: var(--ds-font-display);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1.5px solid var(--ds-border);
  white-space: nowrap;
}

.ds-table thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: #F1F5F9;
  box-shadow: inset 0 -1px 0 var(--ds-border);
}

.ds-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--ds-border-soft);
  vertical-align: middle;
}

.ds-table tr:hover td {
  background: #F8FAFC;
}

/* Avatars & Foto 1:1 */
.ds-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--ds-gradient-blue);
  color: #FFFFFF;
  font-family: var(--ds-font-display);
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(16, 33, 63, 0.14);
}

.ds-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ds-photo-trigger {
  position: relative;
  display: inline-flex;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 11px;
  flex-shrink: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.ds-photo-trigger:hover {
  transform: scale(1.03);
}

.ds-photo-trigger .ds-photo-cam {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--ds-primary);
  color: #FFFFFF;
  border: 1.5px solid #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(16, 33, 63, 0.28);
  transition: background-color 0.14s ease;
}

.ds-photo-trigger:hover .ds-photo-cam {
  background: var(--ds-accent);
}


/* ==========================================================================
   MODALS, UNIFIED AQUA POPUP SYSTEM, SLIDE-OVER DRAWER & TOASTS
   ========================================================================== */

@keyframes aquaBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes aquaPopupIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.972);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ds-btn-danger {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  border: 1px solid rgba(185, 28, 28, 0.9);
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.28);
}

.ds-btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.36);
}

.ds-modal-backdrop,
.aqua-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 18, 36, 0.62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.4vw, 20px);
  box-sizing: border-box;
  animation: aquaBackdropIn 0.18s ease-out;
}

.ds-modal-backdrop.is-dialog-top {
  z-index: 105;
  background: rgba(9, 18, 36, 0.72);
}

.ds-modal-backdrop.is-drawer {
  justify-content: flex-end;
  padding: 0;
}

.ds-modal {
  width: 100%;
  max-width: min(660px, 100%);
  max-height: 90vh;
  max-height: min(92vh, 92dvh);
  box-sizing: border-box;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 28px 64px rgba(8, 18, 38, 0.34), 0 4px 16px rgba(8, 18, 38, 0.14);
  animation: aquaPopupIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ds-modal.ds-modal-detail,
.ds-modal.aqua-popup {
  max-width: min(780px, 100%);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(32, 58, 109, 0.14);
}

.ds-modal.aqua-dialog-card {
  max-width: 470px;
}

.detail-modal-head,
.aqua-popup-head {
  position: relative;
  background: linear-gradient(135deg, #0D1C38 0%, #203A6D 62%, #17305C 100%);
  color: #FFFFFF;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
  border-bottom: 2px solid rgba(56, 189, 248, 0.32);
}

.aqua-dialog-card.is-tone-danger .aqua-popup-head {
  background: linear-gradient(135deg, #2A0F18 0%, #7F1D1D 62%, #991B1B 100%);
  border-bottom-color: rgba(252, 165, 165, 0.45);
}

.aqua-dialog-card.is-tone-warning .aqua-popup-head {
  background: linear-gradient(135deg, #1E1B12 0%, #9A3B12 62%, #C75B28 100%);
  border-bottom-color: rgba(253, 186, 116, 0.45);
}

.aqua-popup-head-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  flex: 1;
}

.aqua-popup-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.aqua-popup-icon-badge.is-tone-danger {
  background: rgba(254, 202, 202, 0.18);
  border-color: rgba(254, 202, 202, 0.36);
  color: #FEE2E2;
}

.aqua-popup-icon-badge.is-tone-warning {
  background: rgba(254, 215, 170, 0.18);
  border-color: rgba(253, 186, 116, 0.36);
  color: #FFEDD5;
}

.aqua-popup-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-sand);
  margin-bottom: 3px;
}

.aqua-popup-title {
  font-family: var(--ds-font-display);
  font-size: clamp(15.5px, 2.2vw, 18.5px);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.aqua-popup-sub {
  font-size: 12px;
  color: rgba(241, 232, 196, 0.88);
  margin: 3px 0 0;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.aqua-popup-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.11);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.aqua-popup-close:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.38);
  transform: rotate(90deg);
}

.aqua-popup-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.detail-modal-body,
.aqua-popup-body {
  padding: 20px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1 1 auto;
  min-height: 0;
}

.detail-modal-body > *,
.aqua-popup-body > * {
  flex-shrink: 0;
  min-width: 0;
}

.aqua-popup-foot {
  padding: 13px 22px;
  background: #F8FAFC;
  border-top: 1px solid var(--ds-border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.aqua-popup-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--ds-text-muted);
}

.aqua-popup-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.aqua-popup-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1px solid var(--ds-border);
}

.aqua-dialog-msg {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ds-text);
  margin: 0;
}

.aqua-dialog-highlight {
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--ds-surface-subtle);
  border: 1px solid var(--ds-border);
  border-left: 3.5px solid var(--ds-primary);
  font-family: var(--ds-font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ds-primary);
  word-break: break-word;
}

.aqua-dialog-highlight.is-tone-danger {
  background: #FEF2F2;
  border-color: #FECACA;
  border-left-color: #DC2626;
  color: #991B1B;
}

.aqua-dialog-highlight.is-tone-warning {
  background: #FFF7ED;
  border-color: #FED7AA;
  border-left-color: #C75B28;
  color: #9A3412;
}

.aqua-dialog-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.aqua-dialog-input-box .ds-input {
  padding-right: 40px;
}

.aqua-dialog-vis-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--ds-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.aqua-dialog-vis-btn:hover {
  background: var(--ds-surface-subtle);
  color: var(--ds-primary);
}

.aqua-dialog-error {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #DC2626;
}

.detail-kv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.detail-kv-item,
.detail-kv-tile {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--ds-surface-subtle);
  border: 1px solid var(--ds-border-soft);
  min-width: 0;
}

.detail-kv-item span,
.detail-kv-tile span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ds-secondary);
  margin-bottom: 2px;
}

.detail-kv-item strong,
.detail-kv-tile strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ds-primary);
  overflow-wrap: anywhere;
}

.detail-edit-panel {
  padding: 14px;
  border-radius: 12px;
  background: #FFFDF7;
  border: 1px solid #F2D7B6;
}

/* Foto 1:1 Crop & Upload Modal */
.photo-crop-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.photo-crop-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.photo-crop-frame {
  position: relative;
  width: 248px;
  height: 248px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--ds-primary);
  background: #E8EEF5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ds-shadow-sm);
}

.photo-crop-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.photo-crop-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(13, 27, 53, 0.82);
  color: #F1E8C4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

.photo-upload-controls,
.photo-crop-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ds-surface-subtle);
  border: 1px solid var(--ds-border);
}

.frota-sprite-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.frota-sprite-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid var(--ds-border);
  background: var(--ds-bg-page);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.frota-sprite-card:hover {
  border-color: var(--ds-secondary);
  transform: translateY(-1px);
}

.frota-sprite-card.is-selected {
  border-color: var(--ds-accent);
  background: rgba(199, 91, 40, 0.08);
  box-shadow: 0 0 0 3px rgba(199, 91, 40, 0.16);
}

.frota-sprite-card:focus-within {
  outline: 2px solid var(--ds-primary);
  outline-offset: 2px;
}

.frota-sprite-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.frota-sprite-stage {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(145deg, #0D1B35 0%, #203A6D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.frota-sprite-stage img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.frota-sprite-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ds-primary);
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .frota-sprite-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ds-drawer {
  width: 100%;
  max-width: 560px;
  height: 100vh;
  overflow-y: auto;
  background: #FFFFFF;
  padding: 24px;
  box-shadow: -14px 0 44px rgba(10, 20, 40, 0.25);
  border-left: 1px solid var(--ds-border);
}

.ds-toast-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ds-toast {
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--ds-primary-active);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--ds-shadow-md);
}

.ds-toast.is-success {
  background: var(--ds-success);
}

.ds-toast.is-error {
  background: var(--ds-danger);
}

.mobile-menu-btn {
  display: none;
}

.ds-mobile-overlay {
  display: none;
}

@keyframes spinSubtle {
  to {
    transform: rotate(360deg);
  }
}

.spin-subtle {
  animation: spinSubtle 1s linear infinite;
}


/* ==========================================================================
   ACCESSIBILITY SKIP-LINK, PASSWORD MODAL & VIEW UTILITY ACTIONS
   ========================================================================== */

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: var(--ds-radius-sm, 8px);
  background: var(--ds-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(16, 33, 63, 0.35);
  transition: top 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 3px solid var(--ds-accent);
  outline-offset: 2px;
}

.pwd-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pwd-strength-hint {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ds-surface-subtle);
  border: 1px solid var(--ds-border-soft);
  font-size: 12px;
  color: var(--ds-text-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   ECOSYSTEM LAUNCHER & INITIAL SPLASH SCREEN
   ========================================================================== */

.aqua-eco-launcher {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 65;
  font-family: var(--ds-font-sans);
  transition: left 0.26s cubic-bezier(0.22, 1, 0.36, 1), width 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-authenticated .aqua-eco-launcher {
  top: 12px;
  left: 14px;
  width: 246px;
}

body.is-authenticated .aqua-eco-btn {
  width: 100%;
  height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  justify-content: flex-start;
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(241, 245, 249, 0.92);
}

body.is-authenticated .aqua-eco-btn:hover,
body.is-authenticated .aqua-eco-btn:focus-visible,
body.is-authenticated .aqua-eco-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(241, 232, 196, 0.42);
  color: #FFFFFF;
}

body.is-authenticated .aqua-eco-btn .aqua-eco-chevron {
  margin-left: auto;
}

body.is-authenticated .aqua-eco-menu {
  width: 246px;
}

body.is-authenticated.is-sidebar-collapsed .aqua-eco-launcher {
  left: 16px;
  width: 44px;
}

body.is-authenticated.is-sidebar-collapsed .aqua-eco-btn {
  padding: 0;
  justify-content: center;
  border-radius: 10px;
}

body.is-authenticated.is-sidebar-collapsed .aqua-eco-btn span,
body.is-authenticated.is-sidebar-collapsed .aqua-eco-btn .aqua-eco-chevron {
  display: none;
}

body.is-authenticated.is-sidebar-collapsed .aqua-eco-menu {
  width: 228px;
  left: 0;
}

@media (max-width: 960px) {
  body.is-authenticated .aqua-eco-launcher,
  body.is-authenticated.is-sidebar-collapsed .aqua-eco-launcher {
    top: 13px;
    left: auto;
    right: 14px;
    width: auto;
  }

  body.is-authenticated .aqua-eco-btn,
  body.is-authenticated.is-sidebar-collapsed .aqua-eco-btn {
    width: auto;
    height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: #172D55;
    border-color: rgba(23, 45, 85, 0.24);
    color: #FFFFFF;
  }

  body.is-authenticated.is-sidebar-collapsed .aqua-eco-btn span,
  body.is-authenticated.is-sidebar-collapsed .aqua-eco-btn .aqua-eco-chevron {
    display: inline-flex;
  }

  body.is-authenticated .aqua-eco-menu,
  body.is-authenticated.is-sidebar-collapsed .aqua-eco-menu {
    left: auto;
    right: 0;
    width: 224px;
  }
}

.aqua-eco-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(13, 28, 56, 0.56);
  color: rgba(241, 245, 249, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0.76;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.aqua-eco-btn:hover,
.aqua-eco-btn:focus-visible,
.aqua-eco-btn[aria-expanded="true"] {
  opacity: 1;
  background: rgba(13, 28, 56, 0.92);
  color: #FFFFFF;
  border-color: rgba(241, 232, 196, 0.42);
}

.aqua-eco-btn:focus-visible {
  outline: 2px solid var(--ds-sand);
  outline-offset: 2px;
}

.aqua-eco-chevron {
  transition: transform 0.16s ease;
}

.aqua-eco-btn[aria-expanded="true"] .aqua-eco-chevron {
  transform: rotate(180deg);
}

.aqua-eco-menu {
  display: none;
  list-style: none;
  margin: 0;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 224px;
  padding: 6px;
  border-radius: 11px;
  background: rgba(13, 28, 56, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 32px rgba(5, 12, 28, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.aqua-eco-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aqua-eco-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  text-decoration: none;
  color: #F1F5F9;
  transition: background-color 0.14s ease;
}

.aqua-eco-item:hover,
.aqua-eco-item:focus-visible {
  background: rgba(255, 255, 255, 0.10);
}

.aqua-eco-item:focus-visible {
  outline: 2px solid var(--ds-sand);
  outline-offset: -2px;
}

.aqua-eco-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ds-sand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aqua-eco-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.aqua-eco-title {
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
}

.aqua-eco-sub {
  font-size: 10.5px;
  color: rgba(226, 232, 240, 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0D1B35 0%, #203A6D 55%, #455D85 100%);
  color: #FFFFFF;
  font-family: var(--ds-font-display);
}

.app-splash-logo {
  height: 78px;
  width: auto;
  display: block;
}

.app-splash-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ds-sand);
  text-align: center;
  padding: 0 16px;
}

.app-splash-noscript {
  max-width: 460px;
  margin: 4px 16px 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(13, 28, 56, 0.72);
  border: 1px solid rgba(241, 232, 196, 0.35);
  color: #F8FAFC;
  font-family: var(--ds-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}
