*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #0d1117 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ── Wrapper ──────────────────────────────────────────────── */
.login-wrapper {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ── Brand ────────────────────────────────────────────────── */
.login-brand       { text-align: center; }
.brand-icon        { width: 64px; height: 64px; background: #25D366;
                     border-radius: 18px; display: flex; align-items: center;
                     justify-content: center; margin: 0 auto 12px;
                     box-shadow: 0 8px 24px rgba(37,211,102,.35); }
.brand-icon i      { font-size: 32px; color: #fff; }
.brand-name        { font-size: 22px; font-weight: 700; color: #e6edf3; }
.brand-sub         { font-size: 13px; color: #7d8590; margin-top: 4px; }

/* ── Card ─────────────────────────────────────────────────── */
.login-card {
  width: 100%;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}

/* ── Alert Banner ─────────────────────────────────────────── */
.alert-banner {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(248,81,73,.12);
  border: 1px solid rgba(248,81,73,.4);
  color: #f85149;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
}
.alert-banner.visible { display: flex; }

/* ── Form ─────────────────────────────────────────────────── */
.form-group        { margin-bottom: 18px; }
.form-group label  { display: block; font-size: 13px; font-weight: 500;
                     color: #c9d1d9; margin-bottom: 6px; }
.input-wrap        { position: relative; }
.input-icon        { position: absolute; left: 12px; top: 50%;
                     transform: translateY(-50%); color: #7d8590;
                     font-size: 16px; pointer-events: none; }
.input-wrap input  { width: 100%; padding: 10px 40px 10px 38px;
                     background: #0d1117; border: 1px solid #30363d;
                     border-radius: 8px; color: #e6edf3; font-size: 14px;
                     outline: none; transition: border-color .2s; }
.input-wrap input:focus { border-color: #25D366;
                          box-shadow: 0 0 0 3px rgba(37,211,102,.12); }
.input-wrap input::placeholder { color: #484f58; }

.eye-btn           { position: absolute; right: 10px; top: 50%;
                     transform: translateY(-50%); background: none;
                     border: none; color: #7d8590; cursor: pointer;
                     padding: 4px; font-size: 16px; }
.eye-btn:hover     { color: #c9d1d9; }

/* ── Login Button ─────────────────────────────────────────── */
.login-btn {
  width: 100%; padding: 11px;
  background: #25D366; border: none; border-radius: 8px;
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .1s;
}
.login-btn:hover   { background: #20bd5a; }
.login-btn:active  { transform: scale(.98); }
.login-btn:disabled { background: #2d7a47; cursor: not-allowed; opacity: .7; }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner.hidden  { display: none; }
@keyframes spin  { to { transform: rotate(360deg); } }

/* ── Footer ───────────────────────────────────────────────── */
.login-footer { font-size: 12px; color: #484f58; text-align: center; }
/* ── Conflict Modal ───────────────────────────────────────── */
.modal-backdrop         { display: none; position: fixed; inset: 0;
                          background: rgba(0,0,0,.75); z-index: 999;
                          align-items: center; justify-content: center;
                          padding: 20px; }
.modal-backdrop.open    { display: flex; }

.conflict-box           { background: #161b22; border: 1px solid #30363d;
                          border-radius: 16px; padding: 32px 28px;
                          max-width: 380px; width: 100%; text-align: center;
                          box-shadow: 0 24px 64px rgba(0,0,0,.5); }

.conflict-icon          { width: 60px; height: 60px; border-radius: 50%;
                          background: rgba(248,81,73,.12);
                          border: 1px solid rgba(248,81,73,.3);
                          display: flex; align-items: center;
                          justify-content: center; margin: 0 auto 16px;
                          font-size: 26px; color: #f85149; }

.conflict-box h3        { font-size: 18px; font-weight: 700;
                          color: #e6edf3; margin-bottom: 6px; }
.conflict-sub           { font-size: 13px; color: #7d8590; margin-bottom: 20px; }

.conflict-details       { background: #0d1117; border: 1px solid #30363d;
                          border-radius: 10px; padding: 14px;
                          margin-bottom: 20px; text-align: left; }

.conflict-row           { display: flex; align-items: flex-start;
                          gap: 12px; padding: 8px 0;
                          border-bottom: 1px solid #21262d; }
.conflict-row:last-child{ border-bottom: none; }
.conflict-row > i       { font-size: 16px; color: #7d8590; margin-top: 2px; }
.conflict-label         { font-size: 11px; color: #484f58;
                          text-transform: uppercase; letter-spacing: .4px; }
.conflict-val           { font-size: 13px; color: #e6edf3;
                          font-weight: 500; margin-top: 2px; }

.conflict-actions       { display: flex; flex-direction: column; gap: 10px; }

.btn-force              { width: 100%; padding: 11px;
                          background: #f85149;
                          border: none; border-radius: 8px;
                          color: #fff; font-size: 14px; font-weight: 600;
                          cursor: pointer; display: flex;
                          align-items: center; justify-content: center;
                          gap: 8px; transition: background .2s; }
.btn-force:hover        { background: #da3630; }

.btn-cancel             { width: 100%; padding: 10px;
                          background: transparent;
                          border: 1px solid #30363d; border-radius: 8px;
                          color: #7d8590; font-size: 14px;
                          cursor: pointer; transition: background .2s; }
.btn-cancel:hover       { background: #21262d; color: #e6edf3; }
