/* Arcflow — Frontend Styles */

#arcflow-root {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--af-bg-app, #0b0b10);
  position: relative;
}

#arcflow-root * {
  box-sizing: border-box;
}

#arcflow-root button,
#arcflow-root input,
#arcflow-root select,
#arcflow-root textarea {
  font-family: 'Archivo', system-ui, sans-serif;
  line-height: normal;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

#arcflow-root button:focus,
#arcflow-root input:focus,
#arcflow-root select:focus,
#arcflow-root textarea:focus {
  outline: none;
  box-shadow: none;
}

#arcflow-root select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: auto;
  min-height: 0;
}

#arcflow-root input[type="text"],
#arcflow-root input[type="search"],
#arcflow-root input[type="number"] {
  height: auto;
  padding: 6px 10px;
}

/* Scrollbar styles */
#arcflow-root ::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

#arcflow-root ::-webkit-scrollbar-track {
  background: transparent;
}

#arcflow-root ::-webkit-scrollbar-thumb {
  background: var(--af-scrollbar-thumb, rgba(255, 255, 255, 0.06));
  border-radius: 2px;
}

#arcflow-root ::selection {
  background: rgba(91, 141, 239, 0.25);
}

/* ── Login Page ── */

.arcflow-login-body *,
.arcflow-login-body *::before,
.arcflow-login-body *::after {
  box-sizing: border-box;
}

.arcflow-login-body {
  margin: 0;
  padding: 0;
  background: #0b0b10;
  font-family: 'Archivo', system-ui, sans-serif;
  color: #e2e2ea;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.arcflow-login-container {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px;
  text-align: center;
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.arcflow-login-logo img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.arcflow-login-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 28px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.arcflow-login-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: left;
}

.arcflow-login-form {
  text-align: left;
}

.arcflow-login-field {
  margin-bottom: 16px;
}

.arcflow-login-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  margin-bottom: 6px;
}

.arcflow-login-field input {
  width: 100%;
  padding: 10px 14px;
  background: #0e0e14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #e0e0e0;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 14px;
  transition: border-color 0.15s;
}

.arcflow-login-field input:focus {
  outline: none;
  border-color: rgba(91, 141, 239, 0.5);
}

.arcflow-password-wrap {
  position: relative;
}

.arcflow-password-wrap input {
  padding-right: 40px;
}

.arcflow-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arcflow-password-toggle:hover {
  color: #999;
}

.arcflow-login-submit {
  width: auto;
  min-width: 140px;
  padding: 11px 32px;
  margin-top: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  background: #5b8def;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.arcflow-login-submit:hover {
  background: #4a7de0;
}

/* ── Auth Slider (login/register toggle) ── */
.arcflow-auth-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.arcflow-auth-panel {
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.arcflow-login-panel {
  transform: translateX(0);
  opacity: 1;
}
.arcflow-register-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
.arcflow-auth-slider.show-register .arcflow-login-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.arcflow-auth-slider.show-register .arcflow-register-panel {
  position: relative;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.arcflow-auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #8a8f98;
}
.arcflow-auth-switch a {
  color: #5b8def;
  text-decoration: none;
  font-weight: 600;
}
.arcflow-auth-switch a:hover {
  text-decoration: underline;
}
.arcflow-reset-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
.arcflow-auth-slider.show-reset .arcflow-login-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.arcflow-auth-slider.show-reset .arcflow-reset-panel {
  position: relative;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.arcflow-newpass-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
.arcflow-auth-slider.show-newpass .arcflow-login-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.arcflow-auth-slider.show-newpass .arcflow-newpass-panel {
  position: relative;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.arcflow-reset-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: left;
  line-height: 1.5;
}
.arcflow-forgot-link {
  display: block;
  text-align: right;
  font-size: 12px;
  margin-top: -10px;
  margin-bottom: 16px;
}
.arcflow-forgot-link a {
  color: #8a8f98;
  text-decoration: none;
}
.arcflow-forgot-link a:hover {
  color: #5b8def;
}

/* ── Share modal select styling ── */
#af-share-perm,
.af-share-perm-select {
  transition: border-color 0.15s;
}
#af-share-perm:hover,
.af-share-perm-select:hover {
  border-color: #5b8def;
}
#af-share-perm:focus,
.af-share-perm-select:focus {
  border-color: #5b8def;
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.15);
}
#af-share-perm option,
.af-share-perm-select option {
  background: #171720;
  color: #e0e0e6;
  padding: 6px 10px;
  font-weight: 500;
}

/* ── Port dots ── */

[data-port] > span {
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
}

/* Hide inactive ports by default, show on node hover or in connect mode */
[data-port][data-port-idle] > span {
  opacity: 0;
}

[data-node]:hover [data-port][data-port-idle] > span,
[data-connect-mode] [data-port][data-port-idle] > span {
  opacity: 1;
}

[data-port]:hover > span {
  transform: scale(1.25);
  box-shadow: 0 0 8px currentColor;
  background: rgba(99, 102, 241, 0.45) !important;
  border-color: rgba(99, 102, 241, 0.7) !important;
}

/* Note icon: hidden by default, visible on node hover only */
.af-note-icon {
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
[data-node]:hover .af-note-icon {
  opacity: 1;
}
.af-note-icon:hover {
  color: #F6DB55 !important;
  background: rgba(246,219,85,0.12) !important;
}

/* Duplicate icon: hidden by default, visible on node hover */
.af-dup-icon {
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
[data-node]:hover .af-dup-icon {
  opacity: 1;
}
.af-dup-icon:hover {
  color: var(--af-text-primary) !important;
  background: rgba(255,255,255,0.08) !important;
}

/* Sticky note scrollbar */
.af-sticky-note ::-webkit-scrollbar {
  width: 4px;
}
.af-sticky-note ::-webkit-scrollbar-track {
  background: transparent;
}
.af-sticky-note ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 2px;
}

/* Swim Lane styles */
[data-lane-tag]:hover .af-lane-delete-btn {
  display: flex !important;
}
[data-lane-tag]:hover {
  filter: brightness(1.15);
}
