#atfmModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 38, 99, 0.35);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    padding: 20px;
  }
  #atfmContent {
    background: #fff;
    width: 100%;
    max-width: 720px;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 38, 99, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
  }
  .atfm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding: 10px 16px;
    background: #fff3cd;
    color: #7d4e00;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  .atfm-btn:hover {
    background: #ffe08a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  }
  .atfm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .atfm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 750px;
    table-layout: fixed;
  }
  .atfm-table th:nth-child(1) { width: 90px; }   /* ACID */
  .atfm-table th:nth-child(2) { width: 90px; }   /* COBT */
  .atfm-table th:nth-child(3) { width: 90px; }   /* CTOT */
  .atfm-table th:nth-child(4) { width: 90px; }   /* COBT_N */
  .atfm-table th:nth-child(5) { width: 90px; }   /* CTOT_N */
  .atfm-table th:nth-child(6) { width: 150px; }  /* CTOT WINDOW */
  .atfm-table th:nth-child(7) { width: 70px; }   /* ADEP */
  .atfm-table th:nth-child(8) { width: 70px; }   /* ADES */
  .atfm-table th:nth-child(9) { width: 80px; }   /* CODE */
  .atfm-table thead th {
    background: var(--cal-light-bg);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }
  .atfm-table td {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
  }

  .atfm-table td:nth-child(6) {
  white-space: nowrap;
  }

  .atfm-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0f3f8;
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 13px;
    white-space: nowrap;
  }
  .atfm-table tbody tr:last-child td { border-bottom: none; }
  .atfm-table tbody tr:hover { background: var(--primary-light); }
  .atfm-acid {
    font-family: var(--font-latin);
    font-weight: 700;
    color: var(--cal-navy);
    font-size: 13px;
  }
  .atfm-time {
    font-family: var(--font-latin);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
  }
  .atfm-time-new {
    color: #e67e22;
    font-weight: 700;
  }
  .atfm-window {
    font-family: var(--font-latin);
    font-size: 12px;
    color: #64748b;
  }
  .atfm-code {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
  }
  .atfm-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
  }
  .atfm-updated {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
    padding: 8px 20px 12px;
    border-top: 1px solid var(--border);
  }

  .atfm-info-list {
  padding: 12px 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.atfm-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.atfm-info-badge {
  flex-shrink: 0;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  margin-top: 2px;
}

.atfm-info-msg {
  flex: 1;
  color: var(--text-primary);
  font-family: var(--font-latin);
  font-size: 12px;
  word-break: break-word;
}

.atfm-info-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-latin);
  white-space: nowrap;
  margin-top: 2px;
}

.adp-group {
  padding: 4px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.adp-group:last-of-type {
  border-bottom: none;
}

.adp-group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 0 4px;
  border-left: 3px solid var(--cal-navy);
  padding-left: 8px;
}

.adp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
}

.adp-row:hover {
  background: var(--primary-light);
}

.adp-filename {
  flex: 1;
  font-family: var(--font-latin);
  font-size: 12px;
  color: var(--cal-navy);
  font-weight: 600;
  word-break: break-all;
}

.adp-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-latin);
  white-space: nowrap;
}

.adp-dl {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--cal-navy);
  font-weight: 700;
}

#adpModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 38, 99, 0.35);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
  padding: 20px;
}

#adpContent {
  background: #fff;
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 38, 99, 0.2);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.adp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 10px 16px;
  background: #e0f2fe;
  color: #0369a1;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.adp-btn:hover {
  background: #bae6fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

@media (max-width: 480px) {
  #adpModal { align-items: flex-end; padding: 0; }
  #adpContent { max-width: 100%; width: 100%; border-radius: 16px 16px 0 0; max-height: 85vh; }
  #atfmModal { align-items: flex-end; padding: 0; }
  #atfmContent { max-width: 100%; width: 100%; border-radius: 16px 16px 0 0; max-height: 85vh; }
}
