.session-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── HOW TO CONNECT STEPS ── */
.connect-steps {
  background: #f0f5ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 18px 20px;
  position: relative;
}

.steps-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.steps-close:hover {
  color: #475569;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.step {
  display: flex;
  gap: 10px;
  align-items: start;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.step b {
  display: block;
  font-size: 12px;
  color: #1e293b;
  margin-bottom: 2px;
}

.step span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.step code {
  background: #dbeafe;
  color: #2563eb;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
}

.steps-alt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #bfdbfe;
  flex-wrap: wrap;
}

.steps-alt-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.copy-script-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #2563eb;
  background: #fff;
  color: #2563eb;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.copy-script-btn:hover {
  background: #eff6ff;
}

.steps-alt-hint {
  font-size: 10px;
  color: #94a3b8;
}

/* ── PASTE ZONE ── */
.connect-paste-zone {
  border: 2px solid #e2e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s;
}

.connect-paste-zone:focus-within {
  border-color: #93b4e8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.connect-paste-zone.connecting {
  border-color: #f59e0b;
  background: #fffbeb;
}

.connect-textarea {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: #334155;
  background: transparent;
  resize: vertical;
  min-height: 90px;
}

.connect-textarea::placeholder {
  color: #94a3b8;
  font-family: var(--font-sans);
}

.connect-paste-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.connect-paste-hint {
  font-size: 11px;
  color: #94a3b8;
}

.connect-btn {
  gap: 6px;
}

/* ── SESSION CARDS ── */
.session-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.session-card {
  background: #fff;
  border: 1px solid #e2e7eb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.session-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.session-card.card-alert {
  border-color: #86efac;
  background: #f0fdf4;
}

.session-card.card-expired {
  border-color: #fca5a5;
  background: #fef2f2;
}

.session-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e0edff;
  color: #2563eb;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.card-alert .session-card-avatar {
  background: #dcfce7;
  color: #15803d;
}

.card-expired .session-card-avatar {
  background: #fee2e2;
  color: #dc2626;
}

.session-card-info {
  flex: 1;
  min-width: 0;
}

.session-card-info b {
  display: block;
  font-size: 13px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-card-info small {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.session-card-status {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.session-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.session-card-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #94a3b8;
}

.session-card-actions {
  display: flex;
  gap: 6px;
}

.session-check-btn,
.session-delete-btn {
  border: 1px solid #e2e7eb;
  background: #fff;
  border-radius: 7px;
  padding: 6px 8px;
  display: grid;
  place-items: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.session-check-btn:hover {
  background: #f0f5ff;
  color: #2563eb;
  border-color: #93b4e8;
}

.session-delete-btn:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

.session-card-error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #b91c1c;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.06);
}

/* ── LINK FIELD ── */
.session-card-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-field {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e7eb;
  border-radius: 7px;
  padding: 5px 9px;
  color: #94a3b8;
}

.link-field select {
  border: 0;
  background: transparent;
  flex: 1;
  font-size: 11px;
  color: #475569;
  outline: 0;
  padding: 2px 0;
  cursor: pointer;
}

.link-field select option {
  font-size: 11px;
}

.linked-app-label {
  font-size: 10px;
  color: #2563eb;
  font-weight: 600;
}

.card-alert .linked-app-label {
  color: #15803d;
}

/* ── FORM ERROR ── */
.session-form-error {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── EMPTY STATE ── */
.session-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px;
  color: #94a3b8;
  text-align: center;
}

.session-empty svg {
  opacity: 0.4;
}

.session-empty b {
  font-size: 14px;
  color: #64748b;
}

.session-empty span {
  font-size: 12px;
  color: #94a3b8;
}

/* ── ACTIVITY ── */
.session-activity {
  background: #fff;
  border: 1px solid #e2e7eb;
  border-radius: 12px;
  padding: 14px 16px;
}

.session-activity .timeline {
  max-height: 200px;
  overflow-y: auto;
}

.session-activity .event {
  padding: 4px 0;
}

/* ── SPINNER ── */
.spin {
  animation: spin 1s linear infinite;
}

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

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .session-cards {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .steps-alt {
    flex-direction: column;
    align-items: start;
  }
}

/* ── INPUT MODE TABS ── */
.connect-tabs {
  display: flex;
  gap: 0;
  border: 1px solid #e2e7eb;
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}

.connect-tab {
  border: 0;
  background: #f8fafc;
  color: #64748b;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.connect-tab:first-child {
  border-right: 1px solid #e2e7eb;
}

.connect-tab.active {
  background: #2563eb;
  color: #fff;
}

.connect-tab:not(.active):hover {
  background: #f0f5ff;
  color: #2563eb;
}

/* ── DIRECT COOKIE ZONE ── */
.direct-cookie-zone {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.direct-cookie-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 16px;
}

.direct-cookie-info b {
  display: block;
  font-size: 12px;
  color: #15803d;
  margin-bottom: 8px;
}

.direct-cookie-info ol {
  margin: 0 0 8px 16px;
  padding: 0;
  font-size: 12px;
  color: #334155;
  line-height: 1.7;
}

.direct-cookie-info code {
  background: #dcfce7;
  color: #15803d;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
}

.direct-cookie-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #64748b;
}
