/* ══════════════════════════════════════════
   SFTP.CSS — Estilos del panel SFTP y Admin
══════════════════════════════════════════ */

/* ── Dashboard SFTP ─────────────────────── */
.sftp-dashboard { width: 100%; }
.sftp-header { margin-bottom: 20px; }
.sftp-title {
  font-size: 22px; font-weight: 600;
  color: #2a3f54; margin-bottom: 4px;
}
.sftp-subtitle { font-size: 13px; color: #777; }
.sftp-loading { color: #888; font-size: 14px; padding: 20px; }

.sftp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.sftp-card {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.3s, box-shadow 0.2s;
}
.sftp-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.sftp-card.sftp-status-success { border-left: 4px solid #4caf50; }
.sftp-card.sftp-status-error   { border-left: 4px solid #f44336; }
.sftp-card.sftp-status-warning { border-left: 4px solid #ff9800; }
.sftp-card.sftp-status-running { border-left: 4px solid #2196f3; }
.sftp-card.sftp-status-none    { border-left: 4px solid #bbb; }

.sftp-card-top {
  display: flex; justify-content: space-between; align-items: center;
}
.sftp-card-name { font-size: 16px; font-weight: 600; color: #2a3f54; }
.sftp-card-cron { font-size: 11px; color: #666; background: #e8e8e8; padding: 3px 8px; border-radius: 4px; }
.sftp-card-desc { font-size: 12px; color: #666; line-height: 1.4; }

.sftp-card-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: #555;
}
.sftp-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.sftp-dot.sftp-status-success { background: #4caf50; }
.sftp-dot.sftp-status-error   { background: #f44336; }
.sftp-dot.sftp-status-warning { background: #ff9800; }
.sftp-dot.sftp-status-running { background: #2196f3; animation: pulse 1s infinite; }
.sftp-dot.sftp-status-none    { background: #bbb; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.sftp-card-time { font-size: 11px; color: #888; }
.sftp-card-msg {
  font-size: 11px; color: #555;
  background: #eee; padding: 6px 10px;
  border-radius: 4px; word-break: break-word;
  max-height: 60px; overflow-y: auto;
}

.sftp-btn {
  margin-top: auto;
  padding: 8px 16px;
  background: #E82338;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.sftp-btn:hover:not(:disabled) { background: #c91e30; }
.sftp-btn:disabled { background: #aaa; cursor: not-allowed; }
.sftp-btn-ok { background: #4caf50 !important; cursor: default; }
.sftp-btn-ok:disabled { background: #4caf50 !important; opacity: 0.7; }

/* ── Admin tabs (para admin que ve ambos dashboards) ── */
.dashboard-tabs {
  display: flex; gap: 0; margin-bottom: 16px;
}
.dashboard-tab {
  padding: 8px 20px;
  background: #f0f0f0;
  color: #666;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  transition: all 0.2s;
}
.dashboard-tab:first-child { border-radius: 6px 0 0 6px; }
.dashboard-tab:last-child  { border-radius: 0 6px 6px 0; }
.dashboard-tab.active {
  background: #2a3f54; color: #fff; border-color: #2a3f54;
}

/* ── Panel Admin ────────────────────────── */
.admin-container { width: 100%; max-width: 800px; }
.admin-container .report-title {
  color: #2a3f54;
  font-size: 20px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 3px solid #c0272d;
  margin-bottom: 20px;
}

.admin-add-form {
  display: flex; gap: 8px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.admin-add-form input,
.admin-add-form select {
  padding: 8px 12px;
  background: #eaeaea;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  font-size: 13px;
}
.admin-add-form input { flex: 1; min-width: 200px; }
.admin-add-form select { min-width: 130px; }

.admin-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-btn-add { background: #4caf50; color: #fff; }
.admin-btn-add:hover { background: #43a047; }
.admin-btn-del { background: #f44336; color: #fff; }
.admin-btn-del:hover { background: #e53935; }

.admin-msg {
  font-size: 12px; padding: 6px 0; min-height: 20px;
}
.admin-msg.success { color: #4caf50; }
.admin-msg.error   { color: #f44336; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  background: #f0f0f0;
  color: #555;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-weight: 500;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  color: #333;
}
.admin-table tr:hover td { background: #f8f8f8; }

.admin-role-select {
  padding: 4px 8px;
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  font-size: 12px;
}

/* ── Nav admin link ─────────────────────── */
.nav-admin-link {
  display: none;
  padding: 6px 12px;
  font-size: 12px;
  color: #ff9800;
  cursor: pointer;
  border: 1px solid #ff9800;
  border-radius: 4px;
  margin-left: auto;
  margin-right: 8px;
  transition: all 0.2s;
}
.nav-admin-link:hover { background: #ff980020; }
.nav-admin-link.visible { display: inline-flex; align-items: center; gap: 4px; }
